FirebaseFirestore Framework Reference

Filter

classFilter:NSObject,@uncheckedSendable

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

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

    Declaration

    Swift

    classfuncwhereField(_field:String,isEqualTovalue: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

    classfuncwhereField(_path:FIRFieldPath,isEqualTovalue: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

    classfuncwhereField(_field:String,isNotEqualTovalue: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

    classfuncwhereField(_path:FIRFieldPath,isNotEqualTovalue: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

    classfuncwhereField(_field:String,isGreaterThanvalue: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

    classfuncwhereField(_path:FIRFieldPath,isGreaterThanvalue: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

    classfuncwhereField(_field:String,isGreaterOrEqualTovalue: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

    classfuncwhereField(_path:FIRFieldPath,isGreaterOrEqualTovalue: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

    classfuncwhereField(_field:String,isLessThanvalue: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

    classfuncwhereField(_path:FIRFieldPath,isLessThanvalue: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

    classfuncwhereField(_field:String,isLessThanOrEqualTovalue: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

    classfuncwhereField(_path:FIRFieldPath,isLessThanOrEqualTovalue: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

    classfuncwhereField(_field:String,arrayContainsvalue: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

    classfuncwhereField(_path:FIRFieldPath,arrayContainsvalue: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

    classfuncwhereField(_field:String,arrayContainsAnyvalues:[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

    classfuncwhereField(_path:FIRFieldPath,arrayContainsAnyvalues:[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

    classfuncwhereField(_field:String,invalues:[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

    classfuncwhereField(_path:FIRFieldPath,invalues:[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

    classfuncwhereField(_field:String,notInvalues:[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

    classfuncwhereField(_path:FIRFieldPath,notInvalues:[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

    classfuncorFilter(_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

    classfuncandFilter(_filters:[Filter])->Filter

    Parameters

    filters

    The list of filters to perform a disjunction for.

    Return Value

    The newly created filter.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-03-11 UTC.