MongoWriteBatch::__construct
Creates a new batch of write operations
説明
protected MongoWriteBatch::__construct
( MongoCollection $collection
[, string $batch_type
[, array $write_options
]] )
注意:
This is a protected constructor. Please use one of the classes inheriting MongoWriteBatch.
パラメータ
-
collection
-
バッチを実行する MongoCollection。確認付き書き込み をコピーして、デフォルトとして使います。$write_options
で指定したり、 MongoWriteBatch::execute で指定したりすることもできます。
-
batch_type
-
One of:
- 0 - make an MongoWriteBatch::COMMAND_INSERT batch
- 1 - make an MongoWriteBatch::COMMAND_UPDATE batch
- 2 - make a MongoWriteBatch::COMMAND_DELETE batch
write_options
-
書き込みオプションの配列。
返り値
A new MongoWriteBatch of type batch_type
.
参考
- MongoInsertBatch
- MongoUpdateBatch
- MongoDeleteBatch