Docs 菜单
Docs 主页
/ / /
PHP 库手册
/ /

MongoDB\BulkWriteCommandResult 类

MongoDB\BulkWriteCommandResult

此类包含有关已完成的客户端端批量写入操作的信息。它从MongoDB\Client::bulkWrite() 返回。

方法
说明

getInsertedCount()

Returns the total number of documents inserted by all insert operations in the bulk write command.

getMatchedCount()

Returns the total number of documents matched by all update and replace operations in the bulk write command.

getModifiedCount()

Returns the total number of documents modified by all update and replace operations in the bulk write command.

getUpsertedCount()

Returns the total number of documents upserted by all update and replace operations in the bulk write command.

getDeletedCount()

Return the total number of documents deleted by all delete operations in the bulk write command.

getInsertResults()

Returns a map of results of each successful insert operation. Each operation is represented by an integer key, which contains a document with information corresponding to the operation such as the inserted _id value.

getUpdateResults()

Returns a map of results of each successful update operation. Each operation is represented by an integer key, which contains a document with information corresponding to the operation.

getDeleteResults()

Returns a map of results of each successful delete operation. Each operation is represented by an integer key, which contains a document with information corresponding to the operation.

isAcknowledged()

Returns a boolean indicating whether the server acknowledged the bulk operation.

要详细学习;了解执行客户端端批量写入操作时从服务器返回的信息,请参阅 Mongo.bulkWriteShell方法参考的 输出部分。

  • 批量写入操作指南的客户端批量写入部分

后退

结果类