How do I execute a MongoDB query in a native node-mongo-native driver?
1 answer
The mongo_simple_str_command (...) method in mongo.h seems to be what you are looking for.
mongo_simple_str_command(conn, db, "$eval", "db.foo.find()", out);
I found a usage example here: https://github.com/mongodb/mongo-c-driver/blob/master/test/platform/linux/timeouts.c
+3
source to share