Bulk Operation Methods
This version of the documentation is archived and no longer
supported. View the current documentation to learn how to
upgrade your version of MongoDB.
Note
For details on a specific method, including syntax and examples, click on the link to the method's reference page.
Tip
Starting in version 3.2, MongoDB also provides the
db.collection.bulkWrite()
method for performing bulk
write operations.
Name | Description |
---|---|
Initializes a Bulk() operations builder for an ordered list of operations. | |
Initializes a Bulk() operations builder for an unordered list of operations. | |
Bulk operations builder. | |
Executes a list of operations in bulk. | |
Specifies the query condition for an update or a remove operation. | |
Specifies the filters that determine which elements of an array to update for an update or updateOne operation. | |
Specifies the collation for the query condition. | |
Specifies the index to use for the update/replace operation. | |
Adds a multiple document remove operation to a list of operations. | |
Adds a single document remove operation to a list of operations. | |
Adds a single document replacement operation to a list of operations. | |
Adds a single document update operation to a list of operations. | |
Adds a multi update operation to a list of operations. | |
Specifies upsert: true for an update operation. | |
Returns an array of write operations executed in the Bulk() operations object. | |
Adds an insert operation to a list of operations. | |
Returns a JSON document that contains the number of operations and batches in the Bulk() operations object. | |
Returns the Bulk.tojson() results as a string. |