PHP Class MongoWriteBatch

See also: http://php.net/manual/en/class.mongowritebatch.php
Inheritance: use trait Alcaeus\MongoDbAdapter\Helper\WriteConcernConverter
Afficher le fichier Open project: alcaeus/mongo-php-adapter Class Usage Examples

Méthodes publiques

Méthode Description
add ( array | object $item ) : boolean Adds a write operation to a batch
execute ( array $writeOptions = [] ) : array Executes a batch of write operations

Méthodes protégées

Méthode Description
__construct ( MongoCollection $collection, integer $batchType, array $writeOptions ) Creates a new batch of write operations

Private Methods

Méthode Description
addItem ( array $item )
convertWriteErrors ( MongoDB\Driver\WriteResult $result ) : array
validate ( array $item )

Method Details

__construct() protected méthode

Creates a new batch of write operations
See also: http://php.net/manual/en/mongowritebatch.construct.php
protected __construct ( MongoCollection $collection, integer $batchType, array $writeOptions )
$collection MongoCollection
$batchType integer
$writeOptions array

add() public méthode

Adds a write operation to a batch
See also: http://php.net/manual/en/mongowritebatch.add.php
public add ( array | object $item ) : boolean
$item array | object
Résultat boolean

execute() final public méthode

Executes a batch of write operations
See also: http://php.net/manual/en/mongowritebatch.execute.php
final public execute ( array $writeOptions = [] ) : array
$writeOptions array
Résultat array