File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed
code-snippets/usage-examples Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ async function run() {
23
23
const updateDoc = {
24
24
$set : {
25
25
plot :
26
- "Blacksmith Scene is a silent film directed by William K.L. Dickson" ,
26
+ "Blacksmith Scene is a silent film directed by William K.L. Dickson. " ,
27
27
} ,
28
28
} ;
29
29
Original file line number Diff line number Diff line change @@ -8,15 +8,15 @@ Update Multiple Documents
8
8
If you specify a callback method, ``updateMany()`` returns nothing. If you
9
9
do not specify one, this method returns a ``Promise`` that resolves to the
10
10
result object when it completes. See our guide on :doc:`Promises and
11
- Callbacks </fundamentals/promises>` for more information, or the
11
+ Callbacks </fundamentals/promises>` for more information, or see the
12
12
:node-api-4.0:`API documentation </classes/collection.html#~resultcallback>` for
13
13
information on the result object.
14
14
15
15
You can update multiple documents using the
16
- :node-api-4.0:`updateMany() </classes/collection.html#updatemany>` method.
17
- ``updateMany()`` accepts a filter object and update document, and
18
- replaces documents in a collection that match the filter with the update
19
- document . The update document requires an :manual:`update operator
16
+ :node-api-4.0:`collection. updateMany() </classes/collection.html#updatemany>` method.
17
+ The ``updateMany()`` method accepts a filter document and an update document. If the query matches documents in the
18
+ collection, the method applies the updates from the update document to fields
19
+ and values of the matching documents . The update document requires an :manual:`update operator
20
20
</reference/operator/update>` to modify a field in a document.
21
21
22
22
You can specify additional options in the ``options`` object passed in
Original file line number Diff line number Diff line change @@ -8,13 +8,13 @@ Update a Document
8
8
If you specify a callback method, ``updateOne()`` returns nothing. If you
9
9
do not specify one, this method returns a ``Promise`` that resolves to the
10
10
result object when it completes. See our guide on :doc:`Promises and
11
- Callbacks </fundamentals/promises>` for more information, or the
11
+ Callbacks </fundamentals/promises>` for more information, or see the
12
12
:node-api-4.0:`API documentation </classes/collection.html#~updatewriteopresult>` for
13
13
information on the result object.
14
14
15
15
You can update a single document using the
16
16
:node-api-4.0:`collection.updateOne() </classes/collection.html#updateone>`
17
- method. ``updateOne()`` accepts a filter
17
+ method. The ``updateOne()`` method accepts a filter
18
18
document and an update document. If the query matches documents in the
19
19
collection, the method applies the updates from the update document to fields
20
20
and values of them. The update document contains :manual:`update operators
You can’t perform that action at this time.
0 commit comments