voluptasmollitia
Version:
Monorepo for the Firebase JavaScript SDK
22 lines (12 loc) • 627 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@firebase/database](./database.md) > [orderByKey](./database.orderbykey.md)
## orderByKey() function
Creates a new `QueryConstraint` that orders by the key.
Sorts the results of a query by their (ascending) key values.
You can read more about `orderByKey()` in [Sort data](https://firebase.google.com/docs/database/web/lists-of-data#sort_data)<!-- -->.
<b>Signature:</b>
```typescript
export declare function orderByKey(): QueryConstraint;
```
<b>Returns:</b>
[QueryConstraint](./database.queryconstraint.md)