- Reference >
mongo
Shell Methods >- Bulk Operation Methods
Bulk Operation Methods¶
New in version 2.6.
Note
For details on specific methods, including syntax and examples, click on the specific method to go to its reference page.
Name | Description |
---|---|
Bulk() |
Bulk operations builder. |
db.collection.initializeOrderedBulkOp() |
Initializes a Bulk() operations builder for an ordered list of operations. |
db.collection.initializeUnorderedBulkOp() |
Initializes a Bulk() operations builder for an unordered list of operations. |
Bulk.insert() |
Adds an insert operation to a list of operations. |
Bulk.find() |
Specifies the query condition for an update or a remove operation. |
Bulk.find.removeOne() |
Adds a single document remove operation to a list of operations. |
Bulk.find.remove() |
Adds a multiple document remove operation to a list of operations. |
Bulk.find.replaceOne() |
Adds a single document replacement operation to a list of operations. |
Bulk.find.updateOne() |
Adds a single document update operation to a list of operations. |
Bulk.find.update() |
Adds a multi update operation to a list of operations. |
Bulk.find.upsert() |
Specifies upsert: true for an update operation. |
Bulk.execute() |
Executes a list of operations in bulk. |
Bulk.getOperations() |
Returns an array of write operations executed in the Bulk() operations object. |
Bulk.tojson() |
Returns a JSON document that contains the number of operations and batches in the Bulk() operations object. |
Bulk.toString() |
Returns the Bulk.tojson() results as a string. |