where method
QueryReference
where(
- String fieldPath, {
- dynamic isEqualTo,
- dynamic isLessThan,
- dynamic isLessThanOrEqualTo,
- dynamic isGreaterThan,
- dynamic isGreaterThanOrEqualTo,
- dynamic arrayContains,
- List? arrayContainsAny,
- List? whereIn,
- bool isNull = false,
})
Implementation
QueryReference where(
String fieldPath, {
dynamic isEqualTo,
dynamic isLessThan,
dynamic isLessThanOrEqualTo,
dynamic isGreaterThan,
dynamic isGreaterThanOrEqualTo,
dynamic arrayContains,
List<dynamic>? arrayContainsAny,
List<dynamic>? whereIn,
bool isNull = false,
}) {
if (isEqualTo != null) {
_addFilter(fieldPath, isEqualTo,
operator: StructuredQuery_FieldFilter_Operator.EQUAL);
}
if (isLessThan != null) {
_addFilter(fieldPath, isLessThan,
operator: StructuredQuery_FieldFilter_Operator.LESS_THAN);
}
if (isLessThanOrEqualTo != null) {
_addFilter(fieldPath, isLessThanOrEqualTo,
operator: StructuredQuery_FieldFilter_Operator.LESS_THAN_OR_EQUAL);
}
if (isGreaterThan != null) {
_addFilter(fieldPath, isGreaterThan,
operator: StructuredQuery_FieldFilter_Operator.GREATER_THAN);
}
if (isGreaterThanOrEqualTo != null) {
_addFilter(fieldPath, isGreaterThanOrEqualTo,
operator: StructuredQuery_FieldFilter_Operator.GREATER_THAN_OR_EQUAL);
}
if (arrayContains != null) {
_addFilter(fieldPath, arrayContains,
operator: StructuredQuery_FieldFilter_Operator.ARRAY_CONTAINS);
}
if (arrayContainsAny != null) {
_addFilter(fieldPath, arrayContainsAny,
operator: StructuredQuery_FieldFilter_Operator.ARRAY_CONTAINS_ANY);
}
if (whereIn != null) {
_addFilter(fieldPath, whereIn,
operator: StructuredQuery_FieldFilter_Operator.IN);
}
if (isNull) {
_addFilter(fieldPath, null);
}
return this;
}