Skip to content
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

Feature Request: add support for querying field where "!=" nil #8088

Closed
dcts opened this issue Nov 3, 2020 · 3 comments · Fixed by #8146
Closed

Feature Request: add support for querying field where "!=" nil #8088

dcts opened this issue Nov 3, 2020 · 3 comments · Fixed by #8146
Assignees
Labels
api: firestore Issues related to the Firestore API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@dcts
Copy link

dcts commented Nov 3, 2020

The javascript firestore SDK supports .where(fieldname, "!=", null) (since version 7.21.0), which is great and a really usefull query. For the ruby sdk I did notice this method is not supported yet. See docs.

Describe the solution you'd like

  • add support for db.col.where(fieldname, "!=", nil)

Describe alternatives you've considered

  • using the javascript SDK and deploying an API solely for this specific query (time-consuming)
  • fetching all documents and filtering them on my server with ruby (costly)
@quartzmo quartzmo added the api: firestore Issues related to the Firestore API. label Nov 3, 2020
@quartzmo quartzmo self-assigned this Nov 3, 2020
@quartzmo quartzmo added the type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. label Nov 3, 2020
@quartzmo
Copy link
Member

quartzmo commented Nov 3, 2020

@dcts Thank you for opening this issue. I will add the following operators:

  • != - a query operator to find documents where a field’s value is set and does not equal the specified value.
  • NOT_IN - a query operator to find documents where a field’s value is != any of the values in the specified array.

@quartzmo
Copy link
Member

Existing implementations:

@quartzmo
Copy link
Member

This feature was released in google-cloud-firestore v2.4.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: firestore Issues related to the Firestore API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants