Python 3.9 is now generally available.

google.appengine.datastore.datastore_query.ResultsIterator

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

Inherits From: expected_type

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.

batcher A datastore_query.Batcher

Methods

cursor

View source

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.

index_list

View source

Returns the list of indexes used to perform the query. Possibly None when the adapter does not implement pb_to_index.

next

View source

__iter__

View source