Skip to content

DOCS: additional GLE return values #1230

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion source/reference/command/getLastError.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Definition
connection*. Clients typically use :dbcommand:`.getLastError` in
combination with write operations to ensure that the write succeeds.

.. include:: /reference/command/getLastError-field.rst
.. include:: /reference/command/getLastError-fields.rst

The following is the prototype form:

Expand Down Expand Up @@ -65,6 +65,18 @@ subset of the fields listed below.
removed, if the preceding operation was an update or remove
operation.

.. data:: getLastError.updateExisting

:data:`getLastError.updateExisting` is ``true`` for an update that
affects at least one document, but that does not result in an
:term:`upsert`.

.. data:: getLastError.upserted

:data:`getLastError.upserted` is an :term:`ObjectId <objectid>`
corresponding to the upserted document if the update resulted in an
upsert.

.. data:: getLastError.wnote

If set, ``wnote`` indicates that the preceding operation's error
Expand Down