voluptasmollitia
Version:
Monorepo for the Firebase JavaScript SDK
29 lines (17 loc) • 1.05 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@firebase/firestore](./firestore.md) > [lite](./firestore_lite.md) > [where](./firestore_lite.where.md)
## where() function
Creates a `QueryConstraint` that enforces that documents must contain the specified field and that the value should satisfy the relation constraint provided.
<b>Signature:</b>
```typescript
export declare function where(fieldPath: string | FieldPath, opStr: WhereFilterOp, value: unknown): QueryConstraint;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| fieldPath | string \| [FieldPath](./firestore_lite.fieldpath.md) | The path to compare |
| opStr | [WhereFilterOp](./firestore_lite.wherefilterop.md) | The operation string (e.g "&lt;", "&lt;=", "==", "&lt;", "&lt;=", "!="). |
| value | unknown | The value for comparison |
<b>Returns:</b>
[QueryConstraint](./firestore_lite.queryconstraint.md)
The created `Query`<!-- -->.