Skip to content

Commit e46779f

Browse files
Docs, queryset.update: full_result-arg not clearly described
The documentation for the `full_result`-argument to `queryset.update()` can be read as returning the update documents/objects, whereas it's really returning just the full "PyMongo result dictionary". This commit adds some wording and an example dictionary, to make it clear what the behavior is.
1 parent dabe8c1 commit e46779f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

mongoengine/queryset/base.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -486,8 +486,9 @@ def update(self, upsert=False, multi=True, write_concern=None,
486486
``save(..., write_concern={w: 2, fsync: True}, ...)`` will
487487
wait until at least two servers have recorded the write and
488488
will force an fsync on the primary server.
489-
:param full_result: Return the full result rather than just the number
490-
updated.
489+
:param full_result: Return the full result dictionary rather than just the number
490+
updated, e.g. return
491+
`{u'n': 2, u'nModified': 2, u'ok': 1.0, 'updatedExisting': True}`.
491492
:param update: Django-style update keyword arguments
492493
493494
.. versionadded:: 0.2

0 commit comments

Comments
 (0)