The MongoDB\Driver\WriteResult class

(mongodb >=1.0.0)

Giriş

The MongoDB\Driver\WriteResult class encapsulates information about an executed MongoDB\Driver\BulkWrite and may be returned by MongoDB\Driver\Manager::executeBulkWrite().

Sınıf Sözdizimi

final class MongoDB\Driver\WriteResult {
/* Özellikler */
public readonly ?int $insertedCount;
public readonly ?int $matchedCount;
public readonly ?int $modifiedCount;
public readonly ?int $deletedCount;
public readonly ?int $upsertedCount;
public readonly array $upsertedIds;
public readonly array $writeErrors;
public readonly array $errorReplies;
/* Yöntemler */
final public getDeletedCount(): int
final public getInsertedCount(): int
final public getMatchedCount(): int
final public getModifiedCount(): int
final public getUpsertedCount(): int
final public getUpsertedIds(): array
final public getWriteErrors(): array
final public isAcknowledged(): bool
}

Özellikler

insertedCount
The number of documents inserted (excluding upserts), or null if the write concern did not request acknowledgement.
matchedCount
The number of documents matched by update and replace operations, or null if the write concern did not request acknowledgement.
modifiedCount
The number of documents modified by update and replace operations, or null if the write concern did not request acknowledgement or if the server did not report this information.
deletedCount
The number of documents deleted, or null if the write concern did not request acknowledgement.
upsertedCount
The number of documents upserted, or null if the write concern did not request acknowledgement.
server
The server that executed the bulk write.
upsertedIds
An array of _id values for upserted documents. Array keys will correspond to the index of the write operation from MongoDB\Driver\BulkWrite.
writeErrors
An array of MongoDB\Driver\WriteErrors for any write errors that occurred during execution.
writeConcernError
The MongoDB\Driver\WriteConcernError that occurred, or null if no write concern error occurred.
writeConcern
The MongoDB\Driver\WriteConcern used for the bulk write, or null if not available.
errorReplies
An array of error reply documents from the server.

Sürüm Bilgisi

Sürüm: Açıklama
PECL mongodb 2.3.0 Added public readonly properties.

İçindekiler