docs icon indicating copy to clipboard operation
docs copied to clipboard

Typical use cases for `queryRaw`

Open nikolasburk opened this issue 5 years ago • 2 comments

We very often have users that ask for a specific Prisma Client query where our answer is: "You have to use queryRaw because what you want is not yet actively supported by Prisma Client".

I think we should collected the use cases for these questions and then add those to the docs page as "Raw patterns" or or "Common raw queries"...

  • [ ] ~order by multiple fields~
  • [ ] increment an integer value in the DB in a single query
  • [ ] ~aggregations~
  • [ ] case insensitive filtering
  • [ ] group by

nikolasburk avatar Jul 02 '20 09:07 nikolasburk

@nikolasburk Now that we can do aggregations and sort by multiple fields - shall I do these?

  • [x] increment an integer value in the DB in a single query
  • [ ] case insensitive filtering

mhwelander avatar Aug 06 '20 10:08 mhwelander

Yes, that would be perfect and you're right we can omit the other ones since they're now part of the official client API. One idea for a third one could be an example for group by though.

  • [ ] example usage of group by

nikolasburk avatar Aug 06 '20 10:08 nikolasburk