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

Public Member Functions

def __init__
 
def __str__
 
def GetEntity
 
def GetNext
 
def CmpProperties
 
def __cmp__
 

Detailed Description

Allow entity comparisons using provided orderings.

The iterator passed to the constructor is eventually consumed via
calls to GetNext(), which generate new SortOrderEntity s with the
same orderings.

Constructor & Destructor Documentation

def google.appengine.api.datastore.MultiQuery.SortOrderEntity.__init__ (   self,
  entity_iterator,
  orderings 
)
Ctor.

Args:
  entity_iterator: an iterator of entities which will be wrapped.
  orderings: an iterable of (identifier, order) pairs. order
    should be either Query.ASCENDING or Query.DESCENDING.

Member Function Documentation

def google.appengine.api.datastore.MultiQuery.SortOrderEntity.__cmp__ (   self,
  that 
)
Compare self to that w.r.t. values defined in the sort order.

Compare an entity with another, using sort-order first, then the key
order to break ties. This can be used in a heap to have faster min-value
lookup.

Args:
  that: other entity to compare to
Returns:
  negative: if self is less than that in sort order
  zero: if self is equal to that in sort order
  positive: if self is greater than that in sort order
def google.appengine.api.datastore.MultiQuery.SortOrderEntity.CmpProperties (   self,
  that 
)
Compare two entities and return their relative order.

Compares self to that based on the current sort orderings and the
key orders between them. Returns negative, 0, or positive depending on
whether self is less, equal to, or greater than that. This
comparison returns as if all values were to be placed in ascending order
(highest value last).  Only uses the sort orderings to compare (ignores
 keys).

Args:
  that: SortOrderEntity

Returns:
  Negative if self < that
  Zero if self == that
  Positive if self > that
def google.appengine.api.datastore.MultiQuery.SortOrderEntity.GetEntity (   self)
Gets the wrapped entity.
def google.appengine.api.datastore.MultiQuery.SortOrderEntity.GetNext (   self)
Wrap and return the next entity.

The entity is retrieved from the iterator given at construction time.

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