Skip to content

Commit 309b514

Browse files
committed
RM feedback
1 parent 27dc0e0 commit 309b514

File tree

1 file changed

+22
-17
lines changed

1 file changed

+22
-17
lines changed

source/write/bulk-write.txt

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Then, pass a list of these instances to the ``bulk_write()`` method.
6565

6666
.. important::
6767

68-
Ensure that you import the write operation instances into your application
68+
Ensure that you import the write operation classes into your application
6969
file, as shown in the following code:
7070

7171
.. code-block:: python
@@ -79,12 +79,12 @@ Insert Operations
7979
~~~~~~~~~~~~~~~~~
8080

8181
To perform an insert operation, create an instance of ``InsertOne`` and specify
82-
the document you want to insert. Pass the following arguments to the
82+
the document you want to insert. Pass the following keyword arguments to the
8383
``InsertOne`` constructor:
8484

85-
- Namespace in which to insert the document. This argument is optional if
86-
you perform the bulk operation on a single collection.
87-
- Document to insert.
85+
- ``namespace``: The namespace in which to insert the document. This argument
86+
is optional if you perform the bulk operation on a single collection.
87+
- ``document``: The document to insert.
8888

8989
The following example creates an instance of ``InsertOne``:
9090

@@ -108,10 +108,11 @@ Update Operations
108108
To update a document, create an instance of ``UpdateOne`` and pass in
109109
the following arguments:
110110

111-
- Namespace in which to perform the update. This argument is optional if
111+
- ``namespace``: The namespace in which to perform the update. This argument is optional if
112112
you perform the bulk operation on a single collection.
113-
- **Query filter** that specifies the criteria used to match documents in your collection.
114-
- Update operation you want to perform. For more information about update
113+
- ``filter``: The **query filter** that specifies the criteria used to match documents in
114+
your collection.
115+
- ``update``: The update you want to perform. For more information about update
115116
operations, see the :manual:`Field Update Operators
116117
</reference/operator/update-field/>` guide in the {+mdb-server+} manual.
117118

@@ -144,10 +145,11 @@ A replace operation removes all fields and values of a specified document and
144145
replaces them with new ones. To perform a replace operation, create an instance
145146
of ``ReplaceOne`` and pass in the following arguments:
146147

147-
- Namespace in which to perform the replace operation. This argument is optional if
148-
you perform the bulk operation on a single collection.
149-
- **Query filter** that specifies the criteria used to match the document to replace.
150-
- Document that includes the new fields and values you want
148+
- ``namespace``: The namespace in which to perform the replace operation. This
149+
argument is optional if you perform the bulk operation on a single collection.
150+
- ``filter``: The **query filter** that specifies the criteria used to match the
151+
document to replace.
152+
- ``replacement``: The document that includes the new fields and values you want
151153
to store in the matching document.
152154

153155
The following example creates an instance of ``ReplaceOne``:
@@ -166,9 +168,10 @@ Delete Operations
166168
To delete a document, create an instance of ``DeleteOne`` and pass in
167169
the following arguments:
168170

169-
- Namespace in which to delete the document. This argument is optional if
170-
you perform the bulk operation on a single collection.
171-
- **Query filter** that specifies the criteria used to match the document to delete.
171+
- ``namespace``: The namespace in which to delete the document. This argument is
172+
optional if you perform the bulk operation on a single collection.
173+
- ``filter``: The **query filter** that specifies the criteria used to match the
174+
document to delete.
172175

173176
``DeleteOne`` removes only *the first* document that matches your query filter.
174177

@@ -220,6 +223,9 @@ information about the exception.
220223
method. The driver reports all write concern errors after attempting all operations,
221224
regardless of execution order.
222225

226+
To learn more about write concerns, see :manual:`Write Concern </reference/write-concern/>`
227+
in the {+mdb-server+} manual.
228+
223229
.. _pymongo-bulk-write-collection-ex:
224230

225231
Collection Bulk Write Example
@@ -275,8 +281,7 @@ Customize Bulk Write Operations
275281

276282
The ``bulk_write()`` method optionally accepts additional
277283
parameters, which represent options you can use to configure the bulk write
278-
operation. If you don't specify any additional options, the driver does not customize
279-
the bulk write operation.
284+
operation.
280285

281286
Collection Bulk Write Options
282287
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)