Skip to main content

Sort

Sort Objects

class Sort()

Specification of the sort order

This class encapsulates sorting instructions for query results. It supports sorting by a single key or multiple keys. Additional sort keys can be added using the append method.

append

def append(key: str, order: Order) -> "Sort"

Append an additional sorting key and order.

Arguments:

  • key - The property key to sort by.
  • order - The sort order (Order.ASCENDING or Order.DESCENDING).

Returns:

The current Sort instance to allow method chaining.