File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -1140,7 +1140,13 @@ The returned document contains a subset of the following fields:
1140
1140
1141
1141
.. data:: update.n
1142
1142
1143
- The number of documents selected for update. If the update operation
1143
+ An ``update`` command accepts an array of document updates, some of
1144
+ which can be :term:`upserts <upsert>`. For an update, ``n`` is the
1145
+ number of documents selected for the update. For an upsert, ``n`` is
1146
+ ``1`` for the inserted document. The server adds the ``n`` values for
1147
+ all the updates and upserts and returns the total as ``update.n``.
1148
+
1149
+ If an update operation
1144
1150
results in no change to the document, e.g. :update:`$set` expression
1145
1151
updates the value to the current value, :data:`~update.n` can be
1146
1152
greater than :data:`~update.nModified`.
You can’t perform that action at this time.
0 commit comments