-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
fix(firestore): Allow queries with combined in and array-contains-any #7142
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fascinating - you are exactly right! This was changed recently and makes the query language much more powerful, assuming we let them through our filtering :-). Thanks for taking the time to fix this not just for yourself but for all users, much appreciated!
The iOS CI failure is a timeout I'm fixing in #7163 and does not affect this PR - will merge this after that one passes CI so it doesn't fail on main as well post-merge |
Codecov Report
@@ Coverage Diff @@
## main #7142 +/- ##
============================================
- Coverage 54.00% 53.98% -0.02%
Complexity 734 734
============================================
Files 230 230
Lines 11503 11497 -6
Branches 1854 1851 -3
============================================
- Hits 6211 6205 -6
Misses 4949 4949
Partials 343 343 |
Description
Since late april queries containing
in
andarray-contains-any
together are supported as queries with multiplein
statements, given that the number of generatedor
queries in normal form is below 30. Since@react-native-firebase/firestore
is currently blocking any of these queries, this PR aims at removing that block, leaving the check for the normal form limit to the underlying firestore engine.This is the relevant firebase docs on these limitations: https://firebase.google.com/docs/firestore/query-data/queries#limitations_3
Please note: I do not have a history of the changes available, I know this change has been added with the
or
operator support.Related issues
None
Release Summary
Allow the use of
in
andarray-contains-any
in the same query.Checklist
Android
iOS
e2e
tests added or updated inpackages/\*\*/e2e
jest
tests added or updated inpackages/\*\*/__tests__
Test Plan
I ran the e2e tests, these are the results:
Apart from running e2e tests I did use my fork in my own project using the aforementioned
in
andarray-contains-any
filters in some queries, and they work fine.🔥