From 99a69a421ec5dd860018bd24bd21ff4f5d9045b0 Mon Sep 17 00:00:00 2001 From: Louis Chatriot Date: Sun, 21 Dec 2014 00:15:19 +0100 Subject: [PATCH] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a46bc9c..bb8c48a 100644 --- a/README.md +++ b/README.md @@ -404,7 +404,7 @@ db.count({}, function (err, count) { * The modifiers create the fields they need to modify if they don't exist, and you can apply them to subdocs. Available field modifiers are `$set` to change a field's value, `$unset` to delete a field and `$inc` to increment a field's value. To work on arrays, you have `$push`, `$pop`, `$addToSet`, `$pull`, and the special `$each`. See examples below for the syntax. * `options` is an object with two possible parameters * `multi` (defaults to `false`) which allows the modification of several documents if set to true - * `upsert` (defaults to `false`) if you want to insert a new document corresponding to the `update` rules if your `query` doesn't match anything + * `upsert` (defaults to `false`) if you want to insert a new document corresponding to the `update` rules if your `query` doesn't match anything. If your `update` is a simple object with no modifiers, it is the inserted document. In the other case, the `query` is stripped from all operator recursively, and the `update` is applied to it. * `callback` (optional) signature: `err`, `numReplaced`, `newDoc` * `numReplaced` is the number of documents replaced * `newDoc` is the created document if the upsert mode was chosen and a document was inserted