Skip to content

Commit 83e2cfe

Browse files
committed
Replace not(fn()) with notFn() in the query to pipeline conversion
1 parent 3b38688 commit 83e2cfe

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

packages/firestore/src/core/pipeline-util.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import {
2020
Constant,
2121
Field,
2222
BooleanExpr,
23-
not,
2423
andFunction,
2524
orFunction,
2625
Ordering,
@@ -61,13 +60,13 @@ export function toPipelineBooleanExpr(f: FilterInternal): BooleanExpr {
6160
if (f.op === Operator.EQUAL) {
6261
return andFunction(field.exists(), field.isNan());
6362
} else {
64-
return andFunction(field.exists(), not(field.isNan()));
63+
return andFunction(field.exists(), field.isNotNan());
6564
}
6665
} else if (isNullValue(f.value)) {
6766
if (f.op === Operator.EQUAL) {
6867
return andFunction(field.exists(), field.eq(null));
6968
} else {
70-
return andFunction(field.exists(), not(field.eq(null)));
69+
return andFunction(field.exists(), field.neq(null));
7170
}
7271
} else {
7372
// Comparison filters
@@ -124,7 +123,7 @@ export function toPipelineBooleanExpr(f: FilterInternal): BooleanExpr {
124123
const values = value?.arrayValue?.values?.map((val: any) =>
125124
Constant._fromProto(val)
126125
);
127-
return andFunction(field.exists(), not(field.eqAny(...values!)));
126+
return andFunction(field.exists(), field.notEqAny(...values!));
128127
}
129128
default:
130129
fail('Unexpected operator');

0 commit comments

Comments
 (0)