WriteResult
final class WriteResult (View source)
The MongoDB\Driver\WriteResult class encapsulates information about an executed MongoDB\Driver\BulkWrite and may be returned by MongoDB\Driver\Manager::executeBulkWrite().
Methods
No description
Returns the number of documents deleted. Throws an exception if the write was unacknowledged
Returns the number of documents inserted (excluding upserts). Throws an exception if the write was unacknowledged
Returns the number of documents selected for update. Throws an exception if the write was unacknowledged
Returns the number of existing documents updated. Throws an exception if the write was unacknowledged
Returns the number of documents inserted by an upsert. Throws an exception if the write was unacknowledged
Returns an array of identifiers for upserted documents
Returns any write concern error that occurred
Returns any write errors that occurred
No description
Returns whether the write was acknowledged
Details
final
__wakeup()
No description
final int
getDeletedCount()
Returns the number of documents deleted. Throws an exception if the write was unacknowledged
final int
getInsertedCount()
Returns the number of documents inserted (excluding upserts). Throws an exception if the write was unacknowledged
final int
getMatchedCount()
Returns the number of documents selected for update. Throws an exception if the write was unacknowledged
final int
getModifiedCount()
Returns the number of existing documents updated. Throws an exception if the write was unacknowledged
final Server
getServer()
Returns the server associated with this write result
final int
getUpsertedCount()
Returns the number of documents inserted by an upsert. Throws an exception if the write was unacknowledged
final array
getUpsertedIds()
Returns an array of identifiers for upserted documents
final WriteConcernError|null
getWriteConcernError()
Returns any write concern error that occurred
final array
getWriteErrors()
Returns any write errors that occurred
final array
getErrorReplies()
No description
final bool
isAcknowledged()
Returns whether the write was acknowledged