orderBy property
The order to apply to the query results.
Firestore allows callers to provide a full ordering, a partial ordering, or no ordering at all. In all cases, Firestore guarantees a stable ordering through the following rules:
- The
order_byis required to reference all fields used with an inequality filter. - All fields that are required to be in the
order_bybut are not already present are appended in lexicographical ordering of the field name. - If an order on
__name__is not specified, it is appended by default.
Fields are appended with the same sort direction as the last order specified, or 'ASCENDING' if no order was specified. For example:
ORDER BY abecomesORDER BY a ASC, __name__ ASCORDER BY a DESCbecomesORDER BY a DESC, __name__ DESCWHERE a > 1becomesWHERE a > 1 ORDER BY a ASC, __name__ ASCWHERE __name__ > ... AND a > 1becomesWHERE __name__ > ... AND a > 1 ORDER BY a ASC, __name__ ASC
Implementation
@$pb.TagNumber(4)
$core.List<StructuredQuery_Order> get orderBy => $_getList(3);