定义
MongoDB\BulkWriteResult::getModifiedCount()返回批量写入中所有更新和替换操作修改的文档总数。
function getModifiedCount(): integer 仅当写入已确认时才应调用此方法。
注意
如果更新/替换操作没有导致文档发生任何更改(例如 将字段的值设置为当前值)时,修改后的计数可能小于
getMatchedCount()返回的值。
Return Values
批量写入中所有更新和替换操作修改的文档总数。
错误/异常
MongoDB\Exception\BadMethodCallException if this method is called and the write operation used an unacknowledged write concern.