diff --git a/Readme.md b/Readme.md index ca149fa..d89f749 100644 --- a/Readme.md +++ b/Readme.md @@ -261,7 +261,7 @@ From http://api.mongodb.org/js/1.8.1/symbols/src/shell_collection.js.html + collection.find(...).sort(...) + collection.findOne([query][callback]) + collection.findAndModify( { update : ... , remove : bool [, query: {}, sort: {}, 'new': false] } ) - ex: finds document with comment value 0, increase its 'count' field by 1, and return the updated document. + ex: finds document with comment value 0, increase its 'count' field by 1, and return the old document. collection.findAndModify( {query: {comment:'0'}, update : {"$inc":{"count":1}}, 'new': true}, function (err, doc) { console.log(doc) })