flowquery 1.0.69 → 1.0.71
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 +682 -86
- package/dist/compute/provenance.d.ts +201 -0
- package/dist/compute/provenance.d.ts.map +1 -0
- package/dist/compute/provenance.js +216 -0
- package/dist/compute/provenance.js.map +1 -0
- package/dist/compute/runner.d.ts +202 -3
- package/dist/compute/runner.d.ts.map +1 -1
- package/dist/compute/runner.js +309 -2
- package/dist/compute/runner.js.map +1 -1
- package/dist/flowquery.min.js +1 -1
- package/dist/graph/bindings.d.ts +78 -0
- package/dist/graph/bindings.d.ts.map +1 -0
- package/dist/graph/bindings.js +224 -0
- package/dist/graph/bindings.js.map +1 -0
- package/dist/graph/data_cache.d.ts +4 -0
- package/dist/graph/data_cache.d.ts.map +1 -1
- package/dist/graph/data_cache.js +15 -3
- package/dist/graph/data_cache.js.map +1 -1
- package/dist/graph/data_resolver.d.ts.map +1 -1
- package/dist/graph/data_resolver.js +23 -4
- package/dist/graph/data_resolver.js.map +1 -1
- package/dist/graph/database.d.ts +4 -2
- package/dist/graph/database.d.ts.map +1 -1
- package/dist/graph/database.js +45 -9
- package/dist/graph/database.js.map +1 -1
- package/dist/graph/physical_node.d.ts +7 -2
- package/dist/graph/physical_node.d.ts.map +1 -1
- package/dist/graph/physical_node.js +22 -26
- package/dist/graph/physical_node.js.map +1 -1
- package/dist/graph/physical_relationship.d.ts +7 -2
- package/dist/graph/physical_relationship.d.ts.map +1 -1
- package/dist/graph/physical_relationship.js +22 -26
- package/dist/graph/physical_relationship.js.map +1 -1
- package/dist/graph/relationship_match_collector.d.ts.map +1 -1
- package/dist/graph/relationship_match_collector.js +9 -0
- package/dist/graph/relationship_match_collector.js.map +1 -1
- package/dist/graph/virtual_sources.d.ts +8 -0
- package/dist/graph/virtual_sources.d.ts.map +1 -0
- package/dist/graph/virtual_sources.js +31 -0
- package/dist/graph/virtual_sources.js.map +1 -0
- package/dist/graph/virtual_statement.d.ts +41 -0
- package/dist/graph/virtual_statement.d.ts.map +1 -0
- package/dist/graph/virtual_statement.js +143 -0
- package/dist/graph/virtual_statement.js.map +1 -0
- package/dist/index.browser.d.ts +3 -3
- package/dist/index.browser.d.ts.map +1 -1
- package/dist/index.browser.js.map +1 -1
- package/dist/index.node.d.ts +3 -3
- package/dist/index.node.d.ts.map +1 -1
- package/dist/index.node.js.map +1 -1
- package/dist/parsing/ast_node.d.ts +9 -0
- package/dist/parsing/ast_node.d.ts.map +1 -1
- package/dist/parsing/ast_node.js +21 -4
- package/dist/parsing/ast_node.js.map +1 -1
- package/dist/parsing/expressions/binding_reference.d.ts +16 -0
- package/dist/parsing/expressions/binding_reference.d.ts.map +1 -0
- package/dist/parsing/expressions/binding_reference.js +34 -0
- package/dist/parsing/expressions/binding_reference.js.map +1 -0
- package/dist/parsing/operations/aggregated_return.d.ts +10 -0
- package/dist/parsing/operations/aggregated_return.d.ts.map +1 -1
- package/dist/parsing/operations/aggregated_return.js +56 -3
- package/dist/parsing/operations/aggregated_return.js.map +1 -1
- package/dist/parsing/operations/aggregated_with.d.ts +20 -0
- package/dist/parsing/operations/aggregated_with.d.ts.map +1 -1
- package/dist/parsing/operations/aggregated_with.js +33 -1
- package/dist/parsing/operations/aggregated_with.js.map +1 -1
- package/dist/parsing/operations/create_node.d.ts +5 -1
- package/dist/parsing/operations/create_node.d.ts.map +1 -1
- package/dist/parsing/operations/create_node.js +12 -2
- package/dist/parsing/operations/create_node.js.map +1 -1
- package/dist/parsing/operations/create_relationship.d.ts +5 -1
- package/dist/parsing/operations/create_relationship.d.ts.map +1 -1
- package/dist/parsing/operations/create_relationship.js +12 -2
- package/dist/parsing/operations/create_relationship.js.map +1 -1
- package/dist/parsing/operations/drop_binding.d.ts +15 -0
- package/dist/parsing/operations/drop_binding.d.ts.map +1 -0
- package/dist/parsing/operations/drop_binding.js +42 -0
- package/dist/parsing/operations/drop_binding.js.map +1 -0
- package/dist/parsing/operations/group_by.d.ts +32 -0
- package/dist/parsing/operations/group_by.d.ts.map +1 -1
- package/dist/parsing/operations/group_by.js +103 -0
- package/dist/parsing/operations/group_by.js.map +1 -1
- package/dist/parsing/operations/let.d.ts +36 -0
- package/dist/parsing/operations/let.d.ts.map +1 -0
- package/dist/parsing/operations/let.js +154 -0
- package/dist/parsing/operations/let.js.map +1 -0
- package/dist/parsing/operations/load.d.ts +31 -0
- package/dist/parsing/operations/load.d.ts.map +1 -1
- package/dist/parsing/operations/load.js +102 -2
- package/dist/parsing/operations/load.js.map +1 -1
- package/dist/parsing/operations/merge.d.ts +158 -0
- package/dist/parsing/operations/merge.d.ts.map +1 -0
- package/dist/parsing/operations/merge.js +338 -0
- package/dist/parsing/operations/merge.js.map +1 -0
- package/dist/parsing/operations/order_by.d.ts +6 -0
- package/dist/parsing/operations/order_by.d.ts.map +1 -1
- package/dist/parsing/operations/order_by.js +10 -1
- package/dist/parsing/operations/order_by.js.map +1 -1
- package/dist/parsing/operations/refresh_binding.d.ts +15 -0
- package/dist/parsing/operations/refresh_binding.d.ts.map +1 -0
- package/dist/parsing/operations/refresh_binding.js +42 -0
- package/dist/parsing/operations/refresh_binding.js.map +1 -0
- package/dist/parsing/operations/refresh_node.d.ts +11 -0
- package/dist/parsing/operations/refresh_node.d.ts.map +1 -0
- package/dist/parsing/operations/refresh_node.js +46 -0
- package/dist/parsing/operations/refresh_node.js.map +1 -0
- package/dist/parsing/operations/refresh_relationship.d.ts +11 -0
- package/dist/parsing/operations/refresh_relationship.d.ts.map +1 -0
- package/dist/parsing/operations/refresh_relationship.js +46 -0
- package/dist/parsing/operations/refresh_relationship.js.map +1 -0
- package/dist/parsing/operations/return.d.ts +34 -0
- package/dist/parsing/operations/return.d.ts.map +1 -1
- package/dist/parsing/operations/return.js +102 -3
- package/dist/parsing/operations/return.js.map +1 -1
- package/dist/parsing/operations/union.d.ts +19 -2
- package/dist/parsing/operations/union.d.ts.map +1 -1
- package/dist/parsing/operations/union.js +47 -11
- package/dist/parsing/operations/union.js.map +1 -1
- package/dist/parsing/operations/union_all.d.ts +5 -1
- package/dist/parsing/operations/union_all.d.ts.map +1 -1
- package/dist/parsing/operations/union_all.js +8 -2
- package/dist/parsing/operations/union_all.js.map +1 -1
- package/dist/parsing/operations/update.d.ts +27 -0
- package/dist/parsing/operations/update.d.ts.map +1 -0
- package/dist/parsing/operations/update.js +88 -0
- package/dist/parsing/operations/update.js.map +1 -0
- package/dist/parsing/operations/update_delete.d.ts +43 -0
- package/dist/parsing/operations/update_delete.d.ts.map +1 -0
- package/dist/parsing/operations/update_delete.js +105 -0
- package/dist/parsing/operations/update_delete.js.map +1 -0
- package/dist/parsing/parser.d.ts +70 -1
- package/dist/parsing/parser.d.ts.map +1 -1
- package/dist/parsing/parser.js +704 -10
- package/dist/parsing/parser.js.map +1 -1
- package/dist/parsing/statement_info_crawler.d.ts +106 -0
- package/dist/parsing/statement_info_crawler.d.ts.map +1 -1
- package/dist/parsing/statement_info_crawler.js +231 -12
- package/dist/parsing/statement_info_crawler.js.map +1 -1
- package/dist/tokenization/keyword.d.ts +21 -1
- package/dist/tokenization/keyword.d.ts.map +1 -1
- package/dist/tokenization/keyword.js +20 -0
- package/dist/tokenization/keyword.js.map +1 -1
- package/dist/tokenization/token.d.ts +24 -0
- package/dist/tokenization/token.d.ts.map +1 -1
- package/dist/tokenization/token.js +73 -0
- package/dist/tokenization/token.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
const database_1 = __importDefault(require("../../graph/database"));
|
|
16
|
+
const operation_1 = __importDefault(require("./operation"));
|
|
17
|
+
class RefreshNode extends operation_1.default {
|
|
18
|
+
constructor(node) {
|
|
19
|
+
super();
|
|
20
|
+
this._node = null;
|
|
21
|
+
this._node = node;
|
|
22
|
+
}
|
|
23
|
+
get node() {
|
|
24
|
+
return this._node;
|
|
25
|
+
}
|
|
26
|
+
run() {
|
|
27
|
+
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
try {
|
|
29
|
+
if (this._node === null) {
|
|
30
|
+
throw new Error("Node is null");
|
|
31
|
+
}
|
|
32
|
+
const db = database_1.default.getInstance();
|
|
33
|
+
db.refreshNode(this._node);
|
|
34
|
+
resolve();
|
|
35
|
+
}
|
|
36
|
+
catch (error) {
|
|
37
|
+
reject(error);
|
|
38
|
+
}
|
|
39
|
+
}));
|
|
40
|
+
}
|
|
41
|
+
get results() {
|
|
42
|
+
return [];
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.default = RefreshNode;
|
|
46
|
+
//# sourceMappingURL=refresh_node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refresh_node.js","sourceRoot":"","sources":["../../../src/parsing/operations/refresh_node.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,oEAA4C;AAE5C,4DAAoC;AAEpC,MAAM,WAAY,SAAQ,mBAAS;IAE/B,YAAY,IAAU;QAClB,KAAK,EAAE,CAAC;QAFJ,UAAK,GAAgB,IAAI,CAAC;QAG9B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IACtB,CAAC;IACD,IAAW,IAAI;QACX,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IACM,GAAG;QACN,OAAO,IAAI,OAAO,CAAC,CAAO,OAAO,EAAE,MAAM,EAAE,EAAE;YACzC,IAAI,CAAC;gBACD,IAAI,IAAI,CAAC,KAAK,KAAK,IAAI,EAAE,CAAC;oBACtB,MAAM,IAAI,KAAK,CAAC,cAAc,CAAC,CAAC;gBACpC,CAAC;gBACD,MAAM,EAAE,GAAa,kBAAQ,CAAC,WAAW,EAAE,CAAC;gBAC5C,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBAC3B,OAAO,EAAE,CAAC;YACd,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACb,MAAM,CAAC,KAAK,CAAC,CAAC;YAClB,CAAC;QACL,CAAC,CAAA,CAAC,CAAC;IACP,CAAC;IACD,IAAW,OAAO;QACd,OAAO,EAAE,CAAC;IACd,CAAC;CACJ;AAED,kBAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import Relationship from "../../graph/relationship";
|
|
2
|
+
import Operation from "./operation";
|
|
3
|
+
declare class RefreshRelationship extends Operation {
|
|
4
|
+
private _relationship;
|
|
5
|
+
constructor(relationship: Relationship);
|
|
6
|
+
get relationship(): Relationship | null;
|
|
7
|
+
run(): Promise<void>;
|
|
8
|
+
get results(): Record<string, any>[];
|
|
9
|
+
}
|
|
10
|
+
export default RefreshRelationship;
|
|
11
|
+
//# sourceMappingURL=refresh_relationship.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refresh_relationship.d.ts","sourceRoot":"","sources":["../../../src/parsing/operations/refresh_relationship.ts"],"names":[],"mappings":"AACA,OAAO,YAAY,MAAM,0BAA0B,CAAC;AACpD,OAAO,SAAS,MAAM,aAAa,CAAC;AAEpC,cAAM,mBAAoB,SAAQ,SAAS;IACvC,OAAO,CAAC,aAAa,CAA6B;gBACtC,YAAY,EAAE,YAAY;IAItC,IAAW,YAAY,IAAI,YAAY,GAAG,IAAI,CAE7C;IACM,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;IAc3B,IAAW,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAE1C;CACJ;AAED,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
const database_1 = __importDefault(require("../../graph/database"));
|
|
16
|
+
const operation_1 = __importDefault(require("./operation"));
|
|
17
|
+
class RefreshRelationship extends operation_1.default {
|
|
18
|
+
constructor(relationship) {
|
|
19
|
+
super();
|
|
20
|
+
this._relationship = null;
|
|
21
|
+
this._relationship = relationship;
|
|
22
|
+
}
|
|
23
|
+
get relationship() {
|
|
24
|
+
return this._relationship;
|
|
25
|
+
}
|
|
26
|
+
run() {
|
|
27
|
+
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
try {
|
|
29
|
+
if (this._relationship === null) {
|
|
30
|
+
throw new Error("Relationship is null");
|
|
31
|
+
}
|
|
32
|
+
const db = database_1.default.getInstance();
|
|
33
|
+
db.refreshRelationship(this._relationship);
|
|
34
|
+
resolve();
|
|
35
|
+
}
|
|
36
|
+
catch (error) {
|
|
37
|
+
reject(error);
|
|
38
|
+
}
|
|
39
|
+
}));
|
|
40
|
+
}
|
|
41
|
+
get results() {
|
|
42
|
+
return [];
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.default = RefreshRelationship;
|
|
46
|
+
//# sourceMappingURL=refresh_relationship.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refresh_relationship.js","sourceRoot":"","sources":["../../../src/parsing/operations/refresh_relationship.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,oEAA4C;AAE5C,4DAAoC;AAEpC,MAAM,mBAAoB,SAAQ,mBAAS;IAEvC,YAAY,YAA0B;QAClC,KAAK,EAAE,CAAC;QAFJ,kBAAa,GAAwB,IAAI,CAAC;QAG9C,IAAI,CAAC,aAAa,GAAG,YAAY,CAAC;IACtC,CAAC;IACD,IAAW,YAAY;QACnB,OAAO,IAAI,CAAC,aAAa,CAAC;IAC9B,CAAC;IACM,GAAG;QACN,OAAO,IAAI,OAAO,CAAC,CAAO,OAAO,EAAE,MAAM,EAAE,EAAE;YACzC,IAAI,CAAC;gBACD,IAAI,IAAI,CAAC,aAAa,KAAK,IAAI,EAAE,CAAC;oBAC9B,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;gBAC5C,CAAC;gBACD,MAAM,EAAE,GAAG,kBAAQ,CAAC,WAAW,EAAE,CAAC;gBAClC,EAAE,CAAC,mBAAmB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;gBAC3C,OAAO,EAAE,CAAC;YACd,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACb,MAAM,CAAC,KAAK,CAAC,CAAC;YAClB,CAAC;QACL,CAAC,CAAA,CAAC,CAAC;IACP,CAAC;IACD,IAAW,OAAO;QACd,OAAO,EAAE,CAAC;IACd,CAAC;CACJ;AAED,kBAAe,mBAAmB,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ProvenanceSource, RowProvenance, RowSegment } from "../../compute/provenance";
|
|
1
2
|
import Limit from "./limit";
|
|
2
3
|
import OrderBy from "./order_by";
|
|
3
4
|
import Projection from "./projection";
|
|
@@ -18,13 +19,46 @@ declare class Return extends Projection {
|
|
|
18
19
|
protected _results: Record<string, any>[];
|
|
19
20
|
private _limit;
|
|
20
21
|
protected _orderBy: OrderBy | null;
|
|
22
|
+
protected _provenanceSources: ProvenanceSource[] | null;
|
|
23
|
+
protected _provenanceSink: RowProvenance[] | null;
|
|
24
|
+
protected _provenanceRows: RowProvenance[];
|
|
21
25
|
set where(where: Where);
|
|
22
26
|
get where(): boolean;
|
|
23
27
|
set limit(limit: Limit);
|
|
24
28
|
set orderBy(orderBy: OrderBy);
|
|
29
|
+
/**
|
|
30
|
+
* Direct the runner-owned sink that receives the post-sorted,
|
|
31
|
+
* post-limited provenance rows. Once a sink is registered, every
|
|
32
|
+
* emit captures a snapshot from the registered provenance sources.
|
|
33
|
+
*/
|
|
34
|
+
enableProvenance(sink: RowProvenance[]): void;
|
|
35
|
+
/**
|
|
36
|
+
* Append a provenance source. Sources are snapshotted per emitted
|
|
37
|
+
* row and their segments are concatenated in registration order.
|
|
38
|
+
* Multiple MATCHes downstream of the last aggregation register their
|
|
39
|
+
* `ProvenanceSites` here; upstream aggregations register themselves
|
|
40
|
+
* as virtual sources that replay the current group's accumulated
|
|
41
|
+
* provenance.
|
|
42
|
+
*/
|
|
43
|
+
addProvenanceSource(source: ProvenanceSource): void;
|
|
25
44
|
run(): Promise<void>;
|
|
45
|
+
/**
|
|
46
|
+
* Concatenate all registered provenance sources into a single
|
|
47
|
+
* {@link RowSegment}. Called once per emitted row by `run()`, which
|
|
48
|
+
* wraps the result as a `RowProvenance` with `rows: [segment]`.
|
|
49
|
+
*/
|
|
50
|
+
protected _snapshotProvenance(): RowSegment;
|
|
26
51
|
initialize(): Promise<void>;
|
|
27
52
|
get results(): Record<string, any>[];
|
|
53
|
+
finish(): Promise<void>;
|
|
54
|
+
/**
|
|
55
|
+
* Apply ORDER BY permutation and LIMIT slicing to both the result rows
|
|
56
|
+
* and the parallel provenance array in lockstep. Provenance is
|
|
57
|
+
* computed only when a sink is registered.
|
|
58
|
+
*/
|
|
59
|
+
private _buildOutput;
|
|
60
|
+
/** @internal Direct accessor used by UNION to merge child provenance. */
|
|
61
|
+
get provenanceRows(): RowProvenance[];
|
|
28
62
|
}
|
|
29
63
|
export default Return;
|
|
30
64
|
//# sourceMappingURL=return.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"return.d.ts","sourceRoot":"","sources":["../../../src/parsing/operations/return.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,OAAO,MAAM,YAAY,CAAC;AACjC,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,MAAM,SAAS,CAAC;AAE5B;;;;;;;;;;GAUG;AACH,cAAM,MAAO,SAAQ,UAAU;IAC3B,SAAS,CAAC,MAAM,EAAE,KAAK,GAAG,IAAI,CAAQ;IACtC,SAAS,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAM;IAC/C,OAAO,CAAC,MAAM,CAAsB;IACpC,SAAS,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI,CAAQ;IAC1C,IAAW,KAAK,CAAC,KAAK,EAAE,KAAK,EAE5B;IACD,IAAW,KAAK,IAAI,OAAO,CAK1B;IACD,IAAW,KAAK,CAAC,KAAK,EAAE,KAAK,EAE5B;IACD,IAAW,OAAO,CAAC,OAAO,EAAE,OAAO,EAElC;
|
|
1
|
+
{"version":3,"file":"return.d.ts","sourceRoot":"","sources":["../../../src/parsing/operations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AG1C;IACY,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAUpC;;;;OAIG;IACH,OAAO,CAAC,YAAY;IAmBpB,yEAAyE;IACzE,IAAW,cAAc,IAAI,aAAa,EAAE,CAE3C;CACJ;AAED,eAAe,MAAM,CAAC"}
|
|
@@ -12,6 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
const provenance_1 = require("../../compute/provenance");
|
|
15
16
|
const projection_1 = __importDefault(require("./projection"));
|
|
16
17
|
/**
|
|
17
18
|
* Represents a RETURN operation that produces the final query results.
|
|
@@ -31,6 +32,9 @@ class Return extends projection_1.default {
|
|
|
31
32
|
this._results = [];
|
|
32
33
|
this._limit = null;
|
|
33
34
|
this._orderBy = null;
|
|
35
|
+
this._provenanceSources = null;
|
|
36
|
+
this._provenanceSink = null;
|
|
37
|
+
this._provenanceRows = [];
|
|
34
38
|
}
|
|
35
39
|
set where(where) {
|
|
36
40
|
this._where = where;
|
|
@@ -47,6 +51,28 @@ class Return extends projection_1.default {
|
|
|
47
51
|
set orderBy(orderBy) {
|
|
48
52
|
this._orderBy = orderBy;
|
|
49
53
|
}
|
|
54
|
+
/**
|
|
55
|
+
* Direct the runner-owned sink that receives the post-sorted,
|
|
56
|
+
* post-limited provenance rows. Once a sink is registered, every
|
|
57
|
+
* emit captures a snapshot from the registered provenance sources.
|
|
58
|
+
*/
|
|
59
|
+
enableProvenance(sink) {
|
|
60
|
+
this._provenanceSink = sink;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Append a provenance source. Sources are snapshotted per emitted
|
|
64
|
+
* row and their segments are concatenated in registration order.
|
|
65
|
+
* Multiple MATCHes downstream of the last aggregation register their
|
|
66
|
+
* `ProvenanceSites` here; upstream aggregations register themselves
|
|
67
|
+
* as virtual sources that replay the current group's accumulated
|
|
68
|
+
* provenance.
|
|
69
|
+
*/
|
|
70
|
+
addProvenanceSource(source) {
|
|
71
|
+
if (this._provenanceSources === null) {
|
|
72
|
+
this._provenanceSources = [];
|
|
73
|
+
}
|
|
74
|
+
this._provenanceSources.push(source);
|
|
75
|
+
}
|
|
50
76
|
run() {
|
|
51
77
|
return __awaiter(this, void 0, void 0, function* () {
|
|
52
78
|
if (!this.where) {
|
|
@@ -63,7 +89,13 @@ class Return extends projection_1.default {
|
|
|
63
89
|
yield sq.evaluate();
|
|
64
90
|
}
|
|
65
91
|
const raw = expression.value();
|
|
66
|
-
|
|
92
|
+
let value = typeof raw === "object" && raw !== null ? structuredClone(raw) : raw;
|
|
93
|
+
// `_label` is an internal property attached to node records by
|
|
94
|
+
// the data resolver (consumed by the labels() function). Strip
|
|
95
|
+
// it from the projected value so it doesn't leak into results.
|
|
96
|
+
if (value && typeof value === "object" && !Array.isArray(value) && "_label" in value) {
|
|
97
|
+
delete value._label;
|
|
98
|
+
}
|
|
67
99
|
record.set(alias, value);
|
|
68
100
|
}
|
|
69
101
|
// Capture sort-key values while expression bindings are still live.
|
|
@@ -71,25 +103,92 @@ class Return extends projection_1.default {
|
|
|
71
103
|
this._orderBy.captureSortKeys();
|
|
72
104
|
}
|
|
73
105
|
this._results.push(Object.fromEntries(record));
|
|
106
|
+
if (this._provenanceSink !== null) {
|
|
107
|
+
const segment = this._snapshotProvenance();
|
|
108
|
+
// Non-aggregate row: `rows` contains the single input-row segment
|
|
109
|
+
// so the shape stays uniform with aggregate rows.
|
|
110
|
+
const row = {
|
|
111
|
+
nodes: segment.nodes,
|
|
112
|
+
relationships: segment.relationships,
|
|
113
|
+
rows: [segment],
|
|
114
|
+
};
|
|
115
|
+
if (segment.data_sources !== undefined) {
|
|
116
|
+
row.data_sources = segment.data_sources;
|
|
117
|
+
}
|
|
118
|
+
this._provenanceRows.push(row);
|
|
119
|
+
}
|
|
74
120
|
if (this._orderBy === null && this._limit !== null) {
|
|
75
121
|
this._limit.increment();
|
|
76
122
|
}
|
|
77
123
|
});
|
|
78
124
|
}
|
|
125
|
+
/**
|
|
126
|
+
* Concatenate all registered provenance sources into a single
|
|
127
|
+
* {@link RowSegment}. Called once per emitted row by `run()`, which
|
|
128
|
+
* wraps the result as a `RowProvenance` with `rows: [segment]`.
|
|
129
|
+
*/
|
|
130
|
+
_snapshotProvenance() {
|
|
131
|
+
const merged = { nodes: [], relationships: [] };
|
|
132
|
+
if (this._provenanceSources !== null) {
|
|
133
|
+
for (const src of this._provenanceSources) {
|
|
134
|
+
(0, provenance_1.mergeProvenanceSegment)(merged, src.snapshot());
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
return merged;
|
|
138
|
+
}
|
|
79
139
|
initialize() {
|
|
80
140
|
return __awaiter(this, void 0, void 0, function* () {
|
|
81
141
|
this._results = [];
|
|
142
|
+
this._provenanceRows = [];
|
|
82
143
|
});
|
|
83
144
|
}
|
|
84
145
|
get results() {
|
|
146
|
+
const { results } = this._buildOutput();
|
|
147
|
+
return results;
|
|
148
|
+
}
|
|
149
|
+
finish() {
|
|
150
|
+
const _super = Object.create(null, {
|
|
151
|
+
finish: { get: () => super.finish }
|
|
152
|
+
});
|
|
153
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
154
|
+
// Materialise final, sort-/limit-aligned provenance into the runner's
|
|
155
|
+
// sink (when enabled) so `Runner.provenance` reads cheaply.
|
|
156
|
+
if (this._provenanceSink !== null) {
|
|
157
|
+
const { provenance } = this._buildOutput();
|
|
158
|
+
this._provenanceSink.length = 0;
|
|
159
|
+
for (const p of provenance)
|
|
160
|
+
this._provenanceSink.push(p);
|
|
161
|
+
}
|
|
162
|
+
yield _super.finish.call(this);
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Apply ORDER BY permutation and LIMIT slicing to both the result rows
|
|
167
|
+
* and the parallel provenance array in lockstep. Provenance is
|
|
168
|
+
* computed only when a sink is registered.
|
|
169
|
+
*/
|
|
170
|
+
_buildOutput() {
|
|
85
171
|
let results = this._results;
|
|
172
|
+
let provenance = this._provenanceRows;
|
|
173
|
+
const wantProvenance = this._provenanceSink !== null;
|
|
86
174
|
if (this._orderBy !== null) {
|
|
87
|
-
|
|
175
|
+
const indices = this._orderBy.sortIndices(results);
|
|
176
|
+
results = indices.map((i) => results[i]);
|
|
177
|
+
if (wantProvenance) {
|
|
178
|
+
provenance = indices.map((i) => provenance[i]);
|
|
179
|
+
}
|
|
88
180
|
}
|
|
89
181
|
if (this._orderBy !== null && this._limit !== null) {
|
|
90
182
|
results = results.slice(0, this._limit.limitValue);
|
|
183
|
+
if (wantProvenance) {
|
|
184
|
+
provenance = provenance.slice(0, this._limit.limitValue);
|
|
185
|
+
}
|
|
91
186
|
}
|
|
92
|
-
return results;
|
|
187
|
+
return { results, provenance };
|
|
188
|
+
}
|
|
189
|
+
/** @internal Direct accessor used by UNION to merge child provenance. */
|
|
190
|
+
get provenanceRows() {
|
|
191
|
+
return this._buildOutput().provenance;
|
|
93
192
|
}
|
|
94
193
|
}
|
|
95
194
|
exports.default = Return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"return.js","sourceRoot":"","sources":["../../../src/parsing/operations/return.ts"],"names":[],"mappings":";;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"return.js","sourceRoot":"","sources":["../../../src/parsing/operations/return.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,yDAKkC;AAGlC,8DAAsC;AAGtC;;;;;;;;;;GAUG;AACH,MAAM,MAAO,SAAQ,oBAAU;IAA/B;;QACc,WAAM,GAAiB,IAAI,CAAC;QAC5B,aAAQ,GAA0B,EAAE,CAAC;QACvC,WAAM,GAAiB,IAAI,CAAC;QAC1B,aAAQ,GAAmB,IAAI,CAAC;QAChC,uBAAkB,GAA8B,IAAI,CAAC;QACrD,oBAAe,GAA2B,IAAI,CAAC;QAC/C,oBAAe,GAAoB,EAAE,CAAC;IAiJpD,CAA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AY;QAChB,IAAI,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC5B,IAAI,UAAU,GAAG,IAAI,CAAC,eAAe,CAAC;QACtC,MAAM,cAAc,GAAG,IAAI,CAAC,eAAe,KAAK,IAAI,CAAC;QACrD,IAAI,IAAI,CAAC,QAAQ,KAAK,IAAI,EAAE,CAAC;YACzB,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;YACnD,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;YACzC,IAAI,cAAc,EAAE,CAAC;gBACjB,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;YACnD,CAAC;QACL,CAAC;QACD,IAAI,IAAI,CAAC,QAAQ,KAAK,IAAI,IAAI,IAAI,CAAC,MAAM,KAAK,IAAI,EAAE,CAAC;YACjD,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;YACnD,IAAI,cAAc,EAAE,CAAC;gBACjB,UAAU,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;YAC7D,CAAC;QACL,CAAC;QACD,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;IACnC,CAAC;IACD,yEAAyE;IACzE,IAAW,cAAc;QACrB,OAAO,IAAI,CAAC,YAAY,EAAE,CAAC,UAAU,CAAC;IAC1C,CAAC;CACJ;AAED,kBAAe,MAAM,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { RowProvenance } from "../../compute/provenance";
|
|
1
2
|
import Operation from "./operation";
|
|
2
3
|
/**
|
|
3
4
|
* Represents a UNION operation that combines results from two sub-queries.
|
|
@@ -17,17 +18,33 @@ declare class Union extends Operation {
|
|
|
17
18
|
protected _left: Operation | null;
|
|
18
19
|
protected _right: Operation | null;
|
|
19
20
|
protected _results: Record<string, any>[];
|
|
21
|
+
protected _leftProvenance: RowProvenance[] | null;
|
|
22
|
+
protected _rightProvenance: RowProvenance[] | null;
|
|
23
|
+
protected _provenanceSink: RowProvenance[] | null;
|
|
20
24
|
set left(operation: Operation);
|
|
21
25
|
get left(): Operation;
|
|
22
26
|
set right(operation: Operation);
|
|
23
27
|
get right(): Operation;
|
|
28
|
+
/**
|
|
29
|
+
* Wire provenance through this UNION. The Runner attaches each branch
|
|
30
|
+
* to its own sink array; `sink` is the merged output array aligned with
|
|
31
|
+
* `_results`.
|
|
32
|
+
*/
|
|
33
|
+
enableProvenance(leftSink: RowProvenance[], rightSink: RowProvenance[], sink: RowProvenance[]): void;
|
|
24
34
|
private lastInChain;
|
|
25
35
|
initialize(): Promise<void>;
|
|
26
36
|
run(): Promise<void>;
|
|
27
37
|
/**
|
|
28
|
-
* Combines results from left and right pipelines
|
|
29
|
-
*
|
|
38
|
+
* Combines results from left and right pipelines and returns both the
|
|
39
|
+
* merged rows and the merged provenance array (when enabled). UNION
|
|
40
|
+
* drops duplicates (first occurrence wins); subclass UnionAll overrides
|
|
41
|
+
* to keep all rows.
|
|
30
42
|
*/
|
|
43
|
+
protected combineWithProvenance(left: Record<string, any>[], right: Record<string, any>[]): {
|
|
44
|
+
rows: Record<string, any>[];
|
|
45
|
+
provenance: RowProvenance[];
|
|
46
|
+
};
|
|
47
|
+
/** Kept for backwards compatibility with subclasses that override only combine(). */
|
|
31
48
|
protected combine(left: Record<string, any>[], right: Record<string, any>[]): Record<string, any>[];
|
|
32
49
|
finish(): Promise<void>;
|
|
33
50
|
get results(): Record<string, any>[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"union.d.ts","sourceRoot":"","sources":["../../../src/parsing/operations/union.ts"],"names":[],"mappings":"AAAA,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,OAAO,CAAC,IAAI,CAAC;IAK3B,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;IAmCjC;;;;;OAKG;IACH,SAAS,CAAC,qBAAqB,CAC3B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,EAC3B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,GAC7B;QAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC;QAAC,UAAU,EAAE,aAAa,EAAE,CAAA;KAAE;IAsB/D,qFAAqF;IACrF,SAAS,CAAC,OAAO,CACb,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,EAC3B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,GAC7B,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE;IAIX,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAIpC,IAAW,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAE1C;CACJ;AAED,eAAe,KAAK,CAAC"}
|
|
@@ -33,6 +33,9 @@ class Union extends operation_1.default {
|
|
|
33
33
|
this._left = null;
|
|
34
34
|
this._right = null;
|
|
35
35
|
this._results = [];
|
|
36
|
+
this._leftProvenance = null;
|
|
37
|
+
this._rightProvenance = null;
|
|
38
|
+
this._provenanceSink = null;
|
|
36
39
|
}
|
|
37
40
|
set left(operation) {
|
|
38
41
|
this._left = operation;
|
|
@@ -52,6 +55,16 @@ class Union extends operation_1.default {
|
|
|
52
55
|
}
|
|
53
56
|
return this._right;
|
|
54
57
|
}
|
|
58
|
+
/**
|
|
59
|
+
* Wire provenance through this UNION. The Runner attaches each branch
|
|
60
|
+
* to its own sink array; `sink` is the merged output array aligned with
|
|
61
|
+
* `_results`.
|
|
62
|
+
*/
|
|
63
|
+
enableProvenance(leftSink, rightSink, sink) {
|
|
64
|
+
this._leftProvenance = leftSink;
|
|
65
|
+
this._rightProvenance = rightSink;
|
|
66
|
+
this._provenanceSink = sink;
|
|
67
|
+
}
|
|
55
68
|
lastInChain(operation) {
|
|
56
69
|
let current = operation;
|
|
57
70
|
while (current.next) {
|
|
@@ -88,24 +101,47 @@ class Union extends operation_1.default {
|
|
|
88
101
|
throw new Error("All sub queries in a UNION must have the same return column names");
|
|
89
102
|
}
|
|
90
103
|
}
|
|
91
|
-
// Combine results
|
|
92
|
-
|
|
104
|
+
// Combine results (and provenance when enabled)
|
|
105
|
+
const { rows, provenance } = this.combineWithProvenance(leftResults, rightResults);
|
|
106
|
+
this._results = rows;
|
|
107
|
+
if (this._provenanceSink !== null) {
|
|
108
|
+
this._provenanceSink.length = 0;
|
|
109
|
+
for (const p of provenance)
|
|
110
|
+
this._provenanceSink.push(p);
|
|
111
|
+
}
|
|
93
112
|
});
|
|
94
113
|
}
|
|
95
114
|
/**
|
|
96
|
-
* Combines results from left and right pipelines
|
|
97
|
-
*
|
|
115
|
+
* Combines results from left and right pipelines and returns both the
|
|
116
|
+
* merged rows and the merged provenance array (when enabled). UNION
|
|
117
|
+
* drops duplicates (first occurrence wins); subclass UnionAll overrides
|
|
118
|
+
* to keep all rows.
|
|
98
119
|
*/
|
|
99
|
-
|
|
100
|
-
const
|
|
101
|
-
|
|
120
|
+
combineWithProvenance(left, right) {
|
|
121
|
+
const leftProv = this._leftProvenance;
|
|
122
|
+
const rightProv = this._rightProvenance;
|
|
123
|
+
const wantProv = this._provenanceSink !== null;
|
|
124
|
+
const rows = [...left];
|
|
125
|
+
const provenance = wantProv && leftProv !== null ? [...leftProv] : [];
|
|
126
|
+
const serializedSeen = new Set();
|
|
127
|
+
for (const row of left)
|
|
128
|
+
serializedSeen.add(JSON.stringify(row));
|
|
129
|
+
for (let i = 0; i < right.length; i++) {
|
|
130
|
+
const row = right[i];
|
|
102
131
|
const serialized = JSON.stringify(row);
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
132
|
+
if (!serializedSeen.has(serialized)) {
|
|
133
|
+
rows.push(row);
|
|
134
|
+
if (wantProv && rightProv !== null) {
|
|
135
|
+
provenance.push(rightProv[i]);
|
|
136
|
+
}
|
|
137
|
+
serializedSeen.add(serialized);
|
|
106
138
|
}
|
|
107
139
|
}
|
|
108
|
-
return
|
|
140
|
+
return { rows, provenance };
|
|
141
|
+
}
|
|
142
|
+
/** Kept for backwards compatibility with subclasses that override only combine(). */
|
|
143
|
+
combine(left, right) {
|
|
144
|
+
return this.combineWithProvenance(left, right).rows;
|
|
109
145
|
}
|
|
110
146
|
finish() {
|
|
111
147
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"union.js","sourceRoot":"","sources":["../../../src/parsing/operations/union.ts"],"names":[],"mappings":";;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"union.js","sourceRoot":"","sources":["../../../src/parsing/operations/union.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,4DAAoC;AAEpC;;;;;;;;;;;;;GAaG;AACH,MAAM,KAAM,SAAQ,mBAAS;IAA7B;;QACc,UAAK,GAAqB,IAAI,CAAC;QAC/B,WAAM,GAAqB,IAAI,CAAC;QAChC,aAAQ,GAA0B,EAAE,CAAC;QACrC,oBAAe,GAA2B,IAAI,CAAC;QAC/C,qBAAgB,GAA2B,IAAI,CAAC;QAChD,oBAAe,GAA2B,IAAI,CAAC;IAkI7D,CAAC;IAhIG,IAAW,IAAI,CAAC,SAAoB;QAChC,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC;IAC3B,CAAC;IACD,IAAW,IAAI;QACX,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;YACd,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;QACjD,CAAC;QACD,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IACD,IAAW,KAAK,CAAC,SAAoB;QACjC,IAAI,CAAC,MAAM,GAAG,SAA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AAA;IAED,IAAW,OAAO;QACd,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;CACJ;AAED,kBAAe,KAAK,CAAC"}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
+
import { RowProvenance } from "../../compute/provenance";
|
|
1
2
|
import Union from "./union";
|
|
2
3
|
/**
|
|
3
4
|
* Represents a UNION ALL operation that concatenates results from two sub-queries
|
|
4
5
|
* without removing duplicates.
|
|
5
6
|
*/
|
|
6
7
|
declare class UnionAll extends Union {
|
|
7
|
-
protected
|
|
8
|
+
protected combineWithProvenance(left: Record<string, any>[], right: Record<string, any>[]): {
|
|
9
|
+
rows: Record<string, any>[];
|
|
10
|
+
provenance: RowProvenance[];
|
|
11
|
+
};
|
|
8
12
|
}
|
|
9
13
|
export default UnionAll;
|
|
10
14
|
//# sourceMappingURL=union_all.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"union_all.d.ts","sourceRoot":"","sources":["../../../src/parsing/operations/union_all.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,SAAS,CAAC;AAE5B;;;GAGG;AACH,cAAM,QAAS,SAAQ,KAAK;IACxB,SAAS,CAAC,
|
|
1
|
+
{"version":3,"file":"union_all.d.ts","sourceRoot":"","sources":["../../../src/parsing/operations/union_all.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,KAAK,MAAM,SAAS,CAAC;AAE5B;;;GAGG;AACH,cAAM,QAAS,SAAQ,KAAK;IACxB,SAAS,CAAC,qBAAqB,CAC3B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,EAC3B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,GAC7B;QAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC;QAAC,UAAU,EAAE,aAAa,EAAE,CAAA;KAAE;CASlE;AAED,eAAe,QAAQ,CAAC"}
|
|
@@ -9,8 +9,14 @@ const union_1 = __importDefault(require("./union"));
|
|
|
9
9
|
* without removing duplicates.
|
|
10
10
|
*/
|
|
11
11
|
class UnionAll extends union_1.default {
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
combineWithProvenance(left, right) {
|
|
13
|
+
const wantProv = this._provenanceSink !== null;
|
|
14
|
+
const leftProv = this._leftProvenance;
|
|
15
|
+
const rightProv = this._rightProvenance;
|
|
16
|
+
const provenance = wantProv
|
|
17
|
+
? [...(leftProv !== null && leftProv !== void 0 ? leftProv : []), ...(rightProv !== null && rightProv !== void 0 ? rightProv : [])]
|
|
18
|
+
: [];
|
|
19
|
+
return { rows: [...left, ...right], provenance };
|
|
14
20
|
}
|
|
15
21
|
}
|
|
16
22
|
exports.default = UnionAll;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"union_all.js","sourceRoot":"","sources":["../../../src/parsing/operations/union_all.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"union_all.js","sourceRoot":"","sources":["../../../src/parsing/operations/union_all.ts"],"names":[],"mappings":";;;;;AACA,oDAA4B;AAE5B;;;GAGG;AACH,MAAM,QAAS,SAAQ,eAAK;IACd,qBAAqB,CAC3B,IAA2B,EAC3B,KAA4B;QAE5B,MAAM,QAAQ,GAAG,IAAI,CAAC,eAAe,KAAK,IAAI,CAAC;QAC/C,MAAM,QAAQ,GAAG,IAAI,CAAC,eAAe,CAAC;QACtC,MAAM,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC;QACxC,MAAM,UAAU,GAAoB,QAAQ;YACxC,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,EAAE,CAAC,EAAE,GAAG,CAAC,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,EAAE,CAAC,CAAC;YAC7C,CAAC,CAAC,EAAE,CAAC;QACT,OAAO,EAAE,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC;IACrD,CAAC;CACJ;AAED,kBAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import ASTNode from "../ast_node";
|
|
2
|
+
import Expression from "../expressions/expression";
|
|
3
|
+
import Operation from "./operation";
|
|
4
|
+
/**
|
|
5
|
+
* `UPDATE name = <rhs>` — replace the value bound to `name`.
|
|
6
|
+
*
|
|
7
|
+
* `UPDATE name` always requires `name` to already be bound — use
|
|
8
|
+
* `LET` to introduce a new binding. Per-row updates (key-based
|
|
9
|
+
* upsert, partial-field merge, conditional matched/not-matched
|
|
10
|
+
* branches) live on the `MERGE INTO … USING …` operation.
|
|
11
|
+
*
|
|
12
|
+
* `UPDATE name AS alias DELETE WHERE <pred>` — see {@link UpdateDelete}.
|
|
13
|
+
*/
|
|
14
|
+
declare class Update extends Operation {
|
|
15
|
+
private _name;
|
|
16
|
+
private _expression;
|
|
17
|
+
private _subQuery;
|
|
18
|
+
private _value;
|
|
19
|
+
constructor(name: string, expression: Expression | null, subQuery: ASTNode | null);
|
|
20
|
+
get name(): string;
|
|
21
|
+
get expression(): Expression | null;
|
|
22
|
+
get subQuery(): ASTNode | null;
|
|
23
|
+
run(): Promise<void>;
|
|
24
|
+
get results(): Record<string, any>[];
|
|
25
|
+
}
|
|
26
|
+
export default Update;
|
|
27
|
+
//# sourceMappingURL=update.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../src/parsing/operations/update.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,aAAa,CAAC;AAClC,OAAO,UAAU,MAAM,2BAA2B,CAAC;AACnD,OAAO,SAAS,MAAM,aAAa,CAAC;AAEpC;;;;;;;;;GASG;AACH,cAAM,MAAO,SAAQ,SAAS;IAC1B,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,WAAW,CAAoB;IACvC,OAAO,CAAC,SAAS,CAAiB;IAClC,OAAO,CAAC,MAAM,CAAkB;gBAEpB,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,GAAG,IAAI,EAAE,QAAQ,EAAE,OAAO,GAAG,IAAI;IAajF,IAAW,IAAI,IAAI,MAAM,CAExB;IAED,IAAW,UAAU,IAAI,UAAU,GAAG,IAAI,CAEzC;IAED,IAAW,QAAQ,IAAI,OAAO,GAAG,IAAI,CAEpC;IAEY,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;IA4BjC,IAAW,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAK1C;CACJ;AAED,eAAe,MAAM,CAAC"}
|