appCollection {"app": appname, "count": number}
appCountCollection.findAndModify({"app": app},[], {"$inc": {"count": 1}}, {upsert: true, new: true}, function(err, result){
if(err){
console.error("Modify app count failed", err);
callback(err);
Must specify either the remove or the update field in thefindAndModify() method. Removes the document specified in the update field. Set this to true to remove the selected document . The default is false. |
--
You received this message because you are subscribed to the Google Groups "node-mongodb-native" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-mongodb-na...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to node-mongodb-native+unsub...@googlegroups.com.