tyneq 1.0.0 → 1.0.2
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/README.md +67 -1
- package/dist/{TyneqCachedTerminalOperator.d.ts → TyneqCachedTerminalOperator-BrW77zIy.d.ts} +328 -173
- package/dist/{TyneqCachedTerminalOperator.d.cts → TyneqCachedTerminalOperator-EaNiNt61.d.cts} +328 -173
- package/dist/chunk-5R4AALC7.js +680 -0
- package/dist/chunk-C5PBY3ZU.cjs +46 -0
- package/dist/chunk-OWKUE3AC.cjs +680 -0
- package/dist/chunk-PCBN5AFG.js +46 -0
- package/dist/chunk-VJAICXA6.cjs +3788 -0
- package/dist/chunk-ZP6WMZCK.js +3788 -0
- package/dist/core-C54TSmgW.d.cts +1390 -0
- package/dist/core-C54TSmgW.d.ts +1390 -0
- package/dist/index.cjs +638 -843
- package/dist/index.d.cts +405 -605
- package/dist/index.d.ts +405 -605
- package/dist/index.js +630 -781
- package/dist/plugin/index.cjs +51 -24
- package/dist/plugin/index.d.cts +35 -38
- package/dist/plugin/index.d.ts +35 -38
- package/dist/plugin/index.js +51 -2
- package/dist/utility/index.cjs +18 -9
- package/dist/utility/index.d.cts +312 -2
- package/dist/utility/index.d.ts +312 -2
- package/dist/utility/index.js +18 -3
- package/package.json +5 -5
- package/dist/Lazy.cjs +0 -762
- package/dist/Lazy.cjs.map +0 -1
- package/dist/Lazy.js +0 -691
- package/dist/Lazy.js.map +0 -1
- package/dist/TyneqCachedTerminalOperator.cjs +0 -4950
- package/dist/TyneqCachedTerminalOperator.cjs.map +0 -1
- package/dist/TyneqCachedTerminalOperator.d.cts.map +0 -1
- package/dist/TyneqCachedTerminalOperator.d.ts.map +0 -1
- package/dist/TyneqCachedTerminalOperator.js +0 -4741
- package/dist/TyneqCachedTerminalOperator.js.map +0 -1
- package/dist/ValidationBuilder.cjs +0 -80
- package/dist/ValidationBuilder.cjs.map +0 -1
- package/dist/ValidationBuilder.d.cts +0 -319
- package/dist/ValidationBuilder.d.cts.map +0 -1
- package/dist/ValidationBuilder.d.ts +0 -319
- package/dist/ValidationBuilder.d.ts.map +0 -1
- package/dist/ValidationBuilder.js +0 -69
- package/dist/ValidationBuilder.js.map +0 -1
- package/dist/core.d.cts +0 -1393
- package/dist/core.d.cts.map +0 -1
- package/dist/core.d.ts +0 -1393
- package/dist/core.d.ts.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/plugin/index.d.cts.map +0 -1
- package/dist/plugin/index.d.ts.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,863 +1,658 @@
|
|
|
1
|
-
Object.defineProperty(exports,
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
var _chunkVJAICXA6cjs = require('./chunk-VJAICXA6.cjs');
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
var _chunkC5PBY3ZUcjs = require('./chunk-C5PBY3ZU.cjs');
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
var _chunkOWKUE3ACcjs = require('./chunk-OWKUE3AC.cjs');
|
|
58
|
+
|
|
59
|
+
// src/core/generators/range.ts
|
|
60
|
+
var RangeEnumerator = class extends _chunkVJAICXA6cjs.TyneqBaseEnumerator {
|
|
61
|
+
constructor(start, end) {
|
|
62
|
+
super();
|
|
63
|
+
this.current = start;
|
|
64
|
+
this.end = end;
|
|
65
|
+
}
|
|
66
|
+
handleNext() {
|
|
67
|
+
if (this.current > this.end) {
|
|
68
|
+
return this.done();
|
|
69
|
+
}
|
|
70
|
+
return this.yield(this.current++);
|
|
71
|
+
}
|
|
18
72
|
};
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
var RandomEnumerator = class extends
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
73
|
+
|
|
74
|
+
// src/core/generators/random.ts
|
|
75
|
+
var RandomEnumerator = class extends _chunkVJAICXA6cjs.TyneqBaseEnumerator {
|
|
76
|
+
constructor(count, randomizer) {
|
|
77
|
+
super();
|
|
78
|
+
this.yieldedCount = 0;
|
|
79
|
+
this.count = count;
|
|
80
|
+
this.randomizer = randomizer;
|
|
81
|
+
}
|
|
82
|
+
handleNext() {
|
|
83
|
+
if (this.yieldedCount >= this.count) {
|
|
84
|
+
return this.done();
|
|
85
|
+
}
|
|
86
|
+
this.yieldedCount++;
|
|
87
|
+
return this.yield(this.randomizer());
|
|
88
|
+
}
|
|
35
89
|
};
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Wraps a native `Iterable<T>` as a Tyneq {@link Enumerable}.
|
|
40
|
-
*
|
|
41
|
-
* @remarks
|
|
42
|
-
* Used by `Tyneq.from()` to adapt arrays, sets, generators, and any other iterable.
|
|
43
|
-
* Each call to `getEnumerator()` delegates to the underlying `[Symbol.iterator]()`.
|
|
44
|
-
*
|
|
45
|
-
* @internal
|
|
46
|
-
*/
|
|
90
|
+
|
|
91
|
+
// src/core/EnumerableAdapter.ts
|
|
47
92
|
var EnumerableAdapter = class {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
93
|
+
constructor(iterable) {
|
|
94
|
+
_chunkOWKUE3ACcjs.ArgumentUtility.checkNotOptional({ iterable });
|
|
95
|
+
_chunkOWKUE3ACcjs.ArgumentUtility.checkIterable({ iterable });
|
|
96
|
+
this.iterable = iterable;
|
|
97
|
+
}
|
|
98
|
+
[Symbol.iterator]() {
|
|
99
|
+
return this.getEnumerator();
|
|
100
|
+
}
|
|
101
|
+
getEnumerator() {
|
|
102
|
+
return this.iterable[Symbol.iterator]();
|
|
103
|
+
}
|
|
60
104
|
};
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
this.value = value;
|
|
78
|
-
}
|
|
79
|
-
handleNext() {
|
|
80
|
-
if (this.yieldedCount >= this.count) return this.done();
|
|
81
|
-
this.yieldedCount++;
|
|
82
|
-
return this.yieldedCount === this.count ? this.doneWithYield(this.value) : this.yield(this.value);
|
|
83
|
-
}
|
|
105
|
+
|
|
106
|
+
// src/core/generators/repeat.ts
|
|
107
|
+
var RepeatEnumerator = class extends _chunkVJAICXA6cjs.TyneqBaseEnumerator {
|
|
108
|
+
constructor(value, count) {
|
|
109
|
+
super();
|
|
110
|
+
this.yieldedCount = 0;
|
|
111
|
+
this.count = count;
|
|
112
|
+
this.value = value;
|
|
113
|
+
}
|
|
114
|
+
handleNext() {
|
|
115
|
+
if (this.yieldedCount >= this.count) {
|
|
116
|
+
return this.done();
|
|
117
|
+
}
|
|
118
|
+
this.yieldedCount++;
|
|
119
|
+
return this.yieldedCount === this.count ? this.doneWithYield(this.value) : this.yield(this.value);
|
|
120
|
+
}
|
|
84
121
|
};
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}
|
|
106
|
-
handleNext() {
|
|
107
|
-
if (this.yieldedCount >= this.count) return this.done();
|
|
108
|
-
const result = this.nextSelector(this.value, this.index++);
|
|
109
|
-
this.value = result;
|
|
110
|
-
this.yieldedCount++;
|
|
111
|
-
return this.yield(result);
|
|
112
|
-
}
|
|
122
|
+
|
|
123
|
+
// src/core/generators/generate.ts
|
|
124
|
+
var GenerateEnumerator = class extends _chunkVJAICXA6cjs.TyneqBaseEnumerator {
|
|
125
|
+
constructor(seed, next, count) {
|
|
126
|
+
super();
|
|
127
|
+
this.yieldedCount = 0;
|
|
128
|
+
this.index = 0;
|
|
129
|
+
this.value = seed;
|
|
130
|
+
this.nextSelector = next;
|
|
131
|
+
this.count = count != null ? count : Infinity;
|
|
132
|
+
}
|
|
133
|
+
handleNext() {
|
|
134
|
+
if (this.yieldedCount >= this.count) {
|
|
135
|
+
return this.done();
|
|
136
|
+
}
|
|
137
|
+
const result = this.nextSelector(this.value, this.index++);
|
|
138
|
+
this.value = result;
|
|
139
|
+
this.yieldedCount++;
|
|
140
|
+
return this.yield(result);
|
|
141
|
+
}
|
|
113
142
|
};
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
return this.done();
|
|
146
|
-
}
|
|
143
|
+
|
|
144
|
+
// src/core/generators/sourceConcat.ts
|
|
145
|
+
var SourceConcatEnumerator = class extends _chunkVJAICXA6cjs.TyneqBaseEnumerator {
|
|
146
|
+
constructor(...sources) {
|
|
147
|
+
super();
|
|
148
|
+
this.currentSourceIndex = 0;
|
|
149
|
+
this.currentIterator = null;
|
|
150
|
+
this.sources = sources;
|
|
151
|
+
}
|
|
152
|
+
disposeAdditional() {
|
|
153
|
+
var _a, _b;
|
|
154
|
+
try {
|
|
155
|
+
(_b = (_a = this.currentIterator) == null ? void 0 : _a.return) == null ? void 0 : _b.call(_a);
|
|
156
|
+
} catch (e) {
|
|
157
|
+
}
|
|
158
|
+
this.currentIterator = null;
|
|
159
|
+
}
|
|
160
|
+
handleNext() {
|
|
161
|
+
while (this.currentSourceIndex < this.sources.length) {
|
|
162
|
+
if (this.currentIterator === null) {
|
|
163
|
+
this.currentIterator = this.sources[this.currentSourceIndex][Symbol.iterator]();
|
|
164
|
+
}
|
|
165
|
+
const result = this.currentIterator.next();
|
|
166
|
+
if (!result.done) {
|
|
167
|
+
return this.yield(result.value);
|
|
168
|
+
}
|
|
169
|
+
this.currentIterator = null;
|
|
170
|
+
this.currentSourceIndex++;
|
|
171
|
+
}
|
|
172
|
+
return this.done();
|
|
173
|
+
}
|
|
147
174
|
};
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
* @remarks
|
|
250
|
-
* The selector receives `(currentValue, index)`. Each call's return value becomes the input
|
|
251
|
-
* for the next call. Omit `count` for an infinite sequence; pair with `take` to bound it.
|
|
252
|
-
*
|
|
253
|
-
* @example
|
|
254
|
-
* ```ts
|
|
255
|
-
* Tyneq.generate(1, (x) => x * 2, 4).toArray(); // -> [2, 4, 8, 16]
|
|
256
|
-
* ```
|
|
257
|
-
*
|
|
258
|
-
* @throws {ArgumentNullError} When `next` is null or undefined.
|
|
259
|
-
* @throws {ArgumentOutOfRangeError} When `count` is negative.
|
|
260
|
-
* @throws {ArgumentError} When `count` is not an integer.
|
|
261
|
-
*/
|
|
262
|
-
@require_TyneqCachedTerminalOperator.source({ source: "internal" }) static generate(seed, next, count) {
|
|
263
|
-
require_Lazy.ArgumentUtility.checkNotOptional({ next });
|
|
264
|
-
if (count !== void 0) {
|
|
265
|
-
require_Lazy.ArgumentUtility.checkNonNegative({ count });
|
|
266
|
-
require_Lazy.ArgumentUtility.checkInteger({ count });
|
|
267
|
-
}
|
|
268
|
-
return new require_TyneqCachedTerminalOperator.TyneqEnumerable({ getEnumerator: () => new GenerateEnumerator(seed, next, count) }, new require_TyneqCachedTerminalOperator.QueryNode("generate", [
|
|
269
|
-
seed,
|
|
270
|
-
next,
|
|
271
|
-
count
|
|
272
|
-
], null, "source"));
|
|
273
|
-
}
|
|
274
|
-
/**
|
|
275
|
-
* Creates a sequence that yields all elements from each source in order.
|
|
276
|
-
*
|
|
277
|
-
* @remarks
|
|
278
|
-
* Returns an empty sequence when called with no arguments.
|
|
279
|
-
*
|
|
280
|
-
* @example
|
|
281
|
-
* ```ts
|
|
282
|
-
* Tyneq.concat([1, 2], [3, 4], [5]).toArray(); // -> [1, 2, 3, 4, 5]
|
|
283
|
-
* ```
|
|
284
|
-
*
|
|
285
|
-
* @throws {ArgumentNullError} When any `source` is null or undefined.
|
|
286
|
-
* @throws {ArgumentTypeError} When any `source` is not iterable.
|
|
287
|
-
*/
|
|
288
|
-
@require_TyneqCachedTerminalOperator.source({ source: "internal" }) static concat(...sources) {
|
|
289
|
-
for (const source of sources) {
|
|
290
|
-
require_Lazy.ArgumentUtility.checkNotOptional({ source });
|
|
291
|
-
require_Lazy.ArgumentUtility.checkIterable({ source });
|
|
292
|
-
}
|
|
293
|
-
return new require_TyneqCachedTerminalOperator.TyneqEnumerable({ getEnumerator: () => new SourceConcatEnumerator(...sources) }, new require_TyneqCachedTerminalOperator.QueryNode("concat", sources, null, "source"));
|
|
294
|
-
}
|
|
295
|
-
/**
|
|
296
|
-
* Pairs each element with its zero-based index.
|
|
297
|
-
*
|
|
298
|
-
* @remarks
|
|
299
|
-
* Each iteration produces independent index counters - safe to re-enumerate.
|
|
300
|
-
*
|
|
301
|
-
* @example
|
|
302
|
-
* ```ts
|
|
303
|
-
* Tyneq.enumerate(["a", "b", "c"]).toArray();
|
|
304
|
-
* // -> [[0, "a"], [1, "b"], [2, "c"]]
|
|
305
|
-
* ```
|
|
306
|
-
*
|
|
307
|
-
* @throws {ArgumentNullError} When `source` is null or undefined.
|
|
308
|
-
* @throws {ArgumentTypeError} When `source` is not iterable.
|
|
309
|
-
*/
|
|
310
|
-
static enumerate(source) {
|
|
311
|
-
require_Lazy.ArgumentUtility.checkNotOptional({ source });
|
|
312
|
-
require_Lazy.ArgumentUtility.checkIterable({ source });
|
|
313
|
-
return this.from({ *[Symbol.iterator]() {
|
|
314
|
-
let index = 0;
|
|
315
|
-
for (const item of source) yield [index++, item];
|
|
316
|
-
} });
|
|
317
|
-
}
|
|
175
|
+
|
|
176
|
+
// src/core/tyneq.ts
|
|
177
|
+
var _concat_dec, _generate_dec, _repeat_dec, _empty_dec, _range_dec, _random_dec, _from_dec, _init;
|
|
178
|
+
_from_dec = [_chunkVJAICXA6cjs.source.call(void 0, { source: "internal" })], _random_dec = [_chunkVJAICXA6cjs.source.call(void 0, { source: "internal" })], _range_dec = [_chunkVJAICXA6cjs.source.call(void 0, { source: "internal" })], _empty_dec = [_chunkVJAICXA6cjs.source.call(void 0, { source: "internal" })], _repeat_dec = [_chunkVJAICXA6cjs.source.call(void 0, { source: "internal" })], _generate_dec = [_chunkVJAICXA6cjs.source.call(void 0, { source: "internal" })], _concat_dec = [_chunkVJAICXA6cjs.source.call(void 0, { source: "internal" })];
|
|
179
|
+
var _Tyneq = class _Tyneq {
|
|
180
|
+
static from(source2) {
|
|
181
|
+
_chunkOWKUE3ACcjs.ArgumentUtility.checkNotOptional({ source: source2 });
|
|
182
|
+
_chunkOWKUE3ACcjs.ArgumentUtility.checkIterable({ source: source2 });
|
|
183
|
+
const sourceKind = _Tyneq.resolveSourceKind(source2);
|
|
184
|
+
const adapter = new EnumerableAdapter(source2);
|
|
185
|
+
return new (0, _chunkVJAICXA6cjs.TyneqEnumerable)(adapter, new (0, _chunkVJAICXA6cjs.QueryNode)("from", [source2], null, "source", sourceKind));
|
|
186
|
+
}
|
|
187
|
+
static resolveSourceKind(source2) {
|
|
188
|
+
if (Array.isArray(source2)) return "array";
|
|
189
|
+
if (source2 instanceof Set) return "set";
|
|
190
|
+
if (source2 instanceof Map) return "map";
|
|
191
|
+
if (typeof source2 === "string") return "string";
|
|
192
|
+
return "other";
|
|
193
|
+
}
|
|
194
|
+
static random(count, randomizer) {
|
|
195
|
+
_chunkOWKUE3ACcjs.ArgumentUtility.checkNonNegative({ count });
|
|
196
|
+
_chunkOWKUE3ACcjs.ArgumentUtility.checkInteger({ count });
|
|
197
|
+
_chunkOWKUE3ACcjs.ArgumentUtility.checkNotOptional({ randomizer });
|
|
198
|
+
return new (0, _chunkVJAICXA6cjs.TyneqEnumerable)({
|
|
199
|
+
getEnumerator: () => new RandomEnumerator(count, randomizer)
|
|
200
|
+
}, new (0, _chunkVJAICXA6cjs.QueryNode)("random", [count, randomizer], null, "source"));
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Returns `true` if `source` is `null`, `undefined`, or an iterable whose first element is `null` or `undefined`.
|
|
204
|
+
*/
|
|
205
|
+
static isNullOrEmpty(source2) {
|
|
206
|
+
if (source2 === null || source2 === void 0) {
|
|
207
|
+
return true;
|
|
208
|
+
}
|
|
209
|
+
return this.from(source2).isNullOrEmpty();
|
|
210
|
+
}
|
|
211
|
+
static range(start, count) {
|
|
212
|
+
_chunkOWKUE3ACcjs.ArgumentUtility.checkNonNegative({ count });
|
|
213
|
+
_chunkOWKUE3ACcjs.ArgumentUtility.checkInteger({ count });
|
|
214
|
+
const end = start + count - 1;
|
|
215
|
+
return new (0, _chunkVJAICXA6cjs.TyneqEnumerable)({
|
|
216
|
+
getEnumerator: () => new RangeEnumerator(start, end)
|
|
217
|
+
}, new (0, _chunkVJAICXA6cjs.QueryNode)("range", [start, count], null, "source"));
|
|
218
|
+
}
|
|
219
|
+
static empty() {
|
|
220
|
+
return new (0, _chunkVJAICXA6cjs.TyneqEnumerable)(
|
|
221
|
+
new EnumerableAdapter([]),
|
|
222
|
+
new (0, _chunkVJAICXA6cjs.QueryNode)("empty", [], null, "source")
|
|
223
|
+
);
|
|
224
|
+
}
|
|
225
|
+
static repeat(value, count) {
|
|
226
|
+
_chunkOWKUE3ACcjs.ArgumentUtility.checkNonNegative({ count });
|
|
227
|
+
_chunkOWKUE3ACcjs.ArgumentUtility.checkInteger({ count });
|
|
228
|
+
return new (0, _chunkVJAICXA6cjs.TyneqEnumerable)({
|
|
229
|
+
getEnumerator: () => new RepeatEnumerator(value, count)
|
|
230
|
+
}, new (0, _chunkVJAICXA6cjs.QueryNode)("repeat", [value, count], null, "source"));
|
|
231
|
+
}
|
|
232
|
+
static generate(seed, next, count) {
|
|
233
|
+
_chunkOWKUE3ACcjs.ArgumentUtility.checkNotOptional({ next });
|
|
234
|
+
if (count !== void 0) {
|
|
235
|
+
_chunkOWKUE3ACcjs.ArgumentUtility.checkNonNegative({ count });
|
|
236
|
+
_chunkOWKUE3ACcjs.ArgumentUtility.checkInteger({ count });
|
|
237
|
+
}
|
|
238
|
+
return new (0, _chunkVJAICXA6cjs.TyneqEnumerable)({
|
|
239
|
+
getEnumerator: () => new GenerateEnumerator(seed, next, count)
|
|
240
|
+
}, new (0, _chunkVJAICXA6cjs.QueryNode)("generate", [seed, next, count], null, "source"));
|
|
241
|
+
}
|
|
242
|
+
static concat(...sources) {
|
|
243
|
+
for (const source2 of sources) {
|
|
244
|
+
_chunkOWKUE3ACcjs.ArgumentUtility.checkNotOptional({ source: source2 });
|
|
245
|
+
_chunkOWKUE3ACcjs.ArgumentUtility.checkIterable({ source: source2 });
|
|
246
|
+
}
|
|
247
|
+
return new (0, _chunkVJAICXA6cjs.TyneqEnumerable)({
|
|
248
|
+
getEnumerator: () => new SourceConcatEnumerator(...sources)
|
|
249
|
+
}, new (0, _chunkVJAICXA6cjs.QueryNode)("concat", sources, null, "source"));
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* Pairs each element with its zero-based index.
|
|
253
|
+
*
|
|
254
|
+
* @remarks
|
|
255
|
+
* Each iteration produces independent index counters - safe to re-enumerate.
|
|
256
|
+
*
|
|
257
|
+
* @example
|
|
258
|
+
* ```ts
|
|
259
|
+
* Tyneq.enumerate(["a", "b", "c"]).toArray();
|
|
260
|
+
* // -> [[0, "a"], [1, "b"], [2, "c"]]
|
|
261
|
+
* ```
|
|
262
|
+
*
|
|
263
|
+
* @throws {ArgumentNullError} When `source` is null or undefined.
|
|
264
|
+
* @throws {ArgumentTypeError} When `source` is not iterable.
|
|
265
|
+
*/
|
|
266
|
+
static enumerate(source2) {
|
|
267
|
+
_chunkOWKUE3ACcjs.ArgumentUtility.checkNotOptional({ source: source2 });
|
|
268
|
+
_chunkOWKUE3ACcjs.ArgumentUtility.checkIterable({ source: source2 });
|
|
269
|
+
return this.from({
|
|
270
|
+
*[Symbol.iterator]() {
|
|
271
|
+
let index = 0;
|
|
272
|
+
for (const item of source2) yield [index++, item];
|
|
273
|
+
}
|
|
274
|
+
});
|
|
275
|
+
}
|
|
318
276
|
};
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
}
|
|
277
|
+
_init = _chunkOWKUE3ACcjs.__decoratorStart.call(void 0, null);
|
|
278
|
+
_chunkOWKUE3ACcjs.__decorateElement.call(void 0, _init, 9, "from", _from_dec, _Tyneq);
|
|
279
|
+
_chunkOWKUE3ACcjs.__decorateElement.call(void 0, _init, 9, "random", _random_dec, _Tyneq);
|
|
280
|
+
_chunkOWKUE3ACcjs.__decorateElement.call(void 0, _init, 9, "range", _range_dec, _Tyneq);
|
|
281
|
+
_chunkOWKUE3ACcjs.__decorateElement.call(void 0, _init, 9, "empty", _empty_dec, _Tyneq);
|
|
282
|
+
_chunkOWKUE3ACcjs.__decorateElement.call(void 0, _init, 9, "repeat", _repeat_dec, _Tyneq);
|
|
283
|
+
_chunkOWKUE3ACcjs.__decorateElement.call(void 0, _init, 9, "generate", _generate_dec, _Tyneq);
|
|
284
|
+
_chunkOWKUE3ACcjs.__decorateElement.call(void 0, _init, 9, "concat", _concat_dec, _Tyneq);
|
|
285
|
+
_chunkOWKUE3ACcjs.__decoratorMetadata.call(void 0, _init, _Tyneq);
|
|
286
|
+
_chunkOWKUE3ACcjs.__runInitializers.call(void 0, _init, 3, _Tyneq);
|
|
287
|
+
var Tyneq = _Tyneq;
|
|
288
|
+
|
|
289
|
+
// src/core/errors/KeyNotFoundError.ts
|
|
290
|
+
var KeyNotFoundError = class extends _chunkOWKUE3ACcjs.TyneqError {
|
|
291
|
+
constructor(message = "The given key was not present in the dictionary.", inner) {
|
|
292
|
+
super(message, { inner });
|
|
293
|
+
}
|
|
337
294
|
};
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
* ```ts
|
|
345
|
-
* try { iterator.throw?.(new Error()); }
|
|
346
|
-
* catch (e) { if (e instanceof NotSupportedError) { ... } }
|
|
347
|
-
* ```
|
|
348
|
-
*
|
|
349
|
-
* @see {@link TyneqError}
|
|
350
|
-
* @group Errors
|
|
351
|
-
*/
|
|
352
|
-
var NotSupportedError = class extends require_Lazy.TyneqError {
|
|
353
|
-
constructor(message = "The requested operation is not supported.", inner) {
|
|
354
|
-
super(message, { inner });
|
|
355
|
-
}
|
|
295
|
+
|
|
296
|
+
// src/core/errors/NotSupportedError.ts
|
|
297
|
+
var NotSupportedError = class extends _chunkOWKUE3ACcjs.TyneqError {
|
|
298
|
+
constructor(message = "The requested operation is not supported.", inner) {
|
|
299
|
+
super(message, { inner });
|
|
300
|
+
}
|
|
356
301
|
};
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
* try { compiler.compile(plan); }
|
|
366
|
-
* catch (e) {
|
|
367
|
-
* if (e instanceof CompilerError) {
|
|
368
|
-
* console.log(e.operatorName, e.phase, e.message);
|
|
369
|
-
* }
|
|
370
|
-
* }
|
|
371
|
-
* ```
|
|
372
|
-
*
|
|
373
|
-
* @see {@link TyneqError}
|
|
374
|
-
* @group Errors
|
|
375
|
-
*/
|
|
376
|
-
var CompilerError = class extends require_Lazy.TyneqError {
|
|
377
|
-
/** The name of the operator being compiled when the error occurred, if known. */
|
|
378
|
-
operatorName;
|
|
379
|
-
/**
|
|
380
|
-
* The compilation phase in which the error occurred.
|
|
381
|
-
* - `"transform"` - during query plan transformation (pre-compile)
|
|
382
|
-
* - `"source"` - while compiling a source node
|
|
383
|
-
* - `"operator"` - while applying an operator node
|
|
384
|
-
*/
|
|
385
|
-
phase;
|
|
386
|
-
constructor(message, phase, operatorName, inner) {
|
|
387
|
-
super(message, { inner });
|
|
388
|
-
this.phase = phase;
|
|
389
|
-
this.operatorName = operatorName;
|
|
390
|
-
}
|
|
302
|
+
|
|
303
|
+
// src/core/errors/CompilerError.ts
|
|
304
|
+
var CompilerError = class extends _chunkOWKUE3ACcjs.TyneqError {
|
|
305
|
+
constructor(message, phase, operatorName, inner) {
|
|
306
|
+
super(message, { inner });
|
|
307
|
+
this.phase = phase;
|
|
308
|
+
this.operatorName = operatorName;
|
|
309
|
+
}
|
|
391
310
|
};
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
*
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
return this.collectNodes(node).map((n, index) => {
|
|
456
|
-
const argStr = n.args.map((a) => this.formatArg(a)).join(", ");
|
|
457
|
-
return this.formatLine(n.operatorName, argStr, index === 0);
|
|
458
|
-
}).join("\n");
|
|
459
|
-
}
|
|
460
|
-
collectNodes(node) {
|
|
461
|
-
const nodes = [];
|
|
462
|
-
let current = node;
|
|
463
|
-
while (current !== null) {
|
|
464
|
-
nodes.push(current);
|
|
465
|
-
current = current.source;
|
|
466
|
-
}
|
|
467
|
-
nodes.reverse();
|
|
468
|
-
return nodes;
|
|
469
|
-
}
|
|
311
|
+
|
|
312
|
+
// src/queryplan/QueryPlanPrinter.ts
|
|
313
|
+
var QueryPlanPrinter = class _QueryPlanPrinter {
|
|
314
|
+
constructor(options = {}) {
|
|
315
|
+
var _a, _b, _c;
|
|
316
|
+
this.indent = (_a = options.indent) != null ? _a : " ";
|
|
317
|
+
this.arrow = (_b = options.arrow) != null ? _b : "->";
|
|
318
|
+
this.maxInlineArrayItems = (_c = options.maxInlineArrayItems) != null ? _c : 3;
|
|
319
|
+
}
|
|
320
|
+
/** Renders the full query plan rooted at `node` as a multi-line string. */
|
|
321
|
+
visit(node) {
|
|
322
|
+
const result = this.buildPlan(node);
|
|
323
|
+
return result;
|
|
324
|
+
}
|
|
325
|
+
/** Convenience static: creates a printer with `options` and calls `visit(node)`. */
|
|
326
|
+
static print(node, options) {
|
|
327
|
+
return new _QueryPlanPrinter(options).visit(node);
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* Formats a single operator argument for display.
|
|
331
|
+
* Override to customise how arguments appear in printed plans.
|
|
332
|
+
*/
|
|
333
|
+
formatArg(arg) {
|
|
334
|
+
if (typeof arg === "function") return "<fn>";
|
|
335
|
+
if (arg === null) return "null";
|
|
336
|
+
if (arg === void 0) return "undefined";
|
|
337
|
+
if (typeof arg === "string") return `"${arg}"`;
|
|
338
|
+
if (Array.isArray(arg)) {
|
|
339
|
+
if (arg.length === 0) return "[]";
|
|
340
|
+
if (arg.length <= this.maxInlineArrayItems) {
|
|
341
|
+
return `[${arg.map((a) => this.formatArg(a)).join(", ")}]`;
|
|
342
|
+
}
|
|
343
|
+
return `[...${arg.length} items]`;
|
|
344
|
+
}
|
|
345
|
+
if (typeof arg === "object") return "{...}";
|
|
346
|
+
return String(arg);
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* Formats one line of the plan output.
|
|
350
|
+
* Override to customise indentation or arrow style beyond what `QueryPlanPrinterOptions` allows.
|
|
351
|
+
*/
|
|
352
|
+
formatLine(name, argStr, isRoot) {
|
|
353
|
+
const prefix = isRoot ? "" : `${this.indent}${this.arrow} `;
|
|
354
|
+
return `${prefix}${name}(${argStr})`;
|
|
355
|
+
}
|
|
356
|
+
buildPlan(node) {
|
|
357
|
+
const nodes = this.collectNodes(node);
|
|
358
|
+
const lines = nodes.map((n, index) => {
|
|
359
|
+
const argStr = n.args.map((a) => this.formatArg(a)).join(", ");
|
|
360
|
+
return this.formatLine(n.operatorName, argStr, index === 0);
|
|
361
|
+
});
|
|
362
|
+
return lines.join("\n");
|
|
363
|
+
}
|
|
364
|
+
collectNodes(node) {
|
|
365
|
+
const nodes = [];
|
|
366
|
+
let current = node;
|
|
367
|
+
while (current !== null) {
|
|
368
|
+
nodes.push(current);
|
|
369
|
+
current = current.source;
|
|
370
|
+
}
|
|
371
|
+
nodes.reverse();
|
|
372
|
+
return nodes;
|
|
373
|
+
}
|
|
470
374
|
};
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
/**
|
|
474
|
-
* Concrete base class for side-effect query plan visitors.
|
|
475
|
-
*
|
|
476
|
-
* @remarks
|
|
477
|
-
* Traverses the node chain calling {@link QueryPlanWalker.visitNode} once per node.
|
|
478
|
-
* The traversal direction defaults to `"source-to-terminal"` (bottom-up: `from` before
|
|
479
|
-
* `where` before `select`) and can be changed to `"terminal-to-source"` (top-down) via
|
|
480
|
-
* the options object.
|
|
481
|
-
*
|
|
482
|
-
* ### Usage patterns
|
|
483
|
-
*
|
|
484
|
-
* **Direct instantiation with a callback** - no subclass needed for simple traversals:
|
|
485
|
-
* ```ts
|
|
486
|
-
* const names: string[] = [];
|
|
487
|
-
* new QueryPlanWalker({ callback: node => names.push(node.operatorName) }).visit(plan);
|
|
488
|
-
* ```
|
|
489
|
-
*
|
|
490
|
-
* **Subclass** - for stateful walkers that accumulate results across nodes:
|
|
491
|
-
* ```ts
|
|
492
|
-
* class NodeCounter extends QueryPlanWalker {
|
|
493
|
-
* public count = 0;
|
|
494
|
-
* protected override visitNode(_node: QueryPlanNode): void { this.count++; }
|
|
495
|
-
* }
|
|
496
|
-
*
|
|
497
|
-
* const counter = new NodeCounter();
|
|
498
|
-
* counter.visit(seq[tyneqQueryNode]!);
|
|
499
|
-
* console.log(counter.count); // number of operators in the pipeline
|
|
500
|
-
* ```
|
|
501
|
-
*
|
|
502
|
-
* **Top-down traversal:**
|
|
503
|
-
* ```ts
|
|
504
|
-
* new QueryPlanWalker({
|
|
505
|
-
* callback: node => console.log(node.operatorName),
|
|
506
|
-
* direction: "terminal-to-source",
|
|
507
|
-
* }).visit(plan);
|
|
508
|
-
* ```
|
|
509
|
-
*
|
|
510
|
-
* **Subclass with direction override** - pass options to `super`:
|
|
511
|
-
* ```ts
|
|
512
|
-
* class ReverseCollector extends QueryPlanWalker {
|
|
513
|
-
* public readonly names: string[] = [];
|
|
514
|
-
* public constructor() { super({ direction: "terminal-to-source" }); }
|
|
515
|
-
* protected override visitNode(node: QueryPlanNode): void {
|
|
516
|
-
* this.names.push(node.operatorName);
|
|
517
|
-
* }
|
|
518
|
-
* }
|
|
519
|
-
* ```
|
|
520
|
-
*
|
|
521
|
-
* @group QueryPlan
|
|
522
|
-
*/
|
|
375
|
+
|
|
376
|
+
// src/queryplan/QueryPlanWalker.ts
|
|
523
377
|
var QueryPlanWalker = class {
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
378
|
+
/**
|
|
379
|
+
* @param options - Optional configuration for the walker.
|
|
380
|
+
*/
|
|
381
|
+
constructor(options) {
|
|
382
|
+
var _a;
|
|
383
|
+
this.callback = options == null ? void 0 : options.callback;
|
|
384
|
+
this.direction = (_a = options == null ? void 0 : options.direction) != null ? _a : "source-to-terminal";
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* Walks the full chain rooted at `node`, calling {@link visitNode} for each node
|
|
388
|
+
* in the configured direction.
|
|
389
|
+
*/
|
|
390
|
+
visit(node) {
|
|
391
|
+
if (this.direction === "source-to-terminal") {
|
|
392
|
+
if (node.source !== null) {
|
|
393
|
+
this.visit(node.source);
|
|
394
|
+
}
|
|
395
|
+
this.visitNode(node);
|
|
396
|
+
} else {
|
|
397
|
+
this.visitNode(node);
|
|
398
|
+
if (node.source !== null) {
|
|
399
|
+
this.visit(node.source);
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* Called once per node during traversal.
|
|
405
|
+
*
|
|
406
|
+
* @remarks
|
|
407
|
+
* The default implementation fires the callback passed via options (if any).
|
|
408
|
+
* Override this method in a subclass to provide custom behaviour. Subclasses that
|
|
409
|
+
* override this method decide whether to call `super.visitNode(node)` to also fire
|
|
410
|
+
* the options callback.
|
|
411
|
+
*
|
|
412
|
+
* @param node - The current node being visited.
|
|
413
|
+
*/
|
|
414
|
+
visitNode(node) {
|
|
415
|
+
var _a;
|
|
416
|
+
(_a = this.callback) == null ? void 0 : _a.call(this, node);
|
|
417
|
+
}
|
|
560
418
|
};
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
/**
|
|
564
|
-
* Base class for immutable query plan rewriting.
|
|
565
|
-
*
|
|
566
|
-
* @remarks
|
|
567
|
-
* Recursively rebuilds the node chain, calling {@link QueryPlanTransformer.transformNode}
|
|
568
|
-
* once per node. The default implementation is an **identity transform** - every node is
|
|
569
|
-
* reconstructed with the same data, producing a structurally equivalent copy.
|
|
570
|
-
*
|
|
571
|
-
* Subclasses override `transformNode` to intercept specific operators. Three rewrite
|
|
572
|
-
* patterns are possible:
|
|
573
|
-
*
|
|
574
|
-
* - **Rewrite a node** - return a new `QueryNode` with different `operatorName` or `args`
|
|
575
|
-
* - **Remove a node** - return `source` directly, skipping this node
|
|
576
|
-
* - **Collapse two nodes into one** - use `source` as the new node's `source` (fusing
|
|
577
|
-
* the current node with its already-transformed predecessor)
|
|
578
|
-
*
|
|
579
|
-
* @example
|
|
580
|
-
* ```ts
|
|
581
|
-
* // Rename all 'where' nodes to 'filter' in the plan view
|
|
582
|
-
* class RenameWhere extends QueryPlanTransformer {
|
|
583
|
-
* protected override transformNode(node: QueryPlanNode, source: QueryPlanNode | null): QueryPlanNode {
|
|
584
|
-
* if (node.operatorName === "where") {
|
|
585
|
-
* return new QueryNode("filter", node.args, source, node.category);
|
|
586
|
-
* }
|
|
587
|
-
* return super.transformNode(node, source);
|
|
588
|
-
* }
|
|
589
|
-
* }
|
|
590
|
-
* ```
|
|
591
|
-
*
|
|
592
|
-
* @group QueryPlan
|
|
593
|
-
*/
|
|
419
|
+
|
|
420
|
+
// src/queryplan/QueryPlanTransformer.ts
|
|
594
421
|
var QueryPlanTransformer = class {
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
422
|
+
/**
|
|
423
|
+
* Transforms the full chain rooted at `node` and returns the new root node.
|
|
424
|
+
*
|
|
425
|
+
* @remarks
|
|
426
|
+
* Processes source-first (bottom-up): the source chain is fully transformed before
|
|
427
|
+
* `transformNode` is called for the current node. This means `source` passed to
|
|
428
|
+
* `transformNode` is always already the transformed predecessor.
|
|
429
|
+
*/
|
|
430
|
+
visit(node) {
|
|
431
|
+
const transformedSource = node.source !== null ? this.visit(node.source) : null;
|
|
432
|
+
return this.transformNode(node, transformedSource);
|
|
433
|
+
}
|
|
434
|
+
/**
|
|
435
|
+
* Transforms a single node. Override to intercept specific operators.
|
|
436
|
+
*
|
|
437
|
+
* @remarks
|
|
438
|
+
* The default implementation reconstructs the node with identical data (identity transform).
|
|
439
|
+
* `source` is the already-transformed predecessor - use it as the `source` of any returned
|
|
440
|
+
* node to preserve chain continuity.
|
|
441
|
+
*
|
|
442
|
+
* @param node - The original node (unmodified).
|
|
443
|
+
* @param source - The transformed predecessor, or `null` for source nodes.
|
|
444
|
+
*/
|
|
445
|
+
transformNode(node, source2) {
|
|
446
|
+
return new (0, _chunkVJAICXA6cjs.QueryNode)(node.operatorName, node.args, source2, node.category, node.sourceKind);
|
|
447
|
+
}
|
|
621
448
|
};
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
/**
|
|
625
|
-
* A built-in {@link QueryPlanTransformer} that fuses redundant consecutive operators.
|
|
626
|
-
*
|
|
627
|
-
* @remarks
|
|
628
|
-
* **This optimizer rewrites the query plan tree only - it does not affect execution of the
|
|
629
|
-
* original sequence.** The returned `QueryPlanNode` reflects what an optimized pipeline would
|
|
630
|
-
* look like; the live sequence that produced the original plan is unchanged.
|
|
631
|
-
*
|
|
632
|
-
* **Fusion is only semantics-preserving for pure, side-effect-free functions.**
|
|
633
|
-
* If a predicate or projection has side effects (e.g. logging, mutation), fusing two nodes into
|
|
634
|
-
* one changes when and how many times those effects fire. For example, in a fused `where`, the
|
|
635
|
-
* second predicate is never called for items that fail the first - any mutation inside the second
|
|
636
|
-
* predicate is skipped for those items. Do not use this optimizer on pipelines with impure
|
|
637
|
-
* predicates or projections.
|
|
638
|
-
*
|
|
639
|
-
* ### Fusions applied
|
|
640
|
-
*
|
|
641
|
-
* | Pattern | Result |
|
|
642
|
-
* |---------|--------|
|
|
643
|
-
* | `where(a) -> where(b)` | `where(x => a(x) && b(x))` |
|
|
644
|
-
* | `select(a) -> select(b)` | `select(x => b(a(x)))` |
|
|
645
|
-
*
|
|
646
|
-
* Additional fusions can be added by subclassing and overriding
|
|
647
|
-
* {@link QueryPlanTransformer.transformNode}.
|
|
648
|
-
*
|
|
649
|
-
* @example
|
|
650
|
-
* ```ts
|
|
651
|
-
* import { Tyneq, tyneqQueryNode, QueryPlanOptimizer, QueryPlanPrinter } from "tyneq";
|
|
652
|
-
*
|
|
653
|
-
* const seq = Tyneq.from([1, 2, 3])
|
|
654
|
-
* .where(x => x > 1)
|
|
655
|
-
* .where(x => x < 3)
|
|
656
|
-
* .select(x => x * 2)
|
|
657
|
-
* .select(x => x + 1);
|
|
658
|
-
*
|
|
659
|
-
* const original = seq[tyneqQueryNode]!;
|
|
660
|
-
* const optimized = new QueryPlanOptimizer().visit(original);
|
|
661
|
-
*
|
|
662
|
-
* console.log(QueryPlanPrinter.print(original));
|
|
663
|
-
* // from([...])
|
|
664
|
-
* // -> where(<fn>)
|
|
665
|
-
* // -> where(<fn>)
|
|
666
|
-
* // -> select(<fn>)
|
|
667
|
-
* // -> select(<fn>)
|
|
668
|
-
*
|
|
669
|
-
* console.log(QueryPlanPrinter.print(optimized));
|
|
670
|
-
* // from([...])
|
|
671
|
-
* // -> where(<fn>)
|
|
672
|
-
* // -> select(<fn>)
|
|
673
|
-
* ```
|
|
674
|
-
*
|
|
675
|
-
* @group QueryPlan
|
|
676
|
-
*/
|
|
449
|
+
|
|
450
|
+
// src/queryplan/QueryPlanOptimizer.ts
|
|
677
451
|
var QueryPlanOptimizer = class extends QueryPlanTransformer {
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
452
|
+
transformNode(node, source2) {
|
|
453
|
+
if (node.operatorName === "where" && (source2 == null ? void 0 : source2.operatorName) === "where") {
|
|
454
|
+
return this.fuseWhere(node, source2);
|
|
455
|
+
}
|
|
456
|
+
if (node.operatorName === "select" && (source2 == null ? void 0 : source2.operatorName) === "select") {
|
|
457
|
+
return this.fuseSelect(node, source2);
|
|
458
|
+
}
|
|
459
|
+
return super.transformNode(node, source2);
|
|
460
|
+
}
|
|
461
|
+
/**
|
|
462
|
+
* @remarks Fusion is only semantics-preserving for pure, side-effect-free predicates.
|
|
463
|
+
*/
|
|
464
|
+
fuseWhere(node, source2) {
|
|
465
|
+
const predA = source2.args[0];
|
|
466
|
+
const predB = node.args[0];
|
|
467
|
+
const fused = (x) => predA(x) && predB(x);
|
|
468
|
+
return new (0, _chunkVJAICXA6cjs.QueryNode)("where", [fused], source2.source, "streaming");
|
|
469
|
+
}
|
|
470
|
+
/**
|
|
471
|
+
* @remarks Fusion is only semantics-preserving for pure, side-effect-free projections.
|
|
472
|
+
*/
|
|
473
|
+
fuseSelect(node, source2) {
|
|
474
|
+
const projA = source2.args[0];
|
|
475
|
+
const projB = node.args[0];
|
|
476
|
+
const fused = (x) => projB(projA(x));
|
|
477
|
+
return new (0, _chunkVJAICXA6cjs.QueryNode)("select", [fused], source2.source, "streaming");
|
|
478
|
+
}
|
|
701
479
|
};
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
/**
|
|
705
|
-
* Compiles a query plan tree into an executable `TyneqSequence`.
|
|
706
|
-
*
|
|
707
|
-
* @remarks
|
|
708
|
-
* Walks the `QueryPlanNode` chain from source to terminal, reconstructing each operator by
|
|
709
|
-
* looking it up in the `OperatorRegistry` and applying it to the compiled source.
|
|
710
|
-
* An optional list of `QueryPlanTransformer` instances runs before compilation, allowing
|
|
711
|
-
* optimization or rewriting of the plan.
|
|
712
|
-
*
|
|
713
|
-
* @example
|
|
714
|
-
* ```ts
|
|
715
|
-
* import { Tyneq, tyneqQueryNode, QueryPlanCompiler, QueryPlanOptimizer } from "tyneq";
|
|
716
|
-
*
|
|
717
|
-
* const seq = Tyneq.from([1, 2, 3]).where(x => x > 1).select(x => x * 2);
|
|
718
|
-
* const compiler = new QueryPlanCompiler([new QueryPlanOptimizer()]);
|
|
719
|
-
* const result = compiler.compile(seq[tyneqQueryNode]!);
|
|
720
|
-
* result.toArray(); // -> [4, 6]
|
|
721
|
-
* ```
|
|
722
|
-
*
|
|
723
|
-
* @group QueryPlan
|
|
724
|
-
*/
|
|
480
|
+
|
|
481
|
+
// src/queryplan/compiler/QueryPlanCompiler.ts
|
|
725
482
|
var QueryPlanCompiler = class {
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
483
|
+
constructor(transformers = []) {
|
|
484
|
+
this.transformers = [...transformers];
|
|
485
|
+
}
|
|
486
|
+
/**
|
|
487
|
+
* Compile a query plan into an executable sequence.
|
|
488
|
+
*
|
|
489
|
+
* Runs all registered transformers before compiling. Use {@link compileRaw} to skip
|
|
490
|
+
* the transform phase when the plan is already optimised.
|
|
491
|
+
*
|
|
492
|
+
* @param node - The root node of the query plan to compile.
|
|
493
|
+
* @param options - Optional compile-time overrides. Use `options.source` to supply a
|
|
494
|
+
* different data source than the one stored in the plan.
|
|
495
|
+
* @returns The compiled sequence typed as `TyneqSequence<T>` by default.
|
|
496
|
+
* If you know the plan ends in an operator that returns a subtype (e.g. `orderBy` ->
|
|
497
|
+
* `TyneqOrderedSequence`, `memoize` -> `TyneqCachedSequence`), supply `TResult` explicitly:
|
|
498
|
+
* `compiler.compile<number, TyneqOrderedSequence<number>>(node)`.
|
|
499
|
+
*/
|
|
500
|
+
compile(node, options) {
|
|
501
|
+
if (node === null || node === void 0) {
|
|
502
|
+
throw new CompilerError(
|
|
503
|
+
"compile() received a null or undefined query plan node. Ensure the sequence was created via Tyneq.from(), Tyneq.range(), or another source operator before compiling.",
|
|
504
|
+
"source"
|
|
505
|
+
);
|
|
506
|
+
}
|
|
507
|
+
const transformedNode = this.transform(node);
|
|
508
|
+
return this.compileNode(transformedNode, options);
|
|
509
|
+
}
|
|
510
|
+
/**
|
|
511
|
+
* Compile a pre-optimised query plan into an executable sequence, skipping the
|
|
512
|
+
* transform phase.
|
|
513
|
+
*
|
|
514
|
+
* @remarks
|
|
515
|
+
* Use this overload when you have already run transformers externally (or deliberately
|
|
516
|
+
* want to bypass them) and want to compile the node as-is. Equivalent to constructing
|
|
517
|
+
* a `QueryPlanCompiler` with no transformers and calling `compile()`.
|
|
518
|
+
*
|
|
519
|
+
* @param node - The root node of the already-transformed query plan to compile.
|
|
520
|
+
* @param options - Optional compile-time overrides. Use `options.source` to supply a
|
|
521
|
+
* different data source than the one stored in the plan.
|
|
522
|
+
*/
|
|
523
|
+
compileRaw(node, options) {
|
|
524
|
+
if (node === null || node === void 0) {
|
|
525
|
+
throw new CompilerError(
|
|
526
|
+
"compileRaw() received a null or undefined query plan node. Ensure the sequence was created via Tyneq.from(), Tyneq.range(), or another source operator before compiling.",
|
|
527
|
+
"source"
|
|
528
|
+
);
|
|
529
|
+
}
|
|
530
|
+
return this.compileNode(node, options);
|
|
531
|
+
}
|
|
532
|
+
transform(node) {
|
|
533
|
+
let transformedNode = node;
|
|
534
|
+
for (const transformer of this.transformers) {
|
|
535
|
+
try {
|
|
536
|
+
transformedNode = transformer.visit(transformedNode);
|
|
537
|
+
} catch (e) {
|
|
538
|
+
throw new CompilerError(
|
|
539
|
+
`Transformer "${transformer.constructor.name}" threw during transformation.`,
|
|
540
|
+
"transform",
|
|
541
|
+
void 0,
|
|
542
|
+
e instanceof Error ? e : void 0
|
|
543
|
+
);
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
return transformedNode;
|
|
547
|
+
}
|
|
548
|
+
compileNode(node, options) {
|
|
549
|
+
if (node.category === "source") {
|
|
550
|
+
return this.compileSource(node, options);
|
|
551
|
+
}
|
|
552
|
+
if (node.source === null) {
|
|
553
|
+
throw new CompilerError(
|
|
554
|
+
"Operator node is missing a source node. Every operator node must have a source.",
|
|
555
|
+
"operator",
|
|
556
|
+
node.operatorName
|
|
557
|
+
);
|
|
558
|
+
}
|
|
559
|
+
return this.applyOperator(this.compileNode(node.source, options), node);
|
|
560
|
+
}
|
|
561
|
+
compileSource(node, options) {
|
|
562
|
+
const entry = _chunkVJAICXA6cjs.OperatorRegistry.getSource(node.operatorName);
|
|
563
|
+
if (!entry) {
|
|
564
|
+
throw new CompilerError(
|
|
565
|
+
`Unknown source operator "${node.operatorName}". Register it via OperatorRegistry.registerSource() before compiling.`,
|
|
566
|
+
"source",
|
|
567
|
+
node.operatorName
|
|
568
|
+
);
|
|
569
|
+
}
|
|
570
|
+
const args = (options == null ? void 0 : options.source) !== void 0 ? [options.source, ...node.args.slice(1)] : [...node.args];
|
|
571
|
+
return entry.impl.apply(null, args);
|
|
572
|
+
}
|
|
573
|
+
applyOperator(source2, node) {
|
|
574
|
+
var _a, _b, _c;
|
|
575
|
+
const entry = this.findOperatorEntry(node.operatorName, source2);
|
|
576
|
+
if (!entry) {
|
|
577
|
+
const sourceType = source2 !== null && source2 !== void 0 ? (_c = (_b = (_a = Object.getPrototypeOf(source2)) == null ? void 0 : _a.constructor) == null ? void 0 : _b.name) != null ? _c : typeof source2 : "null";
|
|
578
|
+
const knownForAnyTarget = _chunkVJAICXA6cjs.OperatorRegistry.hasOperator(node.operatorName);
|
|
579
|
+
const message = knownForAnyTarget ? `Operator "${node.operatorName}" is not registered for sequence type ${sourceType}. Ensure the source sequence is of the correct type for this operator.` : `Operator "${node.operatorName}" is not registered. Register it via @operator, createOperator, or createGeneratorOperator before compiling.`;
|
|
580
|
+
throw new CompilerError(message, "operator", node.operatorName);
|
|
581
|
+
}
|
|
582
|
+
return entry.impl.apply(source2, [...node.args]);
|
|
583
|
+
}
|
|
584
|
+
// Walk the prototype chain of source to find the most-specific registered entry.
|
|
585
|
+
findOperatorEntry(operatorName, source2) {
|
|
586
|
+
if (source2 === null || source2 === void 0) {
|
|
587
|
+
return void 0;
|
|
588
|
+
}
|
|
589
|
+
let proto = Object.getPrototypeOf(source2);
|
|
590
|
+
while (proto !== null) {
|
|
591
|
+
const ctor = proto.constructor;
|
|
592
|
+
if (ctor !== void 0) {
|
|
593
|
+
const entry = _chunkVJAICXA6cjs.OperatorRegistry.getOperator(operatorName, ctor);
|
|
594
|
+
if (entry !== void 0) {
|
|
595
|
+
return entry;
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
proto = Object.getPrototypeOf(proto);
|
|
599
|
+
}
|
|
600
|
+
return void 0;
|
|
601
|
+
}
|
|
806
602
|
};
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
//# sourceMappingURL=index.cjs.map
|
|
603
|
+
|
|
604
|
+
|
|
605
|
+
|
|
606
|
+
|
|
607
|
+
|
|
608
|
+
|
|
609
|
+
|
|
610
|
+
|
|
611
|
+
|
|
612
|
+
|
|
613
|
+
|
|
614
|
+
|
|
615
|
+
|
|
616
|
+
|
|
617
|
+
|
|
618
|
+
|
|
619
|
+
|
|
620
|
+
|
|
621
|
+
|
|
622
|
+
|
|
623
|
+
|
|
624
|
+
|
|
625
|
+
|
|
626
|
+
|
|
627
|
+
|
|
628
|
+
|
|
629
|
+
|
|
630
|
+
|
|
631
|
+
|
|
632
|
+
|
|
633
|
+
|
|
634
|
+
|
|
635
|
+
|
|
636
|
+
|
|
637
|
+
|
|
638
|
+
|
|
639
|
+
|
|
640
|
+
|
|
641
|
+
|
|
642
|
+
|
|
643
|
+
|
|
644
|
+
|
|
645
|
+
|
|
646
|
+
|
|
647
|
+
|
|
648
|
+
|
|
649
|
+
|
|
650
|
+
|
|
651
|
+
|
|
652
|
+
|
|
653
|
+
|
|
654
|
+
|
|
655
|
+
|
|
656
|
+
|
|
657
|
+
|
|
658
|
+
exports.ArgumentError = _chunkOWKUE3ACcjs.ArgumentError; exports.ArgumentNullError = _chunkOWKUE3ACcjs.ArgumentNullError; exports.ArgumentOutOfRangeError = _chunkOWKUE3ACcjs.ArgumentOutOfRangeError; exports.ArgumentTypeError = _chunkOWKUE3ACcjs.ArgumentTypeError; exports.ArgumentUtility = _chunkOWKUE3ACcjs.ArgumentUtility; exports.CompilerError = CompilerError; exports.InvalidOperationError = _chunkVJAICXA6cjs.InvalidOperationError; exports.KeyNotFoundError = KeyNotFoundError; exports.Lazy = _chunkOWKUE3ACcjs.Lazy; exports.NotSupportedError = NotSupportedError; exports.OperatorMetadata = _chunkVJAICXA6cjs.OperatorMetadata; exports.OperatorRegistry = _chunkVJAICXA6cjs.OperatorRegistry; exports.PluginError = _chunkVJAICXA6cjs.PluginError; exports.QueryNode = _chunkVJAICXA6cjs.QueryNode; exports.QueryPlanCompiler = QueryPlanCompiler; exports.QueryPlanOptimizer = QueryPlanOptimizer; exports.QueryPlanPrinter = QueryPlanPrinter; exports.QueryPlanTransformer = QueryPlanTransformer; exports.QueryPlanWalker = QueryPlanWalker; exports.ReflectionContext = _chunkOWKUE3ACcjs.ReflectionContext; exports.ReflectionError = _chunkOWKUE3ACcjs.ReflectionError; exports.RegistryError = _chunkVJAICXA6cjs.RegistryError; exports.SequenceContainsNoElementsError = _chunkVJAICXA6cjs.SequenceContainsNoElementsError; exports.Tyneq = Tyneq; exports.TyneqBaseEnumerator = _chunkVJAICXA6cjs.TyneqBaseEnumerator; exports.TyneqCachedEnumerable = _chunkVJAICXA6cjs.TyneqCachedEnumerable; exports.TyneqCachedEnumerator = _chunkVJAICXA6cjs.TyneqCachedEnumerator; exports.TyneqCachedTerminalOperator = _chunkVJAICXA6cjs.TyneqCachedTerminalOperator; exports.TyneqComparer = _chunkVJAICXA6cjs.TyneqComparer; exports.TyneqEnumerator = _chunkVJAICXA6cjs.TyneqEnumerator; exports.TyneqError = _chunkOWKUE3ACcjs.TyneqError; exports.TyneqOrderedEnumerable = _chunkVJAICXA6cjs.TyneqOrderedEnumerable; exports.TyneqOrderedEnumerator = _chunkVJAICXA6cjs.TyneqOrderedEnumerator; exports.TyneqOrderedTerminalOperator = _chunkVJAICXA6cjs.TyneqOrderedTerminalOperator; exports.TyneqTerminalOperator = _chunkVJAICXA6cjs.TyneqTerminalOperator; exports.TypeGuardUtility = _chunkOWKUE3ACcjs.TypeGuardUtility; exports.ValidationBuilder = _chunkC5PBY3ZUcjs.ValidationBuilder; exports.ValidationError = _chunkC5PBY3ZUcjs.ValidationError; exports.cachedOperator = _chunkVJAICXA6cjs.cachedOperator; exports.cachedTerminal = _chunkVJAICXA6cjs.cachedTerminal; exports.createCachedOperator = _chunkVJAICXA6cjs.createCachedOperator; exports.createCachedTerminalOperator = _chunkVJAICXA6cjs.createCachedTerminalOperator; exports.createGeneratorOperator = _chunkVJAICXA6cjs.createGeneratorOperator; exports.createOperator = _chunkVJAICXA6cjs.createOperator; exports.createOrderedOperator = _chunkVJAICXA6cjs.createOrderedOperator; exports.createOrderedTerminalOperator = _chunkVJAICXA6cjs.createOrderedTerminalOperator; exports.createTerminalOperator = _chunkVJAICXA6cjs.createTerminalOperator; exports.isSourceNode = _chunkVJAICXA6cjs.isSourceNode; exports.operator = _chunkVJAICXA6cjs.operator; exports.orderedOperator = _chunkVJAICXA6cjs.orderedOperator; exports.orderedTerminal = _chunkVJAICXA6cjs.orderedTerminal; exports.reflect = _chunkOWKUE3ACcjs.reflect; exports.terminal = _chunkVJAICXA6cjs.terminal; exports.tyneqQueryNode = _chunkVJAICXA6cjs.tyneqQueryNode;
|