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() {
2323 const updateDoc = {
2424 $set : {
2525 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. " ,
2727 } ,
2828 } ;
2929
Original file line number Diff line number Diff line change @@ -8,15 +8,15 @@ Update Multiple Documents
88 If you specify a callback method, ``updateMany()`` returns nothing. If you
99 do not specify one, this method returns a ``Promise`` that resolves to the
1010 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
1212 :node-api-4.0:`API documentation </classes/collection.html#~resultcallback>` for
1313 information on the result object.
1414
1515You 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
2020</reference/operator/update>` to modify a field in a document.
2121
2222You 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
88 If you specify a callback method, ``updateOne()`` returns nothing. If you
99 do not specify one, this method returns a ``Promise`` that resolves to the
1010 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
1212 :node-api-4.0:`API documentation </classes/collection.html#~updatewriteopresult>` for
1313 information on the result object.
1414
1515You can update a single document using the
1616:node-api-4.0:`collection.updateOne() </classes/collection.html#updateone>`
17- method. ``updateOne()`` accepts a filter
17+ method. The ``updateOne()`` method accepts a filter
1818document and an update document. If the query matches documents in the
1919collection, the method applies the updates from the update document to fields
2020and values of them. The update document contains :manual:`update operators
You can’t perform that action at this time.
0 commit comments