@@ -21,8 +21,8 @@ Overview
2121--------
2222
2323In this guide, you can learn how to use the {+driver-short+} to update
24- documents in a MongoDB collection by using the ``update_one() `` and
25- ``update_many() `` methods.
24+ documents in a MongoDB collection by using the ``update_one`` and
25+ ``update_many`` methods.
2626
2727Sample Data
2828~~~~~~~~~~~
@@ -46,8 +46,8 @@ Update Operations
4646
4747You can update documents in MongoDB by using the following methods:
4848
49- - ``update_one() ``, which updates *the first document* that matches the search criteria
50- - ``update_many() ``, which updates *all documents* that match the search criteria
49+ - ``update_one``, which updates *the first document* that matches the search criteria
50+ - ``update_many``, which updates *all documents* that match the search criteria
5151
5252Each update method requires the following parameters:
5353
@@ -64,7 +64,7 @@ Each update method requires the following parameters:
6464Update One Document Example
6565~~~~~~~~~~~~~~~~~~~~~~~~~~~
6666
67- The following example uses the ``update_one() `` method to update the
67+ The following example uses the ``update_one`` method to update the
6868``name`` field value of a document from ``"Happy Garden"`` to ``"Mountain
6969House"``. The update document uses the ``$set`` operation to update the ``name`` field
7070value:
8787Update Many Documents Example
8888~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8989
90- The following example uses the ``update_many() `` method to update all documents
90+ The following example uses the ``update_many`` method to update all documents
9191in which the ``name`` field value is ``"Starbucks"``. The update document uses the
9292``rename()`` method to change the name of the ``address`` field to ``location``:
9393
@@ -109,7 +109,7 @@ in which the ``name`` field value is ``"Starbucks"``. The update document uses t
109109Customize the Update Operation
110110~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
111111
112- The ``update_one() `` and ``update_many() `` methods accept options to configure the update
112+ The ``update_one`` and ``update_many`` methods accept options to configure the update
113113operation. You can pass these options individually as parameters, or you can create a
114114``Hash`` object that contains the options and pass it as a parameter.
115115If you don't specify any options, the driver performs update
@@ -165,7 +165,7 @@ configure the update operation:
165165Modify Update Example
166166`````````````````````
167167
168- This example creates and passes options to the ``update_one() `` method.
168+ This example creates and passes options to the ``update_one`` method.
169169The example uses the ``$equal`` operation to match documents
170170in which the ``name`` field value is ``"Sunrise Pizzeria"``. It then uses the ``$set``
171171operation to set the ``borough`` field value in the first matching document to
@@ -193,7 +193,7 @@ doesn't match any existing documents.
193193Return Value
194194~~~~~~~~~~~~
195195
196- The ``update_one() `` and ``update_many() `` methods each return a ``Result``
196+ The ``update_one`` and ``update_many`` methods each return a ``Result``
197197object. You can use the access the following instance methods from a ``Result`` instance:
198198
199199.. list-table::
@@ -243,6 +243,6 @@ API Documentation
243243To learn more about any of the methods or types discussed in this
244244guide, see the following API documentation:
245245
246- - `update_one() <{+api-root+}/Mongo/Collection.html#update_one-instance_method>`_
247- - `update_many() <{+api-root+}/Mongo/Collection.html#update_many-instance_method>`_
246+ - `update_one <{+api-root+}/Mongo/Collection.html#update_one-instance_method>`_
247+ - `update_many <{+api-root+}/Mongo/Collection.html#update_many-instance_method>`_
248248- `Result <{+api-root+}/Mongo/Operation/Update/Result.html>`_
0 commit comments