Skip to content

FR: Firestore OR operator in WHERE query #1624

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
devpato opened this issue Mar 21, 2019 · 5 comments
Closed

FR: Firestore OR operator in WHERE query #1624

devpato opened this issue Mar 21, 2019 · 5 comments

Comments

@devpato
Copy link

devpato commented Mar 21, 2019

[REQUIRED] Describe your environment
Operating System version: N/A
Firebase SDK version: 4.6.2
Firebase Product: firestore
[REQUIRED] Describe the problem
Rather than having to make several separate queries I would like to see an OR operator for the WHERE query in Firestore. This is something that is currently available in MongoDB or with the $or operator here.

Relevant Code:
The query could look something like this:

citiesRef.where("state", "==", "CA", "||", "state", "==", "AZ")

or better yet

citiesRef.where("state == CA || state == AZ")
I open a new issues since the #321 got closed. People still looking for a solution on that post and haven't heard anything new from Firebase

@samtstern
Copy link
Contributor

@devpato as you mentioned in #321 this is a duplicate. I understand why you filed this, but it's not very helpful. Let's keep this on #321.

@devpato
Copy link
Author

devpato commented Mar 21, 2019

@samtstern can you re open the other then since the issue hasn't been solved?

@samtstern
Copy link
Contributor

@devpato it's closed because it's not something we're working on in the JS SDK. It's something we need to do in the backend. @mikelehen has explained this very well in his comments.

When there is backend support for this kind of query, we will open a new issue on each of the Firestore SDK repos to get the client support implemented.

@mesqueeb
Copy link

@samtstern
Thanks! Which open github thread can we go to, to follow the status of this backend feature? I reckon it's a different repo?

@darren-dev
Copy link

Anyone reading this, please go to the following links and click on the STAR icon at the left of the title:
https://issuetracker.google.com/issues/129070817
https://issuetracker.google.com/issues/129056739

image

@firebase firebase locked and limited conversation to collaborators Oct 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants