AttributeFilter class

Provides filtering the query results based on document attributes.

When you use the AndAllFilters or OrAllFilters, filters you can use 2 layers under the first attribute filter. For example, you can use:

<AndAllFilters>

  1. <OrAllFilters>
  2. <EqualTo>
If you use more than 2 layers, you receive a ValidationException exception with the message "AttributeFilter cannot have a depth of more than 2."

Constructors

AttributeFilter({List<AttributeFilter>? andAllFilters, DocumentAttribute? containsAll, DocumentAttribute? containsAny, DocumentAttribute? equalsTo, DocumentAttribute? greaterThan, DocumentAttribute? greaterThanOrEquals, DocumentAttribute? lessThan, DocumentAttribute? lessThanOrEquals, AttributeFilter? notFilter, List<AttributeFilter>? orAllFilters})

Properties

andAllFilters List<AttributeFilter>?
Performs a logical AND operation on all supplied filters.
final
containsAll DocumentAttribute?
Returns true when a document contains all of the specified document attributes. This filter is only applicable to StringListValue metadata.
final
containsAny DocumentAttribute?
Returns true when a document contains any of the specified document attributes. This filter is only applicable to StringListValue metadata.
final
equalsTo DocumentAttribute?
Performs an equals operation on two document attributes.
final
greaterThan DocumentAttribute?
Performs a greater than operation on two document attributes. Use with a document attribute of type Integer or Long.
final
greaterThanOrEquals DocumentAttribute?
Performs a greater or equals than operation on two document attributes. Use with a document attribute of type Integer or Long.
final
hashCode int
The hash code for this object.
no setterinherited
lessThan DocumentAttribute?
Performs a less than operation on two document attributes. Use with a document attribute of type Integer or Long.
final
lessThanOrEquals DocumentAttribute?
Performs a less than or equals operation on two document attributes. Use with a document attribute of type Integer or Long.
final
notFilter AttributeFilter?
Performs a logical NOT operation on all supplied filters.
final
orAllFilters List<AttributeFilter>?
Performs a logical OR operation on all supplied filters.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited