Results of 1 - 10 of about 13 for getInsertedCount (0.001 sec.)
- MongoDB\Driver\BulkWriteCommandResult::getInsertedCount — Returns the number of... 12686
- MongoDB\Driver\BulkWriteCommandResult::getInsertedCount (mongodb >=2.1.0) MongoDB\Driver\BulkWriteCommandResult::getInsertedCount — Returns the number of documents inserted 説明 final public function MongoDB\Driver\BulkWriteCommandResult::getInsertedCount
... s MongoDB\Driver\Exception\LogicException if the write was not acknowledged. 例 例1 MongoDB\Driver\BulkWriteCommandResult::getInsertedCount() example <?php $manager = new MongoDB\Driver\Manager ; $bulk = new MongoDB\Driver\BulkWriteCommand ; $bulk -> insertOne ( ... ]); $bulk -> deleteMany ( 'db.coll' , []); $result = $manager -> executeBulkWriteCommand ( $bulk ); var_dump ( $result -> getInsertedCount ()); ?> 上の例の出力は以下となります。 int(1) 参考 MongoDB\Driver\BulkWriteCommandResult::getInsertResults() - Returns ver ...
-
https://man.mtool.work/php/8.3/mongodb-driver-bulkwritecommandresult.getinserted...
- MongoDB\Driver\WriteResult::getInsertedCount — Returns the number of documents ... 12598
- MongoDB\Driver\WriteResult::getInsertedCount (mongodb >=1.0.0) MongoDB\Driver\WriteResult::getInsertedCount — Returns the number of documents inserted (excluding upserts) 説明 final public function MongoDB\Driver\WriteResult::getInsertedCount
... throws an exception when called for an unacknowledged write instead of returning null . 例 例1 MongoDB\Driver\WriteResult::getInsertedCount() example <?php $manager = new MongoDB\Driver\Manager ; $bulk = new MongoDB\Driver\BulkWrite ; $bulk -> insert ([ 'x' => 1 ... $bulk -> delete ([ 'x' => 1 ]); $result = $manager -> executeBulkWrite ( 'db.collection' , $bulk ); var_dump ( $result -> getInsertedCount ()); ?> 上の例の出力は以下となります。 int(1) 参考 MongoDB\Driver\WriteResult::isAcknowledged() - Returns whether the writ ...
-
https://man.mtool.work/php/8.3/mongodb-driver-writeresult.getinsertedcount.html
- The MongoDB\Driver\BulkWriteCommandResult class | PHP 8.3 9396
- The MongoDB\Driver\BulkWriteCommandResult class (mongodb >=2.1.0) はじめに The MongoDB\Driver\BulkWriteCommandResult class encapsulates information about an executed MongoDB\Driver\BulkWriteCommand and is returned by MongoDB\Driver\Manager:
... function getDeletedCount (): int final public function getDeleteResults (): ? MongoDB\BSON\Document final public function getInsertedCount (): int final public function getInsertResults (): ? MongoDB\BSON\Document final public function getMatchedCount (): int f ... iteCommandResult::getDeleteResults — Returns verbose results for successful deletes MongoDB\Driver\BulkWriteCommandResult::getInsertedCount — Returns the number of documents inserted MongoDB\Driver\BulkWriteCommandResult::getInsertResults — Returns verbose resul ...
-
https://man.mtool.work/php/8.3/class.mongodb-driver-bulkwritecommandresult.html
- MongoDB\Driver\Exception\BulkWriteCommandException::getPartialResult — Returns ... 8991
- MongoDB\Driver\Exception\BulkWriteCommandException::getPartialResult (mongodb >=2.1.0) MongoDB\Driver\Exception\BulkWriteCommandException::getPartialResult — Returns the result of any successful write operations 説明 final public function M
... ( MongoDB\Driver\Exception\BulkWriteCommandException $e ) { $result = $e -> getPartialResult (); } var_dump ( $result ?-> getInsertedCount ()); ?> 上の例の出力は以下となります。 int(1) 例2 No partial result if no writes are successful <?php $manager = new Mongo ... ( MongoDB\Driver\Exception\BulkWriteCommandException $e ) { $result = $e -> getPartialResult (); } var_dump ( $result ?-> getInsertedCount ()); ?> 上の例の出力は以下となります。 NULL 参考 MongoDB\Driver\BulkWriteCommandResult MongoDB\Driver\Manager::executeBulk ...
-
https://man.mtool.work/php/8.3/mongodb-driver-bulkwritecommandexception.getparti...
- The MongoDB\Driver\WriteResult class | PHP 8.3 8692
- The MongoDB\Driver\WriteResult class (mongodb >=1.0.0) はじめに The MongoDB\Driver\WriteResult class encapsulates information about an executed MongoDB\Driver\BulkWrite and may be returned by MongoDB\Driver\Manager::executeBulkWrite() . クラ
... public readonly array $ errorReplies ; /* メソッド */ final public function getDeletedCount (): int final public function getInsertedCount (): int final public function getMatchedCount (): int final public function getModifiedCount (): int final public function ... es. 目次 MongoDB\Driver\WriteResult::getDeletedCount — Returns the number of documents deleted MongoDB\Driver\WriteResult::getInsertedCount — Returns the number of documents inserted (excluding upserts) MongoDB\Driver\WriteResult::getMatchedCount — Returns the n ...
-
https://man.mtool.work/php/8.3/class.mongodb-driver-writeresult.html
- MongoDB\Driver\Manager::executeBulkWriteCommand — Execute write operations usin... 8393
- MongoDB\Driver\Manager::executeBulkWriteCommand (mongodb >=2.1.0) MongoDB\Driver\Manager::executeBulkWriteCommand — Execute write operations using the bulkWrite command 説明 final public function MongoDB\Driver\Manager::executeBulkWriteComm
... [ 'x' => 1 ]]); $result = $manager -> executeBulkWriteCommand ( $bulk ); printf ( "Inserted %d document(s)\n" , $result -> getInsertedCount ()); printf ( "Updated %d document(s)\n" , $result -> getModifiedCount ()); ?> 上の例の出力は以下となります。 Inserted 3 d ... sult = $e -> getPartialResult (); var_dump ( $e -> getWriteErrors ()); } printf ( "Inserted %d document(s)\n" , $result -> getInsertedCount ()); ?> 上の例の出力は、 たとえば以下のようになります。 array(1) { [3]=> object(MongoDB\Driver\WriteError)#5 (4) { ["messa ...
-
https://man.mtool.work/php/8.3/mongodb-driver-manager.executebulkwritecommand.ht...
- The MongoDB\Driver\BulkWriteCommand class | PHP 8.3 8287
- The MongoDB\Driver\BulkWriteCommand class (mongodb >=2.1.0) はじめに MongoDB\Driver\BulkWriteCommand collects one or more write operations that should be sent to the server using the » bulkWrite command introduced in MongoDB 8.0. After addi
... [ 'x' => 1 ]]); $result = $manager -> executeBulkWriteCommand ( $bulk ); printf ( "Inserted %d document(s)\n" , $result -> getInsertedCount ()); printf ( "Updated %d document(s)\n" , $result -> getModifiedCount ()); ?> 上の例の出力は以下となります。 Inserted 3 d ... sult = $e -> getPartialResult (); var_dump ( $e -> getWriteErrors ()); } printf ( "Inserted %d document(s)\n" , $result -> getInsertedCount ()); ?> 上の例の出力は、 たとえば以下のようになります。 array(1) { [3]=> object(MongoDB\Driver\WriteError)#5 (4) { ["messa ...
-
https://man.mtool.work/php/8.3/class.mongodb-driver-bulkwritecommand.html
- MongoDB\Driver\BulkWriteCommand::__construct — Create a new BulkWriteCommand | ... 7794
- MongoDB\Driver\BulkWriteCommand::__construct (mongodb >=2.1.0) MongoDB\Driver\BulkWriteCommand::__construct — Create a new BulkWriteCommand 説明 public function MongoDB\Driver\BulkWriteCommand::__construct ( ? array $options = null ) Constr
... [ 'x' => 1 ]]); $result = $manager -> executeBulkWriteCommand ( $bulk ); printf ( "Inserted %d document(s)\n" , $result -> getInsertedCount ()); printf ( "Updated %d document(s)\n" , $result -> getModifiedCount ()); ?> 上の例の出力は以下となります。 Inserted 3 d ...
-
https://man.mtool.work/php/8.3/mongodb-driver-bulkwritecommand.construct.html
- MongoDB\Driver\BulkWriteCommandResult::getInsertResults — Returns verbose resul... 7794
- MongoDB\Driver\BulkWriteCommandResult::getInsertResults (mongodb >=2.1.0) MongoDB\Driver\BulkWriteCommandResult::getInsertResults — Returns verbose results for successful inserts 説明 final public function MongoDB\Driver\BulkWriteCommandRes
... B\BSON\ObjectId)#6 (1) { ["oid"]=> string(24) "67f7ee69783dcce702097b41" } } } 参考 MongoDB\Driver\BulkWriteCommandResult::getInsertedCount() - Returns the number of documents inserted MongoDB\Driver\BulkWriteCommandResult::isAcknowledged() - Returns whether the ...
-
https://man.mtool.work/php/8.3/mongodb-driver-bulkwritecommandresult.getinsertre...
- MongoDB\Driver\BulkWrite::__construct — Create a new BulkWrite | PHP 8.3 7583
- MongoDB\Driver\BulkWrite::__construct (mongodb >=1.0.0) MongoDB\Driver\BulkWrite::__construct — Create a new BulkWrite 説明 public function MongoDB\Driver\BulkWrite::__construct ( ? array $options = null ) Constructs a new MongoDB\Driver\Bu
... tion $e ) { printf ( "Other error: %s\n" , $e -> getMessage ()); exit; } printf ( "Inserted %d document(s)\n" , $result -> getInsertedCount ()); printf ( "Updated %d document(s)\n" , $result -> getModifiedCount ()); printf ( "Upserted %d document(s)\n" , $result ...
-
https://man.mtool.work/php/8.3/mongodb-driver-bulkwrite.construct.html