Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Docs 菜单
Docs 主页
/ / /
PHP 库手册
/ / /

MongoDB\UpdateResult::getModifiedCount()

MongoDB\UpdateResult::getModifiedCount()

返回已修改文档的数量。

function getModifiedCount(): integer|null

仅当写入已确认时才应调用此方法。

注意

如果更新/替换操作没有导致文档发生任何更改(例如 将字段的值设置为其当前值)时,修改后的计数可能小于 getMatchedCount()返回的值。

已修改的文档数量。

MongoDB\Exception\BadMethodCallException如果调用此方法并且写入操作使用了未确认的写关注)。

后退

getMatchedCount()

在此页面上