@react-native-firebase/firestore 16.5.1 → 16.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,16 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [16.6.0](https://github.com/invertase/react-native-firebase/compare/v16.5.2...v16.6.0) (2023-01-27)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **firestore:** support not equals null query ([b93699c](https://github.com/invertase/react-native-firebase/commit/b93699c0258cadfdd6639b64479f1738b5c301b4))
11
+
12
+ ### [16.5.2](https://github.com/invertase/react-native-firebase/compare/v16.5.1...v16.5.2) (2023-01-23)
13
+
14
+ **Note:** Version bump only for package @react-native-firebase/firestore
15
+
6
16
  ### [16.5.1](https://github.com/invertase/react-native-firebase/compare/v16.5.0...v16.5.1) (2023-01-20)
7
17
 
8
18
  ### Bug Fixes
@@ -135,12 +135,14 @@ public class ReactNativeFirebaseFirestoreQuery {
135
135
  FieldPath fieldPath = FieldPath.of(segmentArray);
136
136
  String direction = (String) order.get("direction");
137
137
 
138
- query = query.orderBy(Objects.requireNonNull(fieldPath), Query.Direction.valueOf(direction));
138
+ query =
139
+ query.orderBy(Objects.requireNonNull(fieldPath), Query.Direction.valueOf(direction));
139
140
  } else {
140
141
  String fieldPath = (String) order.get("fieldPath");
141
142
  String direction = (String) order.get("direction");
142
143
 
143
- query = query.orderBy(Objects.requireNonNull(fieldPath), Query.Direction.valueOf(direction));
144
+ query =
145
+ query.orderBy(Objects.requireNonNull(fieldPath), Query.Direction.valueOf(direction));
144
146
  }
145
147
  }
146
148
  }
@@ -437,7 +437,11 @@ export default class FirestoreQuery {
437
437
  );
438
438
  }
439
439
 
440
- if (isNull(value) && !this._modifiers.isEqualOperator(opStr)) {
440
+ if (
441
+ isNull(value) &&
442
+ !this._modifiers.isEqualOperator(opStr) &&
443
+ !this._modifiers.isNotEqualOperator(opStr)
444
+ ) {
441
445
  throw new Error(
442
446
  "firebase.firestore().collection().where(_, _, *) 'value' is invalid. You can only perform equals comparisons on null",
443
447
  );
@@ -198,6 +198,10 @@ export default class FirestoreQueryModifiers {
198
198
  return OPERATORS[operator] === 'EQUAL';
199
199
  }
200
200
 
201
+ isNotEqualOperator(operator) {
202
+ return OPERATORS[operator] === 'NOT_EQUAL';
203
+ }
204
+
201
205
  isInOperator(operator) {
202
206
  return (
203
207
  OPERATORS[operator] === 'IN' ||
package/lib/version.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // Generated by genversion.
2
- module.exports = '16.5.1';
2
+ module.exports = '16.6.0';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native-firebase/firestore",
3
- "version": "16.5.1",
3
+ "version": "16.6.0",
4
4
  "author": "Invertase <oss@invertase.io> (http://invertase.io)",
5
5
  "description": "React Native Firebase - Cloud Firestore is a NoSQL cloud database to store and sync data between your React Native application and Firebase's database. The API matches the Firebase Web SDK whilst taking advantage of the native SDKs performance and offline capabilities.",
6
6
  "main": "lib/index.js",
@@ -27,10 +27,10 @@
27
27
  "firestore"
28
28
  ],
29
29
  "peerDependencies": {
30
- "@react-native-firebase/app": "16.5.1"
30
+ "@react-native-firebase/app": "16.6.0"
31
31
  },
32
32
  "publishConfig": {
33
33
  "access": "public"
34
34
  },
35
- "gitHead": "fafaf580f384e8c4b47788adfab0b29ee2cfd5c0"
35
+ "gitHead": "6663dc24dc5697190b930aa510085a681fe81203"
36
36
  }