|
MongoDB\Driver\BulkWriteCommandResult::getUpdateResultsReturns verbose results for successful updates Description
final public MongoDB\BSON\Documentnull MongoDB\Driver\BulkWriteCommandResult::getUpdateResults()
ParametersThis function has no parameters. Return Values
Returns a document containing the result of each successful update
operation, or Errors/Exceptions
ExamplesExample #1 MongoDB\Driver\BulkWriteCommandResult::getUpdateResults example The above example will output something similar to:
object(stdClass)#16 (3) {
["1"]=>
object(stdClass)#7 (2) {
["matchedCount"]=>
object(MongoDB\BSON\Int64)#5 (1) {
["integer"]=>
string(1) "1"
}
["modifiedCount"]=>
object(MongoDB\BSON\Int64)#6 (1) {
["integer"]=>
string(1) "1"
}
}
["2"]=>
object(stdClass)#11 (3) {
["matchedCount"]=>
object(MongoDB\BSON\Int64)#8 (1) {
["integer"]=>
string(1) "1"
}
["modifiedCount"]=>
object(MongoDB\BSON\Int64)#9 (1) {
["integer"]=>
string(1) "0"
}
["upsertedId"]=>
object(MongoDB\BSON\ObjectId)#10 (1) {
["oid"]=>
string(24) "67f7eb9b1f198bbcb880d575"
}
}
["3"]=>
object(stdClass)#15 (3) {
["matchedCount"]=>
object(MongoDB\BSON\Int64)#12 (1) {
["integer"]=>
string(1) "1"
}
["modifiedCount"]=>
object(MongoDB\BSON\Int64)#13 (1) {
["integer"]=>
string(1) "0"
}
["upsertedId"]=>
object(MongoDB\BSON\ObjectId)#14 (1) {
["oid"]=>
string(24) "67f7eb9b1f198bbcb880d576"
}
}
}
See Also
|