@@ -51,15 +51,15 @@ documents to the ``MongoCollection.bulkWrite()`` method. A ``WriteModel`` is a
51
51
model that represents a write operation.
52
52
53
53
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
56
56
two calls: one for the delete operations and one for the replace operation.
57
57
58
58
.. note::
59
59
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.
63
63
64
64
The following sections show how to create and use each ``WriteModel``
65
65
document. The examples in each section use the following documents in the
@@ -352,73 +352,75 @@ in the table below.
352
352
* - ``ClientNamespacedInsertOneModel``
353
353
- ``insertOne()``
354
354
- 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
356
356
357
- ``document``: defines the document to insert
357
+ ``document``: Document to insert
358
358
359
359
* - ``ClientNamespacedUpdateOneModel``
360
360
- ``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``
362
362
that matches ``filter``.
363
- - ``namespace``: defines which database and collection to write to
363
+ - ``namespace``: Database and collection to write to
364
364
365
- ``filter``: defines filter that selects which document to update
365
+ ``filter``: Filter that selects which document to update
366
366
367
- ``update``: defines update to apply to matching document
367
+ ``update``: Update to apply to matching document
368
368
369
- ``updatePipeline``: defines update pipeline to apply to matching document
369
+ ``updatePipeline``: Update pipeline to apply to matching document
370
370
371
- ``options``: (optional) defines options to apply when updating document
371
+ ``options``: (optional) Options to apply when updating document
372
372
373
- One of ``update`` or ``updatePipeline`` must be specified.
373
+ You must pass a value for either the ``update`` or ``updatePipeline``
374
+ parameter.
374
375
375
376
* - ``ClientNamespacedUpdateManyModel``
376
377
- ``updateMany()``
377
378
- Creates a model to update all documents in the ``namespace`` that match
378
379
``filter``.
379
- - ``namespace``: defines which database and collection to write to
380
+ - ``namespace``: Database and collection to write to
380
381
381
- ``filter``: defines filter that selects which documents to update
382
+ ``filter``: Filter that selects which documents to update
382
383
383
- ``update``: defines update to apply to matching documents
384
+ ``update``: Update to apply to matching documents
384
385
385
- ``updatePipeline``: defines update pipeline to apply to matching documents
386
+ ``updatePipeline``: Update pipeline to apply to matching documents
386
387
387
- ``options``: (optional) defines options to apply when updating documents
388
+ ``options``: (optional) Options to apply when updating documents
388
389
389
- One of ``update`` or ``updatePipeline`` must be specified.
390
+ You must pass a value for either the ``update`` or ``updatePipeline``
391
+ parameter.
390
392
391
393
* - ``ClientNamespacedReplaceOneModel``
392
394
- ``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
394
396
matches ``filter``.
395
- - ``namespace``: defines which database and collection to write to
397
+ - ``namespace``: Database and collection to write to
396
398
397
- ``filter``: defines filter that selects which document to replace
399
+ ``filter``: Filter that selects which document to replace
398
400
399
- ``replacement``: defines replacement document
401
+ ``replacement``: Replacement document
400
402
401
- ``options``: (optional) defines options to apply when replacing documents
403
+ ``options``: (optional) Options to apply when replacing documents
402
404
403
405
* - ``ClientNamespacedDeleteOneModel``
404
406
- ``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
406
408
matches ``filter``.
407
- - ``namespace``: defines which database and collection to write to
409
+ - ``namespace``: Database and collection to write to
408
410
409
- ``filter``: defines filter that selects which document to delete
411
+ ``filter``: Filter that selects which document to delete
410
412
411
- ``option``: (optional) defines options to apply when deleting document
413
+ ``option``: (optional) Options to apply when deleting document
412
414
413
415
* - ``ClientNamespacedDeleteManyModel``
414
416
- ``deleteMany()``
415
417
- Creates a model to delete all documents in the ``namespace`` that match
416
418
``filter``.
417
- - ``namespace``: defines which database and collection to write to
419
+ - ``namespace``: Database and collection to write to
418
420
419
- ``filter``: defines filter that selects which documents to delete
421
+ ``filter``: Filter that selects which documents to delete
420
422
421
- ``option``: (optional) defines options to apply when deleting documents
423
+ ``option``: (optional) Options to apply when deleting documents
422
424
423
425
The following sections provide examples of how to use the client ``bulkWrite()``
424
426
method.
0 commit comments