Home > @firebase/firestore > / > where
where() function
Creates a QueryConstraint
that enforces that documents must contain the specified field and that the value should satisfy the relation constraint provided.
Signature:
export declare function where(fieldPath: string | FieldPath, opStr: WhereFilterOp, value: unknown): QueryConstraint;
Parameters
Parameter | Type | Description |
---|---|---|
fieldPath | string | FieldPath | The path to compare |
opStr | WhereFilterOp | The operation string (e.g "<", "<=", "==", "<", "<=", "!="). |
value | unknown | The value for comparison |
Returns:
The created Query
.