Added rewind behaviour and BinaryField to docs
This commit is contained in:
parent
92150e07d3
commit
d7086fc4a3
@ -54,6 +54,8 @@ Fields
|
||||
|
||||
.. autoclass:: mongoengine.ListField
|
||||
|
||||
.. autoclass:: mongoengine.BinaryField
|
||||
|
||||
.. autoclass:: mongoengine.ObjectIdField
|
||||
|
||||
.. autoclass:: mongoengine.ReferenceField
|
||||
|
@ -13,6 +13,13 @@ fetch documents from the database::
|
||||
for user in User.objects:
|
||||
print user.name
|
||||
|
||||
.. note::
|
||||
Once the iteration finishes (when :class:`StopIteration` is raised),
|
||||
:meth:`~mongoengine.queryset.QuerySet.rewind` will be called so that the
|
||||
:class:`~mongoengine.queryset.QuerySet` may be iterated over again. The
|
||||
results of the first iteration are *not* cached, so the database will be hit
|
||||
each time the :class:`~mongoengine.queryset.QuerySet` is iterated over.
|
||||
|
||||
Filtering queries
|
||||
=================
|
||||
The query may be filtered by calling the
|
||||
|
Loading…
x
Reference in New Issue
Block a user