![]() |
App Engine Python SDK
v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
|
Public Member Functions | |
def | __init__ |
def | index_list |
def | cursor |
def | next |
def | __iter__ |
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.
def google.appengine.datastore.datastore_query.ResultsIterator.__init__ | ( | self, | |
batcher | |||
) |
Constructor. Args: batcher: A datastore_query.Batcher
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.