Skip to content

Commit 109cf84

Browse files
authored
Firestore improvements (#147)
* feat(firestore): use pre-built firestore xcframeworks * feat(firestore): isEqual on Queries
1 parent ffda578 commit 109cf84

File tree

4 files changed

+13
-1
lines changed

4 files changed

+13
-1
lines changed

packages/firebase-firestore/index.android.ts

+4
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,10 @@ export class Query<T extends DocumentData = DocumentData> implements IQuery<T> {
638638
return Query.fromNative(query);
639639
}
640640

641+
isEqual(other: Query): boolean {
642+
return this.native.equals(other?.native);
643+
}
644+
641645
get native() {
642646
return this._native;
643647
}

packages/firebase-firestore/index.d.ts

+4
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ export interface IQuery<T extends DocumentData = DocumentData> {
5050
startAt(fieldValues: IFieldValue[]): IQuery<T>;
5151

5252
where(fieldPath: keyof T | IFieldPath, opStr: WhereFilterOp, value: any): IQuery<T>;
53+
54+
isEqual(other: any): boolean;
5355
}
5456

5557
export interface ICollectionReference<T extends DocumentData = DocumentData> {
@@ -324,6 +326,8 @@ export declare class Query<T extends DocumentData = DocumentData> implements IQu
324326

325327
where(fieldPath: FieldPath | keyof DocumentData, opStr: WhereFilterOp, value: any): Query;
326328

329+
isEqual(other: any): boolean;
330+
327331
readonly android: any;
328332
readonly ios: any;
329333
readonly native: any;

packages/firebase-firestore/index.ios.ts

+4
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,10 @@ export class Query<T extends DocumentData = DocumentData> implements IQuery<T> {
576576
return Query.fromNative(query);
577577
}
578578

579+
isEqual(other: Query): boolean {
580+
return this.native.isEqual(other?.native);
581+
}
582+
579583
get native() {
580584
return this._native;
581585
}
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
pod 'Firebase/Firestore','~>9.6'
1+
pod 'FirebaseFirestore', :git => 'https://github.com./invertase/firestore-ios-sdk-frameworks.git', :tag => '9.6.0'

0 commit comments

Comments
 (0)