Skip to content

Commit 605cf7d

Browse files
committed
final feedback
1 parent f43f5c9 commit 605cf7d

File tree

1 file changed

+34
-32
lines changed
  • source/fundamentals/crud/write-operations

1 file changed

+34
-32
lines changed

source/fundamentals/crud/write-operations/bulk.txt

Lines changed: 34 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,15 @@ documents to the ``MongoCollection.bulkWrite()`` method. A ``WriteModel`` is a
5151
model that represents a write operation.
5252

5353
The ``MongoCollection.bulkWrite()`` method performs each kind of write
54-
operations in a separate call. For example, when you pass ``DeleteOneModel``,
55-
``DeleteManyModel``, and ``ReplaceOneModel`` objects to the method, it creates
54+
operation in a separate database call. For example, when you pass ``DeleteOneModel``,
55+
``DeleteManyModel``, and ``ReplaceOneModel`` objects to the method, it performs
5656
two calls: one for the delete operations and one for the replace operation.
5757

5858
.. note::
5959

60-
When the client splits operations into calls, it might reorder operations for
61-
efficiency if the bulk write operation is not ordered. To learn more about
62-
operation execution order, see the :ref:`orderOfExecution` section.
60+
When the client splits operations into separate database calls, it might
61+
reorder operations for efficiency if the bulk write operation is not ordered.
62+
To learn more about operation execution order, see the :ref:`orderOfExecution` section.
6363

6464
The following sections show how to create and use each ``WriteModel``
6565
document. The examples in each section use the following documents in the
@@ -352,73 +352,75 @@ in the table below.
352352
* - ``ClientNamespacedInsertOneModel``
353353
- ``insertOne()``
354354
- Creates a model to insert a document into the ``namespace``.
355-
- ``namespace``: defines which database and collection to write to
355+
- ``namespace``: Database and collection to write to
356356

357-
``document``: defines the document to insert
357+
``document``: Document to insert
358358

359359
* - ``ClientNamespacedUpdateOneModel``
360360
- ``updateOne()``
361-
- Creates a model to update at most one document in the ``namespace``
361+
- Creates a model to update the first document in the ``namespace``
362362
that matches ``filter``.
363-
- ``namespace``: defines which database and collection to write to
363+
- ``namespace``: Database and collection to write to
364364

365-
``filter``: defines filter that selects which document to update
365+
``filter``: Filter that selects which document to update
366366

367-
``update``: defines update to apply to matching document
367+
``update``: Update to apply to matching document
368368

369-
``updatePipeline``: defines update pipeline to apply to matching document
369+
``updatePipeline``: Update pipeline to apply to matching document
370370

371-
``options``: (optional) defines options to apply when updating document
371+
``options``: (optional) Options to apply when updating document
372372

373-
One of ``update`` or ``updatePipeline`` must be specified.
373+
You must pass a value for either the ``update`` or ``updatePipeline``
374+
parameter.
374375

375376
* - ``ClientNamespacedUpdateManyModel``
376377
- ``updateMany()``
377378
- Creates a model to update all documents in the ``namespace`` that match
378379
``filter``.
379-
- ``namespace``: defines which database and collection to write to
380+
- ``namespace``: Database and collection to write to
380381

381-
``filter``: defines filter that selects which documents to update
382+
``filter``: Filter that selects which documents to update
382383

383-
``update``: defines update to apply to matching documents
384+
``update``: Update to apply to matching documents
384385

385-
``updatePipeline``: defines update pipeline to apply to matching documents
386+
``updatePipeline``: Update pipeline to apply to matching documents
386387

387-
``options``: (optional) defines options to apply when updating documents
388+
``options``: (optional) Options to apply when updating documents
388389

389-
One of ``update`` or ``updatePipeline`` must be specified.
390+
You must pass a value for either the ``update`` or ``updatePipeline``
391+
parameter.
390392

391393
* - ``ClientNamespacedReplaceOneModel``
392394
- ``replaceOne()``
393-
- Creates a model to replace at most one document in the ``namespace`` that
395+
- Creates a model to replace the first document in the ``namespace`` that
394396
matches ``filter``.
395-
- ``namespace``: defines which database and collection to write to
397+
- ``namespace``: Database and collection to write to
396398

397-
``filter``: defines filter that selects which document to replace
399+
``filter``: Filter that selects which document to replace
398400

399-
``replacement``: defines replacement document
401+
``replacement``: Replacement document
400402

401-
``options``: (optional) defines options to apply when replacing documents
403+
``options``: (optional) Options to apply when replacing documents
402404

403405
* - ``ClientNamespacedDeleteOneModel``
404406
- ``deleteOne()``
405-
- Creates a model to delete at most one document in the ``namespace`` that
407+
- Creates a model to delete the first document in the ``namespace`` that
406408
matches ``filter``.
407-
- ``namespace``: defines which database and collection to write to
409+
- ``namespace``: Database and collection to write to
408410

409-
``filter``: defines filter that selects which document to delete
411+
``filter``: Filter that selects which document to delete
410412

411-
``option``: (optional) defines options to apply when deleting document
413+
``option``: (optional) Options to apply when deleting document
412414

413415
* - ``ClientNamespacedDeleteManyModel``
414416
- ``deleteMany()``
415417
- Creates a model to delete all documents in the ``namespace`` that match
416418
``filter``.
417-
- ``namespace``: defines which database and collection to write to
419+
- ``namespace``: Database and collection to write to
418420

419-
``filter``: defines filter that selects which documents to delete
421+
``filter``: Filter that selects which documents to delete
420422

421-
``option``: (optional) defines options to apply when deleting documents
423+
``option``: (optional) Options to apply when deleting documents
422424

423425
The following sections provide examples of how to use the client ``bulkWrite()``
424426
method.

0 commit comments

Comments
 (0)