App Engine Python SDK  v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
Public Member Functions | List of all members
google.appengine.datastore.datastore_query.ResultsIterator Class Reference
Inheritance diagram for google.appengine.datastore.datastore_query.ResultsIterator:

Public Member Functions

def __init__
 
def index_list
 
def cursor
 
def next
 
def __iter__
 

Detailed Description

An iterator over the results from Batches obtained from a Batcher.

ResultsIterator implements Python's iterator protocol, so results can be
accessed with the for-statement:

> it = ResultsIterator(Query(kind='Person').run())
> for person in it:
>   print 'Hi, %s!' % person['name']

At any time ResultsIterator.cursor() can be used to grab the Cursor that
points just after the last result returned by the iterator.

Constructor & Destructor Documentation

def google.appengine.datastore.datastore_query.ResultsIterator.__init__ (   self,
  batcher 
)
Constructor.

Args:
  batcher: A datastore_query.Batcher

Member Function Documentation

def google.appengine.datastore.datastore_query.ResultsIterator.cursor (   self)
Returns a cursor that points just after the last result returned.

If next() throws an exception, this function returns the end_cursor from
the last successful batch or throws the same exception if no batch was
successful.
def google.appengine.datastore.datastore_query.ResultsIterator.index_list (   self)
Returns the list of indexes used to perform the query.
Possibly None when the adapter does not implement pb_to_index.
def google.appengine.datastore.datastore_query.ResultsIterator.next (   self)
Returns the next query result.

The documentation for this class was generated from the following file: