docs icon indicating copy to clipboard operation
docs copied to clipboard

Clarify docs surrounding raw MongoDB queries

Open andrew-walford-prisma opened this issue 2 years ago • 0 comments

From Slack thread: https://prisma-company.slack.com/archives/C5Z9TH6N9/p1657703351889459

People want to use raw MongoDB queries but don’t know how to use $runCommandRaw for this. The docs can probably be improved quite a bit (ideally with more examples). Example of user asking about this: https://prisma.slack.com/archives/C0281DB57HQ/p1656395218035119

One user (PinkiePie) wants to know

  • what input $runCommandRaw accepts.
  • Feels that the example in our docs uses a "useless number" instead of an ObjectID.
  • How to tell Prisma that _id is an ObjectID
  • Can you pass a string - db.runCommand should accept a string. It doesn't appear that $runCommandRaw can accept a string, but maybe it can - if so, how?

Related issues (we might want to work on these together):

  • https://github.com/prisma/docs/issues/3220
  • https://github.com/prisma/docs/issues/3209

andrew-walford-prisma avatar Jul 15 '22 08:07 andrew-walford-prisma