Notice: Over the next few months, we're reorganizing the App Engine documentation site to make it easier to find content and better align with the rest of Google Cloud products. The same content will be available, but the navigation will now match the rest of the Cloud products.

Python 3.10 is now available in preview.

google.appengine.api.datastore.MultiQuery.SortOrderEntity

Allow entity comparisons using provided orderings.

Inherits From: expected_type

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

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

View source

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

View source

Gets the wrapped entity.

GetNext

View source

Wrap and return the next entity.

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

__eq__

View source

Return self==value.

__ge__

View source

Return self>=value.

__gt__

View source

Return self>value.

__le__

View source

Return self<=value.

__lt__

View source

Return self<value.

__ne__

View source

Return self!=value.