BulkWriteCommandResult
final class BulkWriteCommandResult (View source)
The MongoDB\Driver\BulkWriteCommandResult class encapsulates information about an executed MongoDB\Driver\BulkWriteCommand and is returned by MongoDB\Driver\Manager::executeBulkWriteCommand().
Methods
Returns the number of documents inserted
Returns the number of documents selected for update
Returns the number of existing documents updated
Returns the number of documents upserted
Returns the number of documents deleted
Returns verbose results for successful inserts
Returns verbose results for successful updates
Returns verbose results for successful deletes
Returns whether the write was acknowledged
Details
final int
getInsertedCount()
Returns the number of documents inserted
final int
getMatchedCount()
Returns the number of documents selected for update
If the update operation results in no change to the document (e.g. setting the value of a field to its current value), the matched count may be greater than the value returned by MongoDB\Driver\BulkWriteCommandResult::getModifiedCount().
final int
getModifiedCount()
Returns the number of existing documents updated
If the update operation results in no change to the document (e.g. setting the value of a field to its current value), the modified count may be less than the value returned by MongoDB\Driver\BulkWriteCommandResult::getMatchedCount().
final int
getUpsertedCount()
Returns the number of documents upserted
final int
getDeletedCount()
Returns the number of documents deleted
final Document|null
getInsertResults()
Returns verbose results for successful inserts
final Document|null
getUpdateResults()
Returns verbose results for successful updates
final Document|null
getDeleteResults()
Returns verbose results for successful deletes
final bool
isAcknowledged()
Returns whether the write was acknowledged
If the write is acknowledged, other fields will be available on the MongoDB\Driver\BulkWriteCommandResult object.