[π] π₯Support for inequality filters on multiple fields
Issue
Hi, starting April 2024, inequality filters on multiple fields is supported in 10.24.0 and it's been added to RNFB version 19.2.0 but looks like it's throwing error whenever this is performed.
Looks like this one's throwing error:
So when I tried commenting out that try catch, it returns the data without throwing any error.
However I couldn't figure out yet where that validateWhere function is declared and what it does. I assume it still validates for inequality filters on multiple fields and I believe that validation can be removed?
Project Files
Managed expo
Javascript
Click To Expand
package.json:
"@react-native-firebase/analytics": "20.0.0",
"@react-native-firebase/app": "20.0.0",
"@react-native-firebase/app-check": "20.0.0",
"@react-native-firebase/auth": "20.0.0",
"@react-native-firebase/crashlytics": "20.0.0",
"@react-native-firebase/firestore": "20.0.0",
"@react-native-firebase/functions": "20.0.0",
firebase.json for react-native-firebase v6:
# N/A
iOS
Click To Expand
ios/Podfile:
- [x] I'm not using Pods
- [ ] I'm using Pods and my Podfile looks like:
# N/A
AppDelegate.m:
// N/A
Android
Click To Expand
Have you converted to AndroidX?
- [ ] my application is an AndroidX application?
- [ ] I am using
android/gradle.settingsjetifier=truefor Android compatibility? - [ ] I am using the NPM package
jetifierfor react-native compatibility?
android/build.gradle:
// N/A
android/app/build.gradle:
// N/A
android/settings.gradle:
// N/A
MainApplication.java:
// N/A
AndroidManifest.xml:
<!-- N/A -->
Environment
Click To Expand
react-native info output:
OUTPUT GOES HERE
-
Platform that you're experiencing the issue on:
- [ ] iOS
- [ ] Android
- [x] iOS but have not tested behavior on Android
- [ ] Android but have not tested behavior on iOS
- [ ] Both
-
react-native-firebaseversion you're using that has this issue:-
20.0.0
-
-
Firebasemodule(s) you're using that has the issue:-
Firestore
-
-
Are you using
TypeScript?-
Y&5.3.3
-
- π Check out
React Native FirebaseandInvertaseon Twitter for updates on the library.
I found where that validateWhere is located:
https://github.com/invertase/react-native-firebase/blob/ca07cadd592487102b035a24b55f593f065ef4a5/packages/firestore/lib/FirestoreQueryModifiers.js#L237-L341
So what it does is to recursively call _filterCheck function, and the first for loop of the function is responsible for checking inequality filter for multiple fields.
I believe that for loop can now be removed since it's now supported.
I wanted to open a PR for this but for some reason, it returns 403 whenever I try to push working branch to remote as described here.