Class FieldFilter (2.9.1)

Stay organized with collections Save and categorize content based on your preferences.
FieldFilter(mapping=None, *, ignore_unknown_fields=False, **kwargs)

A filter on a specific field.

Attributes

NameDescription
field google.cloud.firestore_v1.types.StructuredQuery.FieldReference
The field to filter by.
op google.cloud.firestore_v1.types.StructuredQuery.FieldFilter.Operator
The operator to filter by.
value google.cloud.firestore_v1.types.Value
The value to compare to.

Classes

Operator

Operator(value)

A field filter operator.

Values: OPERATOR_UNSPECIFIED (0): Unspecified. This value must not be used. LESS_THAN (1): The given field is less than the given value.

    Requires:

    -  That `field` come first in `order_by`.
LESS_THAN_OR_EQUAL (2):
    The given `field` is less than or equal to the given
    `value`.

    Requires:

    -  That `field` come first in `order_by`.
GREATER_THAN (3):
    The given `field` is greater than the given `value`.

    Requires:

    -  That `field` come first in `order_by`.
GREATER_THAN_OR_EQUAL (4):
    The given `field` is greater than or equal to the given
    `value`.

    Requires:

    -  That `field` come first in `order_by`.
EQUAL (5):
    The given `field` is equal to the given `value`.
NOT_EQUAL (6):
    The given `field` is not equal to the given `value`.

    Requires:

    -  No other `NOT_EQUAL`, `NOT_IN`, `IS_NOT_NULL`, or
       `IS_NOT_NAN`.
    -  That `field` comes first in the `order_by`.
ARRAY_CONTAINS (7):
    The given `field` is an array that contains the given
    `value`.
IN (8):
    The given `field` is equal to at least one value in the
    given array.

    Requires:

    -  That `value` is a non-empty `ArrayValue` with at most
       10 values.
    -  No other `IN` or `ARRAY_CONTAINS_ANY` or `NOT_IN`.
ARRAY_CONTAINS_ANY (9):
    The given `field` is an array that contains any of the
    values in the given array.

    Requires:

    -  That `value` is a non-empty `ArrayValue` with at most
       10 values.
    -  No other `IN` or `ARRAY_CONTAINS_ANY` or `NOT_IN`.
NOT_IN (10):
    The value of the `field` is not in the given array.

    Requires:

    -  That `value` is a non-empty `ArrayValue` with at most
       10 values.
    -  No other `IN`, `ARRAY_CONTAINS_ANY`, `NOT_IN`,
       `NOT_EQUAL`, `IS_NOT_NULL`, or `IS_NOT_NAN`.
    -  That `field` comes first in the `order_by`.