orderBy
Creates a QueryOrderByConstraint that sorts the query result by the specified field, optionally in descending order instead of ascending.
Note: Documents that do not contain the specified field will not be present in the query result.
function orderBy(fieldPath: string | FieldPath, directionStr?: OrderByDirection): QueryOrderByConstraint;
§
§Parameters
§
directionStr?: OrderByDirection optional
[src]- Optional direction to sort by ('asc' or 'desc'). If not specified, order will be ascending.
§Return Type
§
The created QueryOrderByConstraint.