Added rewind behaviour and BinaryField to docs

This commit is contained in:
Harry Marr 2010-03-08 22:23:40 +00:00
parent 92150e07d3
commit d7086fc4a3
2 changed files with 9 additions and 0 deletions

View File

@ -54,6 +54,8 @@ Fields
.. autoclass:: mongoengine.ListField
.. autoclass:: mongoengine.BinaryField
.. autoclass:: mongoengine.ObjectIdField
.. autoclass:: mongoengine.ReferenceField

View File

@ -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