Stay organized with collections
Save and categorize content based on your preferences.
A QueryOrderByConstraint is used to sort the set of documents returned by a Firestore query. QueryOrderByConstraints are created by invoking orderBy() and can then be passed to query() to create a new query instance that also contains this QueryOrderByConstraint.
[null,null,["Last updated 2024-01-19 UTC."],[],[],null,["# QueryOrderByConstraint class\n\nA `QueryOrderByConstraint` is used to sort the set of documents returned by a Firestore query. `QueryOrderByConstraint`s are created by invoking [orderBy()](./firestore_.md#orderby_006d61f) and can then be passed to [query()](./firestore_.md#query_9f7b0f4) to create a new query instance that also contains this `QueryOrderByConstraint`.\n| **Note:** Documents that do not contain the orderBy field will not be present in the query result.\n\n**Signature:** \n\n export declare class QueryOrderByConstraint extends QueryConstraint \n\n**Extends:** [QueryConstraint](./firestore_lite.queryconstraint.md#queryconstraint_class)\n\nProperties\n----------\n\n| Property | Modifiers | Type | Description |\n|-------------------------------------------------------------------------------|-----------|----------------|-----------------------------------|\n| [type](./firestore_lite.queryorderbyconstraint.md#queryorderbyconstrainttype) | | (not declared) | The type of this query constraint |\n\nQueryOrderByConstraint.type\n---------------------------\n\nThe type of this query constraint\n\n**Signature:** \n\n readonly type = \"orderBy\";"]]