![]() |
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 | __repr__ |
def | reversed |
def | to_bytes |
def | urlsafe |
def | advance |
![]() | |
def | __eq__ |
def | __ne__ |
Static Public Member Functions | |
def | from_bytes |
def | from_websafe_string |
Static Public Attributes | |
to_websafe_string = urlsafe | |
An immutable class that represents a relative position in a query. The position denoted by a Cursor is relative to a result in a query even if the result has been removed from the given query. Usually to position immediately after the last result returned by a batch. A cursor should only be used on a query with an identical signature to the one that produced it.
def google.appengine.datastore.datastore_query.Cursor.__init__ | ( | self, | |
_cursor_pb = None , |
|||
urlsafe = None |
|||
) |
Constructor. A Cursor constructed with no arguments points the first result of any query. If such a Cursor is used as an end_cursor no results will ever be returned.
def google.appengine.datastore.datastore_query.Cursor.advance | ( | self, | |
offset, | |||
query, | |||
conn | |||
) |
Advances a Cursor by the given offset. Args: offset: The amount to advance the current query. query: A Query identical to the one this cursor was created from. conn: The datastore_rpc.Connection to use. Returns: A new cursor that is advanced by offset using the given query.
|
static |
Gets a Cursor given its byte string serialized form. The serialized form of a cursor may change in a non-backwards compatible way. In this case cursors must be regenerated from a new Query request. Args: cursor: A serialized cursor as returned by .to_bytes. Returns: A Cursor. Raises: datastore_errors.BadValueError if the cursor argument does not represent a serialized cursor.
|
static |
Gets a Cursor given its websafe serialized form. The serialized form of a cursor may change in a non-backwards compatible way. In this case cursors must be regenerated from a new Query request. Args: cursor: A serialized cursor as returned by .to_websafe_string. Returns: A Cursor. Raises: datastore_errors.BadValueError if the cursor argument is not a string type of does not represent a serialized cursor.
def google.appengine.datastore.datastore_query.Cursor.reversed | ( | self | ) |
Creates a cursor for use in a query with a reversed sort order.
def google.appengine.datastore.datastore_query.Cursor.to_bytes | ( | self | ) |
Serialize cursor as a byte string.
def google.appengine.datastore.datastore_query.Cursor.urlsafe | ( | self | ) |
Serialize cursor as a websafe string. Returns: A base64-encoded serialized cursor.