Skip to content

Commit 29149c0

Browse files
committed
implement new FunctionExpressions as standalone functions
1 parent e923dfd commit 29149c0

File tree

10 files changed

+2266
-666
lines changed

10 files changed

+2266
-666
lines changed

packages/firestore/lite/pipelines/pipelines.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ export {
137137
descending,
138138
ExprWithAlias,
139139
Field,
140-
Fields,
141140
Constant,
142141
FirestoreFunction,
143142
Add,

packages/firestore/src/api/pipeline_impl.ts

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,17 @@ export function pipeline(
5151
): PipelineSource<Pipeline> | Pipeline {
5252
if (firestoreOrQuery instanceof Firestore) {
5353
const firestore = firestoreOrQuery;
54-
return new PipelineSource<Pipeline>((stages: Stage[]) => {
55-
return new Pipeline(
56-
firestore,
57-
newUserDataReader(firestore),
58-
new ExpUserDataWriter(firestore),
59-
stages
60-
);
61-
});
54+
return new PipelineSource<Pipeline>(
55+
firestore._databaseId,
56+
(stages: Stage[]) => {
57+
return new Pipeline(
58+
firestore,
59+
newUserDataReader(firestore),
60+
new ExpUserDataWriter(firestore),
61+
stages
62+
);
63+
}
64+
);
6265
} else {
6366
const query = firestoreOrQuery;
6467
const db = cast<Firestore>(query.firestore, Firestore);

packages/firestore/src/api_pipelines.ts

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,61 @@ export {
107107
genericFunction,
108108
ascending,
109109
descending,
110+
countif,
111+
bitAnd,
112+
bitOr,
113+
bitXor,
114+
bitNot,
115+
bitLeftShift,
116+
bitRightShift,
117+
rand,
118+
array,
119+
arrayOffset,
120+
currentContext,
121+
isError,
122+
ifError,
123+
isAbsent,
124+
isNull,
125+
isNotNull,
126+
isNotNan,
127+
map,
128+
mapRemove,
129+
mapMerge,
130+
parent,
131+
collectionId,
132+
documentIdFunction,
133+
key,
134+
substr,
135+
manhattanDistance,
136+
Countif,
137+
BitAnd,
138+
BitOr,
139+
BitXor,
140+
BitNot,
141+
BitLeftShift,
142+
BitRightShift,
143+
Rand,
144+
ArrayFunction,
145+
ArrayOffset,
146+
CurrentContext,
147+
IsError,
148+
IfError,
149+
IsAbsent,
150+
IsNull,
151+
IsNotNull,
152+
IsNotNan,
153+
MapFunction,
154+
MapRemove,
155+
MapMerge,
156+
Parent,
157+
CollectionId,
158+
DocumentId,
159+
Key,
160+
Substr,
161+
ManhattanDistance,
110162
Expr,
111163
ExprWithAlias,
112164
Field,
113-
Fields,
114165
Constant,
115166
FirestoreFunction,
116167
Add,

0 commit comments

Comments
 (0)