prisma-extension-pagination icon indicating copy to clipboard operation
prisma-extension-pagination copied to clipboard

Raw query support

Open hoangtrung99 opened this issue 1 year ago • 3 comments

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 when doing pagination?

hoangtrung99 avatar Sep 22 '23 10:09 hoangtrung99

Are you talking about raw sql queries? I'm not sure how to implement this reliably so it doesn't cause problems on complex queries. How do you expect it should work?

deptyped avatar Sep 22 '23 20:09 deptyped

I'm not sure about the API design, I hope using $queryRaw it can also be paginated 🙏

hoangtrung99 avatar Sep 25 '23 08:09 hoangtrung99

We've been discussing this today in our office, if we could provide 2 queries to an API, one for calculating the total count and one for the actual pagination. The latter would need to take params for the current page/cursor.

jamesmoss avatar Apr 05 '24 10:04 jamesmoss