docs
docs copied to clipboard
Clarify docs surrounding raw MongoDB queries
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