Enzot
08/11/2022, 2:20 PMfindMany.
I have db with 30000 records and I am only able to take 5000 of them. If I try get more I have error from tokio-runtime-worker
. It is bug or feature?Nurul
08/11/2022, 4:31 PMtokio-runtime-worker
error?Enzot
08/11/2022, 4:40 PMtake: 5000
everything works. For 5001 not.
Error:
thread 'tokio-runtime-worker' panicked at 'called `Option::unwrap()` on a `None` value', query-engine/core/src/response_ir/internal.rs:543:81
Invalid `prisma.user.findMany()` invocation in
Enzot
08/12/2022, 7:40 AMNurul
08/12/2022, 11:09 AMimport { PrismaClient } from '@prisma/client';
const prisma = new PrismaClient({
log: ['query'],
});
async function main() {
for (let i = 0; i <= 30000; i++) {
const insertCustomer = await prisma.user.create({
data: {
name: 'John Doe',
},
});
console.log('User Created: ', i);
}
const findUsers = await prisma.user.findMany({
where: {
name: 'John Doe',
},
take: 5020,
});
console.log('Users', findUsers);
}
main()
.catch((e) => {
throw e;
})
.finally(async () => {
await prisma.$disconnect();
});
Could you please create a Bug report here so that our engineering team could have a look?Enzot
08/12/2022, 11:17 AMprisma db pull
to get schema. And this two the old and new are different. (Schemas does not match) Some fields have different type. But right now works. I don't understand why the old one did not work for specific amount but the new one is ok with it. The only problem is that in new I have BigInt which return 100n
and I cannot pars it correctly. JSON.stringify
and JSON.parse
does not work. I cannot convert it as string unfortunatelyEnzot
08/12/2022, 11:18 AM