prisma-extension-pagination
prisma-extension-pagination copied to clipboard
Prisma Client extension for pagination
For example, to iterate over all users: ```ts const users = await prisma.user .paginate() .toStream({ limit: 25, // batch size }); for await (const user of users) { console.log(user); //...
For example, to find all users between cursors "1" and "100" (exclusive): ```ts const [users, meta] = await prisma.user .paginate() .withCursor({ after: "1", before: "100" }); ```
It's a great package, but it seems it can't be used with raw queries, is there any way to use it with raw queries, I think this is a necessity...
For some reason, in most tutorials and articles about cursor pagination it is written that, unlike offset pagination, cursor does not allow you to jump to the desired page (skip...
Hi, When using pagination with NestJs it's necessary to code like this: ```ts // prisma.service.ts @Injectable() export class PrismaService extends PrismaClient implements OnModuleInit, OnModuleDestroy { public readonly pagination; constructor() {...
When using this library with NestJs, this error occurs: ```ts class UsersRepository { constructor(private readonly prisma: PrismaService) {} findMany() { return this.prisma.users.paginate(); // "The property 'paginate' does not exist on...
First of all, very nice pagination implementation! Would it be possible to add `pageSize` / `perPage` property to the paginated response? Also, in line with `currentPage`, `previousPage`, `nextPage` variables, maybe...