Sort
Sort
Sort(key: str, order: Order)
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
append(key: str, order: Order) -> Sort
Append an additional sorting key and order.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key | str | The property key to sort by. | required |
order | Order | The sort order (Order.ASCENDING or Order.DESCENDING). | required |
Returns:
| Type | Description |
|---|---|
Sort | The current Sort instance to allow method chaining. |