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

__wakeup()

No description

int|null
getDeletedCount()

Returns the number of documents deleted

int|null
getInsertedCount()

Returns the number of documents inserted (excluding upserts)

int|null
getMatchedCount()

Returns the number of documents selected for update

int|null
getModifiedCount()

Returns the number of existing documents updated

getServer()

Returns the server associated with this write result

int|null
getUpsertedCount()

Returns the number of documents inserted by an upsert

array
getUpsertedIds()

Returns an array of identifiers for upserted documents

WriteConcernError|null
getWriteConcernError()

Returns any write concern error that occurred

array
getWriteErrors()

Returns any write errors that occurred

array
getErrorReplies()

No description

bool
isAcknowledged()

Returns whether the write was acknowledged

Details

final __wakeup()

No description

final int|null getDeletedCount()

Returns the number of documents deleted

Return Value

int|null

final int|null getInsertedCount()

Returns the number of documents inserted (excluding upserts)

Return Value

int|null

final int|null getMatchedCount()

Returns the number of documents selected for update

Return Value

int|null

final int|null getModifiedCount()

Returns the number of existing documents updated

Return Value

int|null

final Server getServer()

Returns the server associated with this write result

Return Value

Server

final int|null getUpsertedCount()

Returns the number of documents inserted by an upsert

Return Value

int|null

final array getUpsertedIds()

Returns an array of identifiers for upserted documents

Return Value

array

final WriteConcernError|null getWriteConcernError()

Returns any write concern error that occurred

Return Value

WriteConcernError|null

final array getWriteErrors()

Returns any write errors that occurred

Return Value

array

final array getErrorReplies()

Since: 1.16.0

No description

Return Value

array

final bool isAcknowledged()

Returns whether the write was acknowledged

Return Value

bool