MongoDB\ClientBulkWrite Class

For the complete MongoDB documentation index, see www.mongodb.com/docs/llms.txt

MongoDB\ClientBulkWrite Class

New in version 2.1

Definition

This class enables you to assemble a bulk write command that you pass to [MongoDB\Client::bulkWrite()](https://www.mongodb.com/docs/php-library/current/reference/method/mongodbclient-bulkwrite.md#mongodb-phpmethod-phpmethod.MongoDB-Client--bulkWrite-- to perform write operations across multiple namespaces.

ClientBulkWrite is a builder class to create a BulkWriteCommand instance that the library sends to the server.

Methods

  • [MongoDB\ClientBulkWrite::createWithCollection()](https://www.mongodb.com/docs/php-library/current/reference/method/mongodbclientbulkwrite-createwithcollection.md#mongodb-phpmethod-phpmethod.MongoDB-ClientBulkWrite--createWithCollection--

  • [MongoDB\ClientBulkWrite::deleteMany()](https://www.mongodb.com/docs/php-library/current/reference/method/mongodbclientbulkwrite-deletemany.md#mongodb-phpmethod-phpmethod.MongoDB-ClientBulkWrite--deleteMany--

  • [MongoDB\ClientBulkWrite::deleteOne()](https://www.mongodb.com/docs/php-library/current/reference/method/mongodbclientbulkwrite-deleteone.md#mongodb-phpmethod-phpmethod.MongoDB-ClientBulkWrite--deleteOne--

  • [MongoDB\ClientBulkWrite::insertOne()](https://www.mongodb.com/docs/php-library/current/reference/method/mongodbclientbulkwrite-insertone.md#mongodb-phpmethod-phpmethod.MongoDB-ClientBulkWrite--insertOne--

  • [MongoDB\ClientBulkWrite::replaceOne()](https://www.mongodb.com/docs/php-library/current/reference/method/mongodbclientbulkwrite-replaceone.md#mongodb-phpmethod-phpmethod.MongoDB-ClientBulkWrite--replaceOne--

  • [MongoDB\ClientBulkWrite::updateMany()](https://www.mongodb.com/docs/php-library/current/reference/method/mongodbclientbulkwrite-updatemany.md#mongodb-phpmethod-phpmethod.MongoDB-ClientBulkWrite--updateMany--

  • [MongoDB\ClientBulkWrite::updateOne()](https://www.mongodb.com/docs/php-library/current/reference/method/mongodbclientbulkwrite-updateone.md#mongodb-phpmethod-phpmethod.MongoDB-ClientBulkWrite--updateOne--

  • [MongoDB\ClientBulkWrite::withCollection()](https://www.mongodb.com/docs/php-library/current/reference/method/mongodbclientbulkwrite-withcollection.md#mongodb-phpmethod-phpmethod.MongoDB-ClientBulkWrite--withCollection--

See Also

  • [Client Bulk Write](https://www.mongodb.com/docs/php-library/current/crud/bulk-write.md#std-label-php-client-bulk-write section of the Bulk Write Operations guide