Allow entity comparisons using provided orderings.
Inherits From: expected_type
google.appengine.api.datastore.MultiQuery.SortOrderEntity(
entity_iterator, orderings
)
The iterator passed to the constructor is eventually consumed via
calls to GetNext()
, which generate new SortOrderEntity
s with the
same orderings.
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 .
|
Methods
CmpProperties
CmpProperties(
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 |
GetEntity
GetEntity()
Gets the wrapped entity.
GetNext
GetNext()
Wrap and return the next entity.
The entity is retrieved from the iterator given at construction time.
__eq__
__eq__(
other
)
Return self==value.
__ge__
__ge__(
other
)
Return self>=value.
__gt__
__gt__(
other
)
Return self>value.
__le__
__le__(
other
)
Return self<=value.
__lt__
__lt__(
other
)
Return self<value.
__ne__
__ne__(
other
)
Return self!=value.