flowquery 1.0.65 → 1.0.67

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.
Files changed (37) hide show
  1. package/README.md +54 -1
  2. package/dist/compute/runner.d.ts +17 -2
  3. package/dist/compute/runner.d.ts.map +1 -1
  4. package/dist/compute/runner.js +15 -3
  5. package/dist/compute/runner.js.map +1 -1
  6. package/dist/flowquery.min.js +1 -1
  7. package/dist/graph/node.d.ts.map +1 -1
  8. package/dist/graph/node.js +8 -1
  9. package/dist/graph/node.js.map +1 -1
  10. package/dist/graph/physical_node.d.ts.map +1 -1
  11. package/dist/graph/physical_node.js +5 -2
  12. package/dist/graph/physical_node.js.map +1 -1
  13. package/dist/graph/physical_relationship.d.ts.map +1 -1
  14. package/dist/graph/physical_relationship.js +5 -2
  15. package/dist/graph/physical_relationship.js.map +1 -1
  16. package/dist/index.browser.d.ts +2 -1
  17. package/dist/index.browser.d.ts.map +1 -1
  18. package/dist/index.browser.js.map +1 -1
  19. package/dist/index.node.d.ts +2 -1
  20. package/dist/index.node.d.ts.map +1 -1
  21. package/dist/index.node.js.map +1 -1
  22. package/dist/parsing/functions/function_factory.d.ts +1 -0
  23. package/dist/parsing/functions/function_factory.d.ts.map +1 -1
  24. package/dist/parsing/functions/function_factory.js +1 -0
  25. package/dist/parsing/functions/function_factory.js.map +1 -1
  26. package/dist/parsing/functions/length.d.ts +7 -0
  27. package/dist/parsing/functions/length.d.ts.map +1 -0
  28. package/dist/parsing/functions/length.js +65 -0
  29. package/dist/parsing/functions/length.js.map +1 -0
  30. package/dist/parsing/parser.d.ts.map +1 -1
  31. package/dist/parsing/parser.js +8 -2
  32. package/dist/parsing/parser.js.map +1 -1
  33. package/dist/parsing/statement_info_crawler.d.ts +118 -0
  34. package/dist/parsing/statement_info_crawler.d.ts.map +1 -0
  35. package/dist/parsing/statement_info_crawler.js +377 -0
  36. package/dist/parsing/statement_info_crawler.js.map +1 -0
  37. package/package.json +1 -1
@@ -0,0 +1,377 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const database_1 = __importDefault(require("../graph/database"));
7
+ const node_1 = __importDefault(require("../graph/node"));
8
+ const relationship_1 = __importDefault(require("../graph/relationship"));
9
+ const ast_node_1 = __importDefault(require("./ast_node"));
10
+ const lookup_1 = __importDefault(require("./data_structures/lookup"));
11
+ const identifier_1 = __importDefault(require("./expressions/identifier"));
12
+ const reference_1 = __importDefault(require("./expressions/reference"));
13
+ const subquery_expression_1 = __importDefault(require("./expressions/subquery_expression"));
14
+ const create_node_1 = __importDefault(require("./operations/create_node"));
15
+ const create_relationship_1 = __importDefault(require("./operations/create_relationship"));
16
+ const delete_node_1 = __importDefault(require("./operations/delete_node"));
17
+ const delete_relationship_1 = __importDefault(require("./operations/delete_relationship"));
18
+ const load_1 = __importDefault(require("./operations/load"));
19
+ const match_1 = __importDefault(require("./operations/match"));
20
+ /**
21
+ * Walks one or more parsed FlowQuery statement ASTs and extracts a
22
+ * `StatementInfo` describing the labels, relationship types, sources, and
23
+ * properties they reference.
24
+ *
25
+ * The crawler does not execute the statement. It only inspects the AST
26
+ * structure plus the live `Database` registry (to resolve sources for
27
+ * virtuals that are referenced but not (re-)declared in the AST).
28
+ *
29
+ * @example
30
+ * ```typescript
31
+ * const crawler = new StatementInfoCrawler();
32
+ * const info = crawler.crawl(ast);
33
+ * console.log(info.node_labels);
34
+ * ```
35
+ */
36
+ class StatementInfoCrawler {
37
+ constructor() {
38
+ this._nodeLabels = new Set();
39
+ this._relTypes = new Set();
40
+ this._nodeProps = new Map();
41
+ this._relProps = new Map();
42
+ this._nodeSources = new Map();
43
+ this._relSources = new Map();
44
+ this._ownCreatedNodeLabels = new Set();
45
+ this._ownCreatedRelTypes = new Set();
46
+ /**
47
+ * For each inline CREATE VIRTUAL clause, the (label or type) it
48
+ * declares and its inner statement AST. The label key receives the
49
+ * sources collected from the statement during {@link resolveRegisteredSources}.
50
+ */
51
+ this._ownNodeCreates = [];
52
+ this._ownRelCreates = [];
53
+ }
54
+ /**
55
+ * Walks one or more statement ASTs and returns the merged structural info.
56
+ *
57
+ * @param statements - A single statement root, or an iterable of roots
58
+ * (for multi-statement queries).
59
+ */
60
+ crawl(statements) {
61
+ this.reset();
62
+ const roots = this.toIterable(statements);
63
+ for (const root of roots) {
64
+ this.crawlStatement(root);
65
+ }
66
+ this.resolveRegisteredSources();
67
+ return this.snapshot();
68
+ }
69
+ toIterable(statements) {
70
+ if (statements instanceof ast_node_1.default) {
71
+ return [statements];
72
+ }
73
+ return statements;
74
+ }
75
+ reset() {
76
+ this._nodeLabels = new Set();
77
+ this._relTypes = new Set();
78
+ this._nodeProps = new Map();
79
+ this._relProps = new Map();
80
+ this._nodeSources = new Map();
81
+ this._relSources = new Map();
82
+ this._ownCreatedNodeLabels = new Set();
83
+ this._ownCreatedRelTypes = new Set();
84
+ this._ownNodeCreates = [];
85
+ this._ownRelCreates = [];
86
+ }
87
+ crawlStatement(root) {
88
+ let op = null;
89
+ try {
90
+ op = root.firstChild();
91
+ }
92
+ catch (_a) {
93
+ return;
94
+ }
95
+ while (op !== null) {
96
+ this.visitOperation(op);
97
+ op = op.next;
98
+ }
99
+ }
100
+ visitOperation(op) {
101
+ var _a, _b, _c, _d, _e;
102
+ if (op instanceof create_node_1.default) {
103
+ const node = op.node;
104
+ if (node === null || node === void 0 ? void 0 : node.label) {
105
+ this._nodeLabels.add(node.label);
106
+ this._ownCreatedNodeLabels.add(node.label);
107
+ if (op.statement) {
108
+ this._ownNodeCreates.push({ label: node.label, statement: op.statement });
109
+ }
110
+ }
111
+ }
112
+ else if (op instanceof create_relationship_1.default) {
113
+ const rel = op.relationship;
114
+ if (rel === null || rel === void 0 ? void 0 : rel.type) {
115
+ this._relTypes.add(rel.type);
116
+ this._ownCreatedRelTypes.add(rel.type);
117
+ if (op.statement) {
118
+ this._ownRelCreates.push({ type: rel.type, statement: op.statement });
119
+ }
120
+ }
121
+ if ((_a = rel === null || rel === void 0 ? void 0 : rel.source) === null || _a === void 0 ? void 0 : _a.label)
122
+ this._nodeLabels.add(rel.source.label);
123
+ if ((_b = rel === null || rel === void 0 ? void 0 : rel.target) === null || _b === void 0 ? void 0 : _b.label)
124
+ this._nodeLabels.add(rel.target.label);
125
+ }
126
+ else if (op instanceof delete_node_1.default) {
127
+ if ((_c = op.node) === null || _c === void 0 ? void 0 : _c.label)
128
+ this._nodeLabels.add(op.node.label);
129
+ }
130
+ else if (op instanceof delete_relationship_1.default) {
131
+ const rel = op.relationship;
132
+ if (rel === null || rel === void 0 ? void 0 : rel.type)
133
+ this._relTypes.add(rel.type);
134
+ if ((_d = rel === null || rel === void 0 ? void 0 : rel.source) === null || _d === void 0 ? void 0 : _d.label)
135
+ this._nodeLabels.add(rel.source.label);
136
+ if ((_e = rel === null || rel === void 0 ? void 0 : rel.target) === null || _e === void 0 ? void 0 : _e.label)
137
+ this._nodeLabels.add(rel.target.label);
138
+ }
139
+ else if (op instanceof match_1.default) {
140
+ for (const pattern of op.patterns) {
141
+ for (const element of pattern.chain) {
142
+ if (element instanceof node_1.default) {
143
+ for (const lbl of element.labels)
144
+ this._nodeLabels.add(lbl);
145
+ for (const propKey of element.properties.keys()) {
146
+ this.addNodeProp(element.labels, propKey);
147
+ }
148
+ }
149
+ else if (element instanceof relationship_1.default) {
150
+ for (const t of element.types)
151
+ this._relTypes.add(t);
152
+ for (const propKey of element.properties.keys()) {
153
+ this.addRelProp(element.types, propKey);
154
+ }
155
+ }
156
+ }
157
+ }
158
+ }
159
+ // CREATE/DELETE VIRTUAL operations describe registry mutations rather
160
+ // than query-side property accesses; their inner ASTs are crawled
161
+ // separately for sources, but we don't surface their property usage.
162
+ if (!(op instanceof create_node_1.default) &&
163
+ !(op instanceof create_relationship_1.default) &&
164
+ !(op instanceof delete_node_1.default) &&
165
+ !(op instanceof delete_relationship_1.default)) {
166
+ this.collectPropertyAccesses(op);
167
+ }
168
+ }
169
+ resolveRegisteredSources() {
170
+ // Sources from inline CREATE VIRTUAL clauses in the crawled statements.
171
+ for (const { label, statement } of this._ownNodeCreates) {
172
+ this.collectSources(statement, this.getOrCreate(this._nodeSources, label));
173
+ }
174
+ for (const { type, statement } of this._ownRelCreates) {
175
+ this.collectSources(statement, this.getOrCreate(this._relSources, type));
176
+ }
177
+ // Sources from already-registered virtuals that the crawled statements
178
+ // reference (e.g. MATCH/DELETE against a virtual registered earlier).
179
+ const db = database_1.default.getInstance();
180
+ for (const label of this._nodeLabels) {
181
+ if (this._ownCreatedNodeLabels.has(label))
182
+ continue;
183
+ const physical = db.nodes.get(label);
184
+ if (physical === null || physical === void 0 ? void 0 : physical.statement) {
185
+ this.collectSources(physical.statement, this.getOrCreate(this._nodeSources, label));
186
+ }
187
+ }
188
+ for (const type of this._relTypes) {
189
+ if (this._ownCreatedRelTypes.has(type))
190
+ continue;
191
+ const typeMap = db.relationships.get(type);
192
+ if (typeMap === undefined)
193
+ continue;
194
+ for (const physical of typeMap.values()) {
195
+ if (physical.statement) {
196
+ this.collectSources(physical.statement, this.getOrCreate(this._relSources, type));
197
+ }
198
+ }
199
+ }
200
+ }
201
+ getOrCreate(map, key) {
202
+ let set = map.get(key);
203
+ if (set === undefined) {
204
+ set = new Set();
205
+ map.set(key, set);
206
+ }
207
+ return set;
208
+ }
209
+ collectPropertyAccesses(root) {
210
+ const visited = new Set();
211
+ const stack = [root];
212
+ while (stack.length > 0) {
213
+ const node = stack.pop();
214
+ if (visited.has(node))
215
+ continue;
216
+ visited.add(node);
217
+ if (node instanceof lookup_1.default) {
218
+ const variable = node.variable;
219
+ const index = node.index;
220
+ if (variable instanceof reference_1.default && index instanceof identifier_1.default) {
221
+ const referred = variable.referred;
222
+ const propName = index.value();
223
+ if (typeof propName === "string" && propName.length > 0) {
224
+ if (referred instanceof node_1.default) {
225
+ this.addNodeProp(referred.labels, propName);
226
+ }
227
+ else if (referred instanceof relationship_1.default) {
228
+ this.addRelProp(referred.types, propName);
229
+ }
230
+ }
231
+ }
232
+ }
233
+ for (const child of node.getChildren()) {
234
+ stack.push(child);
235
+ }
236
+ // Subquery expressions hold their inner AST in a private field
237
+ // rather than as a child; descend into it explicitly.
238
+ if (node instanceof subquery_expression_1.default) {
239
+ const inner = node._subqueryAST;
240
+ if (inner !== undefined)
241
+ stack.push(inner);
242
+ }
243
+ }
244
+ }
245
+ collectSources(statement, target) {
246
+ var _a;
247
+ let op = null;
248
+ try {
249
+ op = statement.firstChild();
250
+ }
251
+ catch (_b) {
252
+ return;
253
+ }
254
+ while (op !== null) {
255
+ if (op instanceof load_1.default) {
256
+ if (op.isAsyncFunction) {
257
+ const name = (_a = op.asyncFunction) === null || _a === void 0 ? void 0 : _a.name;
258
+ if (typeof name === "string" && name.length > 0)
259
+ target.add(name);
260
+ }
261
+ else {
262
+ try {
263
+ const from = op.from;
264
+ if (typeof from === "string" && from.length > 0)
265
+ target.add(from);
266
+ }
267
+ catch (_c) {
268
+ // Dynamic source (e.g. f-string with unresolved refs);
269
+ // skip rather than fail metadata extraction.
270
+ }
271
+ }
272
+ }
273
+ op = op.next;
274
+ }
275
+ }
276
+ addNodeProp(labels, prop) {
277
+ for (const label of labels) {
278
+ if (!label)
279
+ continue;
280
+ let set = this._nodeProps.get(label);
281
+ if (set === undefined) {
282
+ set = new Set();
283
+ this._nodeProps.set(label, set);
284
+ }
285
+ set.add(prop);
286
+ }
287
+ }
288
+ addRelProp(types, prop) {
289
+ for (const type of types) {
290
+ if (!type)
291
+ continue;
292
+ let set = this._relProps.get(type);
293
+ if (set === undefined) {
294
+ set = new Set();
295
+ this._relProps.set(type, set);
296
+ }
297
+ set.add(prop);
298
+ }
299
+ }
300
+ snapshot() {
301
+ const allSources = new Set();
302
+ const nodes = {};
303
+ for (const label of this._nodeLabels) {
304
+ const props = this._nodeProps.get(label);
305
+ const sources = this._nodeSources.get(label);
306
+ if (sources !== undefined) {
307
+ for (const s of sources)
308
+ allSources.add(s);
309
+ }
310
+ nodes[label] = {
311
+ properties: props ? Array.from(props).sort() : [],
312
+ sources: sources ? Array.from(sources).sort() : [],
313
+ };
314
+ }
315
+ const relationships = {};
316
+ for (const type of this._relTypes) {
317
+ const props = this._relProps.get(type);
318
+ const sources = this._relSources.get(type);
319
+ if (sources !== undefined) {
320
+ for (const s of sources)
321
+ allSources.add(s);
322
+ }
323
+ relationships[type] = {
324
+ properties: props ? Array.from(props).sort() : [],
325
+ sources: sources ? Array.from(sources).sort() : [],
326
+ };
327
+ }
328
+ const info = {
329
+ node_labels: Array.from(this._nodeLabels).sort(),
330
+ relationship_types: Array.from(this._relTypes).sort(),
331
+ sources: Array.from(allSources).sort(),
332
+ node_properties: {},
333
+ relationship_properties: {},
334
+ nodes,
335
+ relationships,
336
+ };
337
+ for (const [label, props] of this._nodeProps) {
338
+ info.node_properties[label] = Array.from(props).sort();
339
+ }
340
+ for (const [type, props] of this._relProps) {
341
+ info.relationship_properties[type] = Array.from(props).sort();
342
+ }
343
+ return info;
344
+ }
345
+ /**
346
+ * Returns a deep copy of a StatementInfo so callers can mutate it freely.
347
+ */
348
+ static clone(info) {
349
+ const cloneProps = (props) => {
350
+ const out = {};
351
+ for (const [k, v] of Object.entries(props))
352
+ out[k] = [...v];
353
+ return out;
354
+ };
355
+ const cloneEntities = (entities) => {
356
+ const out = {};
357
+ for (const [k, v] of Object.entries(entities)) {
358
+ out[k] = {
359
+ properties: [...v.properties],
360
+ sources: [...v.sources],
361
+ };
362
+ }
363
+ return out;
364
+ };
365
+ return {
366
+ node_labels: [...info.node_labels],
367
+ relationship_types: [...info.relationship_types],
368
+ sources: [...info.sources],
369
+ node_properties: cloneProps(info.node_properties),
370
+ relationship_properties: cloneProps(info.relationship_properties),
371
+ nodes: cloneEntities(info.nodes),
372
+ relationships: cloneEntities(info.relationships),
373
+ };
374
+ }
375
+ }
376
+ exports.default = StatementInfoCrawler;
377
+ //# sourceMappingURL=statement_info_crawler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"statement_info_crawler.js","sourceRoot":"","sources":["../../src/parsing/statement_info_crawler.ts"],"names":[],"mappings":";;;;;AAAA,iEAAyC;AACzC,yDAAiC;AACjC,yEAAiD;AACjD,0DAAiC;AACjC,sEAA8C;AAC9C,0EAAkD;AAClD,wEAAgD;AAChD,4FAAmE;AACnE,2EAAkD;AAClD,2FAAkE;AAClE,2EAAkD;AAClD,2FAAkE;AAClE,6DAAqC;AACrC,+DAAuC;AAkEvC;;;;;;;;;;;;;;;GAeG;AACH,MAAM,oBAAoB;IAA1B;QACY,gBAAW,GAAgB,IAAI,GAAG,EAAE,CAAC;QACrC,cAAS,GAAgB,IAAI,GAAG,EAAE,CAAC;QACnC,eAAU,GAA6B,IAAI,GAAG,EAAE,CAAC;QACjD,cAAS,GAA6B,IAAI,GAAG,EAAE,CAAC;QAChD,iBAAY,GAA6B,IAAI,GAAG,EAAE,CAAC;QACnD,gBAAW,GAA6B,IAAI,GAAG,EAAE,CAAC;QAClD,0BAAqB,GAAgB,IAAI,GAAG,EAAE,CAAC;QAC/C,wBAAmB,GAAgB,IAAI,GAAG,EAAE,CAAC;QACrD;;;;WAIG;QACK,oBAAe,GAAiD,EAAE,CAAC;QACnE,mBAAc,GAAgD,EAAE,CAAC;IA0T7E,CAAC;IAxTG;;;;;OAKG;IACI,KAAK,CAAC,UAAuC;QAChD,IAAI,CAAC,KAAK,EAAE,CAAC;QACb,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;QAC1C,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACvB,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QAC9B,CAAC;QACD,IAAI,CAAC,wBAAwB,EAAE,CAAC;QAChC,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC;IAC3B,CAAC;IAEO,UAAU,CAAC,UAAuC;QACtD,IAAI,UAAU,YAAY,kBAAO,EAA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;QACF,OAAO;YACH,WAAW,EAAE,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC;YAClC,kBAAkB,EAAE,CAAC,GAAG,IAAI,CAAC,kBAAkB,CAAC;YAChD,OAAO,EAAE,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC;YAC1B,eAAe,EAAE,UAAU,CAAC,IAAI,CAAC,eAAe,CAAC;YACjD,uBAAuB,EAAE,UAAU,CAAC,IAAI,CAAC,uBAAuB,CAAC;YACjE,KAAK,EAAE,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC;YAChC,aAAa,EAAE,aAAa,CAAC,IAAI,CAAC,aAAa,CAAC;SACnD,CAAC;IACN,CAAC;CACJ;AAED,kBAAe,oBAAoB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flowquery",
3
- "version": "1.0.65",
3
+ "version": "1.0.67",
4
4
  "description": "A declarative query language for data processing pipelines.",
5
5
  "main": "dist/index.node.js",
6
6
  "types": "dist/index.node.d.ts",