I have the following function stored in mongodb:
db.system.js.save({
_id: "testFunc",
value: function() {
return db.clients.find_one({}, {"_id" : False});
}
});
How do I call the function above from python using pymongo?
I have already tried db.eval('testFunc') and it doesn't work. The method is deprecated.
db.system_js.testFunc(). stackoverflow.com/questions/16774889/…