Skip to content

Firestore: add IN and ARRAY_CONTAINS_ANY query operators #9540

@BenWhitehead

Description

@BenWhitehead

With an upcoming backend up date Firestore will have support for two new query operators IN and ARRAY_CONTAINS_ANY. In order for these new operators to be used, they need to be wired up to the high level query system.

These new operators allow queries like the following:

// IN query
firestore.collection('cities')
    .where("country", 'in', ['USA', 'Japan'])

// ARRAY_CONTAINS_ANY
firestore.collection('cities')
   .where('regions', 'array-contains-any', ['west_coast', 'east_coast'])

Both operators expect an ArrayValue to match against.

Additional context

Metadata

Metadata

Assignees

Labels

api: firestoreIssues related to the Firestore API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions