voluptasmollitia
Version:
Monorepo for the Firebase JavaScript SDK
30 lines (17 loc) • 1.02 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@firebase/firestore](./firestore.md) > [/](./firestore_.md) > [query](./firestore_.query.md)
## query() function
Creates a new immutable instance of `Query` that is extended to also include additional query constraints.
<b>Signature:</b>
```typescript
export declare function query<T>(query: Query<T>, ...queryConstraints: QueryConstraint[]): Query<T>;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| query | [Query](./firestore_.query.md)<!-- --><T> | The Query instance to use as a base for the new constraints. |
| queryConstraints | [QueryConstraint](./firestore_.queryconstraint.md)<!-- -->\[\] | The list of <code>QueryConstraint</code>s to apply. |
<b>Returns:</b>
[Query](./firestore_.query.md)<!-- --><T>
## Exceptions
if any of the provided query constraints cannot be combined with the existing or new constraints.