Python 3.10 is now available in preview.

google.appengine.datastore.datastore_stub_util.BaseCursor

A base query cursor over a list of entities.

Inherits From: expected_type

Public properties:

  • cursor: the integer cursor.
  • app: the app for which this cursor was created.
  • keys_only: whether the query is keys_only.

Class attributes:

  • _next_cursor: the next cursor to allocate.
  • _next_cursor_lock: protects _next_cursor.

query the query request proto.
dsquery a datastore_query.Query over query.
orders the orders of query as returned by _GuessOrders.
index_list the list of indexes used by the query.

Methods

PopulateQueryResult

View source

Populates a QueryResult with this cursor and the given number of results.

Args
result datastore_pb.QueryResult
count integer of how many results to return, or None if not specified
deprecated_offset integer of how many results to skip, deprecated.
compile boolean, whether we are compiling this query
first_result whether the query result is the first for this query

Raises
datastore_errors.BadArgumentError if the offset doesn't match the original offset from the RunQuery call.