How would one use ``$runCommandRaw`` in order to g...
# orm-help
k
How would one use ``$runCommandRaw`` in order to get all collection names with the MongoDB ``getCollectionNames`` command? I'm attempting to clear my db (not delete) by looping over the names and running ``deleteMany`` (not for production so its ok).
1
p
have the same issue, there are no docs for
$runCommandRaw
exist, so not even sure if that's possible
k
Yes, i'm assuming it is meant for typical operations. It is very much limited compared to the
$queryRaw
command available for RDBMS.
Have you figured a solution yet @PinkiePie?
p
nope, my current solution is to use native nodejs mongo driver alongside with prisma
k
ok thanks.
n
Hey 👋 Apologies for the delay in getting back on this one, we have created this GitHub Issue: https://github.com/prisma/docs/issues/3220 in docs to clarify that you need to follow the syntax of
db.runCommand
method provided by MongoDB: https://www.mongodb.com/docs/manual/reference/command/ in
$runCommandRaw