Documentation

ClientBulkWriteCommand
in package

FinalYes

Operation for executing multiple write operations via the bulkWrite command.

Tags
see
Client::bulkWrite()

Table of Contents

Properties

$bulkWriteCommand  : BulkWriteCommand
$options  : array<string|int, mixed>

Methods

__construct()  : mixed
Constructs a client-level bulk write operation.
execute()  : BulkWriteCommandResult
Execute the operation.

Properties

Methods

__construct()

Constructs a client-level bulk write operation.

public __construct(BulkWriteCommand $bulkWriteCommand[, array<string|int, mixed> $options = [] ]) : mixed

Most options for the bulkWrite command and its write operations are specified when building the extension's BulkWriteCommand object. This operation only accepts options for Server::executeBulkWriteCommand().

Supported options:

  • session (MongoDB\Driver\Session): Client session.

  • writeConcern (MongoDB\Driver\WriteConcern): Write concern.

Parameters
$bulkWriteCommand : BulkWriteCommand

Assembled bulk write command

$options : array<string|int, mixed> = []

Command options

Tags
throws
InvalidArgumentException

for parameter/option parsing errors

execute()

Execute the operation.

public execute(Server $server) : BulkWriteCommandResult
Parameters
$server : Server
Tags
throws
UnsupportedException

if write concern is used and unsupported

throws
RuntimeException

for other driver errors (e.g. connection errors)

Return values
BulkWriteCommandResult

        
On this page

Search results