OPTIONS
翻译或纠错本页面

db.getLastErrorObj()

db.getLastErrorObj()

在 2.6 版更改: A new protocol for write operations integrates write concerns with the write operations, eliminating the need for a separate db.getLastError() method. Write methods now return the status of the write operation, including error information.

In previous versions, clients typically used the db.getLastError() method in combination with the write operations to ensure that the write succeeds.

返回:A full document with status information.
ON THIS PAGE