Join us Sept 17 at .local NYC! Use code WEB50 to save 50% on tickets. Learn more >
MongoDB Event
Docs 菜单
Docs 主页
/
MongoDB Manual
/ / /

getLastError

getLastError

已在 MongoDB 5.1 中删除。

任何显式使用 getLastErrordb.getLastError()db.getLastErrorObj() 的代码都应使用CRUD API来发出带有所需 写入写关注(write concern)的写入操作。 有关写入操作是成功还是失败的信息将由驾驶员直接作为返回值提供。

此命令可用于以下环境中托管的部署:

  • MongoDB Enterprise:基于订阅、自我管理的 MongoDB 版本

  • MongoDB Community:源代码可用、免费使用且可自行管理的 MongoDB 版本

重要

后退

findAndModify

在此页面上