Hello, I have question about limit for `findMany.`...
# orm-help
e
Hello, I have question about limit for
findMany.
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?
1
n
Hey 👋 Welcome to our Slack community! 🙌 Can you share which database you are using and also your prisma version? So you can take 5000 records but if you try to take 5001 records then you get the
tokio-runtime-worker
error?
e
Postgres 14 node 16.16. Prisma version 3.15.2 but on 4.2.1 I have the same problem. Yes, when I have
take: 5000
everything works. For 5001 not. Error:
Copy code
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
I need any help :(
n
Hey! I tried replicating the same on PostgreSQL 14 and node 16.16 and it’s working as expected for me Here’s the query I tried:
Copy code
import { 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?
e
I use
prisma 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 unfortunately
I will make a big report. Thank you for your help <3
🙌 1