array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'uk', ), 'this' => array ( 0 => 'mongodb-driver-server.executebulkwritecommand.php', 1 => 'MongoDB\\Driver\\Server::executeBulkWriteCommand', 2 => 'Execute write operations on this server using the bulkWrite command', ), 'up' => array ( 0 => 'class.mongodb-driver-server.php', 1 => 'MongoDB\\Driver\\Server', ), 'prev' => array ( 0 => 'mongodb-driver-server.executebulkwrite.php', 1 => 'MongoDB\\Driver\\Server::executeBulkWrite', ), 'next' => array ( 0 => 'mongodb-driver-server.executecommand.php', 1 => 'MongoDB\\Driver\\Server::executeCommand', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/mongodb/mongodb/driver/server/executebulkwritecommand.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>
(mongodb >=2.1.0)
MongoDB\Driver\Server::executeBulkWriteCommand — Execute write operations on this server using the bulkWrite command
$bulk, ?array $options = null): MongoDB\Driver\BulkWriteCommandResultExecutes one or more write operations on this server using the » bulkWrite command introduced in MongoDB 8.0.
A MongoDB\Driver\BulkWriteCommand can be constructed with one or more write operations of varying types (e.g. inserts, updates, and deletes). Each write operation may target a different collection.
The default value for the "writeConcern" option will be
inferred from an active transaction (indicated by the
"session" option), followed by the
connection URI.
bulk (MongoDB\Driver\BulkWriteCommand)options
| Option | Type | Description |
|---|---|---|
| session | MongoDB\Driver\Session |
Сеанс, по'язаний з операцією. |
| writeConcern | MongoDB\Driver\WriteConcern |
Вимога щодо запису. |
Returns MongoDB\Driver\BulkWriteCommandResult on success.
bulk does not contain any write operations.bulk has already been executed. MongoDB\Driver\BulkWriteCommand objects may not be executed multiple times."session", а вимога щодо запису не задоволена, викидається
MongoDB\Driver\Exception\InvalidArgumentException.