update : 2015.11.03
php.shukuma.com검색:
|
MongoDB\Driver\Manager::executeBulkWrite(mongodb >=0.2.0) MongoDB\Driver\Manager::executeBulkWrite — Execute one or more write operations 설명
final public MongoDB\Driver\WriteResult MongoDB\Driver\Manager::executeBulkWrite
( string
$namespace
, MongoDB\Driver\BulkWrite $bulk
[, MongoDB\Driver\WriteConcern $writeConcern
] )Executes one or more write operations. A MongoDB\Driver\BulkWrite can be constructed with one or more write operations of varying types (e.g. updates, deletes, and inserts). The driver will attempt to send operations of the same type to the server in as few requests as possible to optimize round trips. 인수
반환값Returns MongoDB\Driver\WriteResult on success, throws exception (instanceof MongoDB\Driver\Exception) on failure. 오류/예외
예제Example #1 MongoDB\Driver\Manager::executeBulkWrite() example
<?php 위 예제의 출력 예시: Inserted 3 document(s) Matched 1 document(s) Updated 1 document(s) Upserted 2 document(s) Deleted 1 document(s) upsertedId[3]: object(MongoDB\BSON\ObjectID)#5 (1) { ["oid"]=> string(24) "54d3adc3ce7a792f4d703756" } upsertedId[4]: int(3) |