@@ -337,26 +337,29 @@ For example, an instance of ``ClientNamespacedInsertOneModel`` represents an
337
337
operation to insert one document.
338
338
339
339
You can construct instances of the ``ClientNamespacedWriteModel`` interface by using
340
- instance methods described in the table below. These methods take a
340
+ instance methods. The models and their corresponding instance methods are described
341
+ in the table below. These methods take a
341
342
``MongoNamespace`` object that defines which database and collection to write to.
342
343
343
344
.. list-table::
344
345
:header-rows: 1
345
346
346
- * - Instance Method
347
- - Class Constructed
347
+ * - Model
348
+ - Instance Method
349
+ - Description
348
350
- Parameters
349
- - Operation Description
350
351
351
- * - ``insertOne()``
352
- - ``ClientNamespacedInsertOneModel``
353
- - ``namespace``: defines which database and collection to write to
352
+ * - ``ClientNamespacedInsertOneModel``
353
+ - ``insertOne()``
354
+ - Creates a model to insert a document into the ``namespace``.
355
+ - ``namespace``: defines which database and collection to write to
354
356
355
- ``document``: defines the document to insert
356
- - Creates a model to insert a document into the ``namespace``.
357
+ ``document``: defines the document to insert
357
358
358
- * - ``updateOne()``
359
- - ``ClientNamespacedInsertOneModel``
359
+ * - ``ClientNamespacedUpdateOneModel``
360
+ - ``updateOne()``
361
+ - Creates a model to update at most one document in the ``namespace``
362
+ that matches ``filter``.
360
363
- ``namespace``: defines which database and collection to write to
361
364
362
365
``filter``: defines filter that selects which document to update
@@ -368,11 +371,11 @@ instance methods described in the table below. These methods take a
368
371
``options``: (optional) defines options to apply when updating document
369
372
370
373
One of ``update`` or ``updatePipeline`` must be specified.
371
- - Creates a model to update at most one document in the ``namespace``
372
- that matches ``filter``.
373
374
374
- * - ``updateMany()``
375
- - ``ClientNamespacedUpdateManyModel``
375
+ * - ``ClientNamespacedUpdateManyModel``
376
+ - ``updateMany()``
377
+ - Creates a model to update all documents in the ``namespace`` that match
378
+ ``filter``.
376
379
- ``namespace``: defines which database and collection to write to
377
380
378
381
``filter``: defines filter that selects which documents to update
@@ -384,36 +387,38 @@ instance methods described in the table below. These methods take a
384
387
``options``: (optional) defines options to apply when updating documents
385
388
386
389
One of ``update`` or ``updatePipeline`` must be specified.
387
- - Updates all documents in the ``namespace`` that match ``filter``.
388
390
389
- * - ``replaceOne()``
390
- - ``ClientNamespacedReplaceOneModel``
391
+ * - ``ClientNamespacedReplaceOneModel``
392
+ - ``replaceOne()``
393
+ - Creates a model to replace at most one document in the ``namespace`` that
394
+ matches ``filter``.
391
395
- ``namespace``: defines which database and collection to write to
392
396
393
397
``filter``: defines filter that selects which document to replace
394
398
395
399
``replacement``: defines replacement document
396
400
397
401
``options``: (optional) defines options to apply when replacing documents
398
- - Replaces at most one document in the ``namespace`` that matches ``filter``.
399
402
400
- * - ``deleteOne()``
401
- - ``ClientNamespacedDeleteOneModel``
403
+ * - ``ClientNamespacedDeleteOneModel``
404
+ - ``deleteOne()``
405
+ - Creates a model to delete at most one document in the ``namespace`` that
406
+ matches ``filter``.
402
407
- ``namespace``: defines which database and collection to write to
403
408
404
409
``filter``: defines filter that selects which document to delete
405
410
406
411
``option``: (optional) defines options to apply when deleting document
407
- - Deletes at most one document in the ``namespace`` that matches ``filter``.
408
412
409
- * - ``deleteMany()``
410
- - ``ClientNamespacedDeleteManyModel``
413
+ * - ``ClientNamespacedDeleteManyModel``
414
+ - ``deleteMany()``
415
+ - Creates a model to delete all documents in the ``namespace`` that match
416
+ ``filter``.
411
417
- ``namespace``: defines which database and collection to write to
412
418
413
419
``filter``: defines filter that selects which documents to delete
414
420
415
421
``option``: (optional) defines options to apply when deleting documents
416
- - Deletes all documents in the ``namespace`` that match ``filter``.
417
422
418
423
The following sections provide examples of how to use the client ``bulkWrite()``
419
424
method.
0 commit comments