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

Public Member Functions

def __init__
 
def __repr__
 
def reversed
 
def to_bytes
 
def urlsafe
 
def advance
 
- Public Member Functions inherited from google.appengine.datastore.datastore_query._BaseComponent
def __eq__
 
def __ne__
 

Static Public Member Functions

def from_bytes
 
def from_websafe_string
 

Static Public Attributes

 to_websafe_string = urlsafe
 

Detailed Description

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.

Constructor & Destructor Documentation

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.

Member Function Documentation

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.
def google.appengine.datastore.datastore_query.Cursor.from_bytes (   cursor)
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.
def google.appengine.datastore.datastore_query.Cursor.from_websafe_string (   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.

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