• 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.

    Returns

    The created QueryOrderByConstraint.

    Parameters

    • fieldPath: string | FieldPath

      The field to sort by.

    • Optional directionStr: OrderByDirection

      Optional direction to sort by ('asc' or 'desc'). If not specified, order will be ascending.

    Returns QueryOrderByConstraint

Generated using TypeDoc