Join Slack
Powered by
Can you get a full count of all rows along with a ...
# orm-help
a
Aaron Fulkerson
02/06/2021, 10:20 PM
Can you get a full count of all rows along with a slice of those rows yet or does that still require 2 queries?
n
nikolasburk
02/08/2021, 2:42 PM
Hey Aaron, if I understand you correctly, this would require two queries (one
prisma.model.count()
and one
prisma.model.findMany()
). If you want to get this info in a single query, you can use a
raw SQL query
in this case as a fallback 🙂
nikolasburk
02/08/2021, 2:43 PM
If you'd like to see this supported "natively" with Prisma Client, feel free to
open a feature request
for this 🙌
2
Views
Open in Slack
Previous
Next