FirebaseFirestore Framework Reference

Filter

class Filter : NSObject

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

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

    Declaration

    Swift

    class func whereField(_ field: String, isEqualTo value: Any) -> Filter

    Parameters

    field

    The field used for the filter.

    value

    The value used for the filter.

    Return Value

    The newly created filter.

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

    Declaration

    Swift

    class func whereField(_ path: FIRFieldPath, isEqualTo value: Any) -> Filter

    Parameters

    path

    The field path used for the filter.

    value

    The value used for the filter.

    Return Value

    The newly created filter.

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

    Declaration

    Swift

    class func whereField(_ field: String, isNotEqualTo value: Any) -> Filter

    Parameters

    field

    The field used for the filter.

    value

    The value used for the filter.

    Return Value

    The newly created filter.

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

    Declaration

    Swift

    class func whereField(_ path: FIRFieldPath, isNotEqualTo value: Any) -> Filter

    Parameters

    path

    The field path used for the filter.

    value

    The value used for the filter.

    Return Value

    The newly created filter.

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

    Declaration

    Swift

    class func whereField(_ field: String, isGreaterThan value: Any) -> Filter

    Parameters

    field

    The field used for the filter.

    value

    The value used for the filter.

    Return Value

    The newly created filter.

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

    Declaration

    Swift

    class func whereField(_ path: FIRFieldPath, isGreaterThan value: Any) -> Filter

    Parameters

    path

    The field path used for the filter.

    value

    The value used for the filter.

    Return Value

    The newly created filter.

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

    Declaration

    Swift

    class func whereField(_ field: String, isGreaterOrEqualTo value: Any) -> Filter

    Parameters

    field

    The field used for the filter.

    value

    The value used for the filter.

    Return Value

    The newly created filter.

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

    Declaration

    Swift

    class func whereField(_ path: FIRFieldPath, isGreaterOrEqualTo value: Any) -> Filter

    Parameters

    path

    The field path used for the filter.

    value

    The value used for the filter.

    Return Value

    The newly created filter.

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

    Declaration

    Swift

    class func whereField(_ field: String, isLessThan value: Any) -> Filter

    Parameters

    field

    The field used for the filter.

    value

    The value used for the filter.

    Return Value

    The newly created filter.

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

    Declaration

    Swift

    class func whereField(_ path: FIRFieldPath, isLessThan value: Any) -> Filter

    Parameters

    path

    The field path used for the filter.

    value

    The value used for the filter.

    Return Value

    The newly created filter.

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

    Declaration

    Swift

    class func whereField(_ field: String, isLessThanOrEqualTo value: Any) -> Filter

    Parameters

    field

    The field used for the filter.

    value

    The value used for the filter.

    Return Value

    The newly created filter.

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

    Declaration

    Swift

    class func whereField(_ path: FIRFieldPath, isLessThanOrEqualTo value: Any) -> Filter

    Parameters

    path

    The field path used for the filter.

    value

    The value used for the filter.

    Return Value

    The newly created filter.

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

    Declaration

    Swift

    class func whereField(_ field: String, arrayContains value: Any) -> Filter

    Parameters

    field

    The field used for the filter.

    value

    The value used for the filter.

    Return Value

    The newly created filter.

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

    Declaration

    Swift

    class func whereField(_ path: FIRFieldPath, arrayContains value: Any) -> Filter

    Parameters

    path

    The field path used for the filter.

    value

    The value used for the filter.

    Return Value

    The newly created filter.

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

    Declaration

    Swift

    class func whereField(_ field: String, arrayContainsAny values: [Any]) -> Filter

    Parameters

    field

    The field used for the filter.

    values

    The list of values used for the filter.

    Return Value

    The newly created filter.

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

    Declaration

    Swift

    class func whereField(_ path: FIRFieldPath, arrayContainsAny values: [Any]) -> Filter

    Parameters

    path

    The field path used for the filter.

    values

    The list of values used for the filter.

    Return Value

    The newly created filter.

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

    Declaration

    Swift

    class func whereField(_ field: String, in values: [Any]) -> Filter

    Parameters

    field

    The field used for the filter.

    values

    The list of values used for the filter.

    Return Value

    The newly created filter.

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

    Declaration

    Swift

    class func whereField(_ path: FIRFieldPath, in values: [Any]) -> Filter

    Parameters

    path

    The field path used for the filter.

    values

    The list of values used for the filter.

    Return Value

    The newly created filter.

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

    Declaration

    Swift

    class func whereField(_ field: String, notIn values: [Any]) -> Filter

    Parameters

    field

    The field path used for the filter.

    values

    The list of values used for the filter.

    Return Value

    The newly created filter.

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

    Declaration

    Swift

    class func whereField(_ path: FIRFieldPath, notIn values: [Any]) -> Filter

    Parameters

    path

    The field path used for the filter.

    values

    The list of values used for the filter.

    Return Value

    The newly created filter.

  • 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.

    Declaration

    Swift

    class func orFilter(_ filters: [Filter]) -> Filter

    Parameters

    filters

    The list of filters to perform a disjunction for.

    Return Value

    The newly created filter.

  • 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.

    Declaration

    Swift

    class func andFilter(_ filters: [Filter]) -> Filter

    Parameters

    filters

    The list of filters to perform a disjunction for.

    Return Value

    The newly created filter.