|
MongoDB\Driver\BulkWriteCommand::__constructCreate a new BulkWriteCommand Description
public MongoDB\Driver\BulkWriteCommand::__construct(arraynull
$options = null )Constructs a new MongoDB\Driver\BulkWriteCommand, which may be used to perform many insert, update, and delete operations on multiple collections in a single request using the » bulkWrite command introduced in MongoDB 8.0. This differs from MongoDB\Driver\BulkWrite, which is supported by all server versions but limited to a single collection. After all write operations have been added, this object may be executed with MongoDB\Driver\Manager::executeBulkWriteCommand. Parameters
Errors/Exceptions
ExamplesExample #1 MongoDB\Driver\BulkWriteCommand::__construct example
The above example will output: Inserted 3 document(s) Updated 1 document(s) See Also
|