Firebase.Firestore.Filter

A Filter represents a restriction on one or more field values and can be used to refine the results of a Query.

Summary

Public static functions

And(params Filter[] filters)
Creates a new filter that is a conjunction of the given filters.
ArrayContains(string fieldPath, object value)
Creates a new filter for checking that the given array field contains the given value.
ArrayContains(FieldPath fieldPath, object value)
Creates a new filter for checking that the given array field contains the given value.
ArrayContainsAny(string fieldPath, IEnumerable< object > values)
Creates a new filter for checking that the given array field contains any of the given values.
ArrayContainsAny(FieldPath fieldPath, IEnumerable< object > values)
Creates a new filter for checking that the given array field contains any of the given values.
EqualTo(string fieldPath, object value)
Creates a new filter for checking that the given field is equal to the given value.
EqualTo(FieldPath fieldPath, object value)
Creates a new filter for checking that the given field is equal to the given value.
GreaterThan(string fieldPath, object value)
Creates a new filter for checking that the given field is greater than the given value.
GreaterThan(FieldPath fieldPath, object value)
Creates a new filter for checking that the given field is greater than the given value.
GreaterThanOrEqualTo(string fieldPath, object value)
Creates a new filter for checking that the given field is greater than or equal to the given value.
GreaterThanOrEqualTo(FieldPath fieldPath, object value)
Creates a new filter for checking that the given field is greater than or equal to the given value.
In(string fieldPath, IEnumerable< object > values)
Creates a new filter for checking that the given field equals any of the given values.
In(FieldPath fieldPath, IEnumerable< object > values)
Creates a new filter for checking that the given field equals any of the given values.
LessThan(string fieldPath, object value)
Creates a new filter for checking that the given field is less than the given value.
LessThan(FieldPath fieldPath, object value)
Creates a new filter for checking that the given field is less than the given value.
LessThanOrEqualTo(string fieldPath, object value)
Creates a new filter for checking that the given field is less than or equal to the given value.
LessThanOrEqualTo(FieldPath fieldPath, object value)
Creates a new filter for checking that the given field is less than or equal to the given value.
NotEqualTo(string fieldPath, object value)
Creates a new filter for checking that the given field is not equal to the given value.
NotEqualTo(FieldPath fieldPath, object value)
Creates a new filter for checking that the given field is not equal to the given value.
NotIn(string fieldPath, IEnumerable< object > values)
Creates a new filter for checking that the given field does not equal any of the given values.
NotIn(FieldPath fieldPath, IEnumerable< object > values)
Creates a new filter for checking that the given field does not equal any of the given values.
Or(params Filter[] filters)
Creates a new filter that is a disjunction of the given filters.

Public static functions

And

Filter And(
  params Filter[] filters
)

Creates a new filter that is a conjunction of the given filters.

A conjunction filter includes a document if it satisfies all of the given filters.

If no filter is given, the composite filter is a no-op, and if only one filter is given, the composite filter has the same behavior as the underlying filter.

Details
Parameters
filters
The filters to perform a conjunction for.
Returns
The newly created filter.

ArrayContains

Filter ArrayContains(
  string fieldPath,
  object value
)

Creates a new filter for checking that the given array field contains the given value.

Details
Parameters
fieldPath
The name of the field containing an array to search.
value
The value that must be contained in the array.
Returns

ArrayContains

Filter ArrayContains(
  FieldPath fieldPath,
  object value
)

Creates a new filter for checking that the given array field contains the given value.

Details
Parameters
fieldPath
The path of the field containing an array to search.
value
The value that must be contained in the array.
Returns
The newly created filter.

ArrayContainsAny

Filter ArrayContainsAny(
  string fieldPath,
  IEnumerable< object > values
)

Creates a new filter for checking that the given array field contains any of the given values.

Details
Parameters
fieldPath
The name of the field containing an array to search.
values
The list of values to match.
Returns
The newly created filter.

ArrayContainsAny

Filter ArrayContainsAny(
  FieldPath fieldPath,
  IEnumerable< object > values
)

Creates a new filter for checking that the given array field contains any of the given values.

Details
Parameters
fieldPath
The path of the field containing an array to search.
values
The list of values to match.
Returns
The newly created filter.

EqualTo

Filter EqualTo(
  string fieldPath,
  object value
)

Creates a new filter for checking that the given field is equal to the given value.

Details
Parameters
fieldPath
The name of the field to compare.
value
The value for comparison.
Returns
The newly created filter.

EqualTo

Filter EqualTo(
  FieldPath fieldPath,
  object value
)

Creates a new filter for checking that the given field is equal to the given value.

Details
Parameters
fieldPath
The path of the field containing an array to search.
value
The value for comparison.
Returns
The newly created filter.

GreaterThan

Filter GreaterThan(
  string fieldPath,
  object value
)

Creates a new filter for checking that the given field is greater than the given value.

Details
Parameters
fieldPath
The name of the field to compare.
value
The value for comparison.
Returns
The newly created filter.

GreaterThan

Filter GreaterThan(
  FieldPath fieldPath,
  object value
)

Creates a new filter for checking that the given field is greater than the given value.

Details
Parameters
fieldPath
The path of the field to compare.
value
The value for comparison.
Returns
The newly created filter.

GreaterThanOrEqualTo

Filter GreaterThanOrEqualTo(
  string fieldPath,
  object value
)

Creates a new filter for checking that the given field is greater than or equal to the given value.

Details
Parameters
fieldPath
The name of the field to compare.
value
The value for comparison.
Returns
The newly created filter.

GreaterThanOrEqualTo

Filter GreaterThanOrEqualTo(
  FieldPath fieldPath,
  object value
)

Creates a new filter for checking that the given field is greater than or equal to the given value.

Details
Parameters
fieldPath
The path of the field to compare.
value
The value for comparison.
Returns
The newly created filter.

In

Filter In(
  string fieldPath,
  IEnumerable< object > values
)

Creates a new filter for checking that the given field equals any of the given values.

Details
Parameters
fieldPath
The name of the field to compare.
values
The list of values to match.
Returns

In

Filter In(
  FieldPath fieldPath,
  IEnumerable< object > values
)

Creates a new filter for checking that the given field equals any of the given values.

Details
Parameters
fieldPath
The path of the field to compare.
values
The list of values to match.
Returns
The newly created filter.

LessThan

Filter LessThan(
  string fieldPath,
  object value
)

Creates a new filter for checking that the given field is less than the given value.

Details
Parameters
fieldPath
The name of the field to compare.
value
The value for comparison.
Returns
The newly created filter.

LessThan

Filter LessThan(
  FieldPath fieldPath,
  object value
)

Creates a new filter for checking that the given field is less than the given value.

Details
Parameters
fieldPath
The path of the field to compare.
value
The value for comparison.
Returns
The newly created filter.

LessThanOrEqualTo

Filter LessThanOrEqualTo(
  string fieldPath,
  object value
)

Creates a new filter for checking that the given field is less than or equal to the given value.

Details
Parameters
fieldPath
The name of the field to compare.
value
The value for comparison.
Returns
The newly created filter.

LessThanOrEqualTo

Filter LessThanOrEqualTo(
  FieldPath fieldPath,
  object value
)

Creates a new filter for checking that the given field is less than or equal to the given value.

Details
Parameters
fieldPath
The path of the field to compare.
value
The value for comparison.
Returns
The newly created filter.

NotEqualTo

Filter NotEqualTo(
  string fieldPath,
  object value
)

Creates a new filter for checking that the given field is not equal to the given value.

Details
Parameters
fieldPath
The name of the field to compare.
value
The value for comparison.
Returns
The newly created filter.

NotEqualTo

Filter NotEqualTo(
  FieldPath fieldPath,
  object value
)

Creates a new filter for checking that the given field is not equal to the given value.

Details
Parameters
fieldPath
The path of the field to compare.
value
The value for comparison.
Returns
The newly created filter.

NotIn

Filter NotIn(
  string fieldPath,
  IEnumerable< object > values
)

Creates a new filter for checking that the given field does not equal any of the given values.

Details
Parameters
fieldPath
The name of the field to compare.
values
The list of values to match.
Returns
The newly created filter.

NotIn

Filter NotIn(
  FieldPath fieldPath,
  IEnumerable< object > values
)

Creates a new filter for checking that the given field does not equal any of the given values.

Details
Parameters
fieldPath
The path of the field to compare.
values
The list of values to match.
Returns
The newly created filter.

Or

Filter Or(
  params Filter[] filters
)

Creates a new filter that is a disjunction of the given filters.

A disjunction filter includes a document if it satisfies any of the given filters.

If no filter is given, the composite filter is a no-op, and if only one filter is given, the composite filter has the same behavior as the underlying filter.

Details
Parameters
filters
The filters to perform a disjunction for.
Returns
The newly created filter.