@jaepil/uqa 0.1.0
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/LICENSE +661 -0
- package/README.md +788 -0
- package/dist/types/src/analysis/analyzer.d.ts +27 -0
- package/dist/types/src/analysis/analyzer.d.ts.map +1 -0
- package/dist/types/src/analysis/char-filter.d.ts +27 -0
- package/dist/types/src/analysis/char-filter.d.ts.map +1 -0
- package/dist/types/src/analysis/token-filter.d.ts +73 -0
- package/dist/types/src/analysis/token-filter.d.ts.map +1 -0
- package/dist/types/src/analysis/tokenizer.d.ts +42 -0
- package/dist/types/src/analysis/tokenizer.d.ts.map +1 -0
- package/dist/types/src/api/query-builder.d.ts +103 -0
- package/dist/types/src/api/query-builder.d.ts.map +1 -0
- package/dist/types/src/cli/repl.d.ts +42 -0
- package/dist/types/src/cli/repl.d.ts.map +1 -0
- package/dist/types/src/core/functor.d.ts +38 -0
- package/dist/types/src/core/functor.d.ts.map +1 -0
- package/dist/types/src/core/hierarchical.d.ts +24 -0
- package/dist/types/src/core/hierarchical.d.ts.map +1 -0
- package/dist/types/src/core/posting-list.d.ts +43 -0
- package/dist/types/src/core/posting-list.d.ts.map +1 -0
- package/dist/types/src/core/types.d.ts +116 -0
- package/dist/types/src/core/types.d.ts.map +1 -0
- package/dist/types/src/engine.d.ts +130 -0
- package/dist/types/src/engine.d.ts.map +1 -0
- package/dist/types/src/execution/batch.d.ts +144 -0
- package/dist/types/src/execution/batch.d.ts.map +1 -0
- package/dist/types/src/execution/physical.d.ts +18 -0
- package/dist/types/src/execution/physical.d.ts.map +1 -0
- package/dist/types/src/execution/relational.d.ts +174 -0
- package/dist/types/src/execution/relational.d.ts.map +1 -0
- package/dist/types/src/execution/scan.d.ts +41 -0
- package/dist/types/src/execution/scan.d.ts.map +1 -0
- package/dist/types/src/execution/spill.d.ts +39 -0
- package/dist/types/src/execution/spill.d.ts.map +1 -0
- package/dist/types/src/fdw/arrow-handler.d.ts +28 -0
- package/dist/types/src/fdw/arrow-handler.d.ts.map +1 -0
- package/dist/types/src/fdw/duckdb-handler.d.ts +32 -0
- package/dist/types/src/fdw/duckdb-handler.d.ts.map +1 -0
- package/dist/types/src/fdw/foreign-table.d.ts +47 -0
- package/dist/types/src/fdw/foreign-table.d.ts.map +1 -0
- package/dist/types/src/fdw/handler.d.ts +52 -0
- package/dist/types/src/fdw/handler.d.ts.map +1 -0
- package/dist/types/src/fusion/attention.d.ts +23 -0
- package/dist/types/src/fusion/attention.d.ts.map +1 -0
- package/dist/types/src/fusion/boolean.d.ts +6 -0
- package/dist/types/src/fusion/boolean.d.ts.map +1 -0
- package/dist/types/src/fusion/learned.d.ts +12 -0
- package/dist/types/src/fusion/learned.d.ts.map +1 -0
- package/dist/types/src/fusion/log-odds.d.ts +87 -0
- package/dist/types/src/fusion/log-odds.d.ts.map +1 -0
- package/dist/types/src/fusion/query-features.d.ts +8 -0
- package/dist/types/src/fusion/query-features.d.ts.map +1 -0
- package/dist/types/src/graph/centrality.d.ts +35 -0
- package/dist/types/src/graph/centrality.d.ts.map +1 -0
- package/dist/types/src/graph/cross-paradigm.d.ts +68 -0
- package/dist/types/src/graph/cross-paradigm.d.ts.map +1 -0
- package/dist/types/src/graph/cypher/ast.d.ts +175 -0
- package/dist/types/src/graph/cypher/ast.d.ts.map +1 -0
- package/dist/types/src/graph/cypher/compiler.d.ts +60 -0
- package/dist/types/src/graph/cypher/compiler.d.ts.map +1 -0
- package/dist/types/src/graph/cypher/lexer.d.ts +82 -0
- package/dist/types/src/graph/cypher/lexer.d.ts.map +1 -0
- package/dist/types/src/graph/cypher/parser.d.ts +50 -0
- package/dist/types/src/graph/cypher/parser.d.ts.map +1 -0
- package/dist/types/src/graph/delta.d.ts +31 -0
- package/dist/types/src/graph/delta.d.ts.map +1 -0
- package/dist/types/src/graph/graph-embedding.d.ts +13 -0
- package/dist/types/src/graph/graph-embedding.d.ts.map +1 -0
- package/dist/types/src/graph/incremental-match.d.ts +16 -0
- package/dist/types/src/graph/incremental-match.d.ts.map +1 -0
- package/dist/types/src/graph/index.d.ts +58 -0
- package/dist/types/src/graph/index.d.ts.map +1 -0
- package/dist/types/src/graph/join.d.ts +18 -0
- package/dist/types/src/graph/join.d.ts.map +1 -0
- package/dist/types/src/graph/message-passing.d.ts +17 -0
- package/dist/types/src/graph/message-passing.d.ts.map +1 -0
- package/dist/types/src/graph/operators.d.ts +81 -0
- package/dist/types/src/graph/operators.d.ts.map +1 -0
- package/dist/types/src/graph/pattern.d.ts +63 -0
- package/dist/types/src/graph/pattern.d.ts.map +1 -0
- package/dist/types/src/graph/posting-list.d.ts +24 -0
- package/dist/types/src/graph/posting-list.d.ts.map +1 -0
- package/dist/types/src/graph/rpq-optimizer.d.ts +25 -0
- package/dist/types/src/graph/rpq-optimizer.d.ts.map +1 -0
- package/dist/types/src/graph/store.d.ts +61 -0
- package/dist/types/src/graph/store.d.ts.map +1 -0
- package/dist/types/src/graph/temporal-filter.d.ts +12 -0
- package/dist/types/src/graph/temporal-filter.d.ts.map +1 -0
- package/dist/types/src/graph/temporal-pattern-match.d.ts +26 -0
- package/dist/types/src/graph/temporal-pattern-match.d.ts.map +1 -0
- package/dist/types/src/graph/temporal-traverse.d.ts +25 -0
- package/dist/types/src/graph/temporal-traverse.d.ts.map +1 -0
- package/dist/types/src/graph/versioned-store.d.ts +64 -0
- package/dist/types/src/graph/versioned-store.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +20 -0
- package/dist/types/src/index.d.ts.map +1 -0
- package/dist/types/src/joins/base.d.ts +18 -0
- package/dist/types/src/joins/base.d.ts.map +1 -0
- package/dist/types/src/joins/cross-paradigm.d.ts +46 -0
- package/dist/types/src/joins/cross-paradigm.d.ts.map +1 -0
- package/dist/types/src/joins/cross.d.ts +9 -0
- package/dist/types/src/joins/cross.d.ts.map +1 -0
- package/dist/types/src/joins/index.d.ts +7 -0
- package/dist/types/src/joins/index.d.ts.map +1 -0
- package/dist/types/src/joins/inner.d.ts +7 -0
- package/dist/types/src/joins/inner.d.ts.map +1 -0
- package/dist/types/src/joins/outer.d.ts +16 -0
- package/dist/types/src/joins/outer.d.ts.map +1 -0
- package/dist/types/src/joins/semi.d.ts +22 -0
- package/dist/types/src/joins/semi.d.ts.map +1 -0
- package/dist/types/src/joins/sort-merge.d.ts +7 -0
- package/dist/types/src/joins/sort-merge.d.ts.map +1 -0
- package/dist/types/src/math/linalg.d.ts +27 -0
- package/dist/types/src/math/linalg.d.ts.map +1 -0
- package/dist/types/src/math/random.d.ts +15 -0
- package/dist/types/src/math/random.d.ts.map +1 -0
- package/dist/types/src/operators/aggregation.d.ts +65 -0
- package/dist/types/src/operators/aggregation.d.ts.map +1 -0
- package/dist/types/src/operators/attention.d.ts +16 -0
- package/dist/types/src/operators/attention.d.ts.map +1 -0
- package/dist/types/src/operators/backend.d.ts +52 -0
- package/dist/types/src/operators/backend.d.ts.map +1 -0
- package/dist/types/src/operators/base.d.ts +32 -0
- package/dist/types/src/operators/base.d.ts.map +1 -0
- package/dist/types/src/operators/boolean.d.ts +23 -0
- package/dist/types/src/operators/boolean.d.ts.map +1 -0
- package/dist/types/src/operators/calibrated-vector.d.ts +56 -0
- package/dist/types/src/operators/calibrated-vector.d.ts.map +1 -0
- package/dist/types/src/operators/deep-fusion.d.ts +104 -0
- package/dist/types/src/operators/deep-fusion.d.ts.map +1 -0
- package/dist/types/src/operators/deep-learn.d.ts +87 -0
- package/dist/types/src/operators/deep-learn.d.ts.map +1 -0
- package/dist/types/src/operators/hierarchical.d.ts +44 -0
- package/dist/types/src/operators/hierarchical.d.ts.map +1 -0
- package/dist/types/src/operators/hybrid.d.ts +75 -0
- package/dist/types/src/operators/hybrid.d.ts.map +1 -0
- package/dist/types/src/operators/learned-fusion.d.ts +15 -0
- package/dist/types/src/operators/learned-fusion.d.ts.map +1 -0
- package/dist/types/src/operators/multi-field.d.ts +13 -0
- package/dist/types/src/operators/multi-field.d.ts.map +1 -0
- package/dist/types/src/operators/multi-stage.d.ts +12 -0
- package/dist/types/src/operators/multi-stage.d.ts.map +1 -0
- package/dist/types/src/operators/primitive.d.ts +75 -0
- package/dist/types/src/operators/primitive.d.ts.map +1 -0
- package/dist/types/src/operators/progressive-fusion.d.ts +13 -0
- package/dist/types/src/operators/progressive-fusion.d.ts.map +1 -0
- package/dist/types/src/operators/sparse.d.ts +12 -0
- package/dist/types/src/operators/sparse.d.ts.map +1 -0
- package/dist/types/src/planner/cardinality.d.ts +110 -0
- package/dist/types/src/planner/cardinality.d.ts.map +1 -0
- package/dist/types/src/planner/cost-model.d.ts +16 -0
- package/dist/types/src/planner/cost-model.d.ts.map +1 -0
- package/dist/types/src/planner/executor.d.ts +48 -0
- package/dist/types/src/planner/executor.d.ts.map +1 -0
- package/dist/types/src/planner/join-enumerator.d.ts +76 -0
- package/dist/types/src/planner/join-enumerator.d.ts.map +1 -0
- package/dist/types/src/planner/join-graph.d.ts +61 -0
- package/dist/types/src/planner/join-graph.d.ts.map +1 -0
- package/dist/types/src/planner/join-order.d.ts +24 -0
- package/dist/types/src/planner/join-order.d.ts.map +1 -0
- package/dist/types/src/planner/optimizer.d.ts +62 -0
- package/dist/types/src/planner/optimizer.d.ts.map +1 -0
- package/dist/types/src/planner/parallel.d.ts +43 -0
- package/dist/types/src/planner/parallel.d.ts.map +1 -0
- package/dist/types/src/scoring/bayesian-bm25.d.ts +22 -0
- package/dist/types/src/scoring/bayesian-bm25.d.ts.map +1 -0
- package/dist/types/src/scoring/bm25.d.ts +20 -0
- package/dist/types/src/scoring/bm25.d.ts.map +1 -0
- package/dist/types/src/scoring/calibration.d.ts +68 -0
- package/dist/types/src/scoring/calibration.d.ts.map +1 -0
- package/dist/types/src/scoring/external-prior.d.ts +55 -0
- package/dist/types/src/scoring/external-prior.d.ts.map +1 -0
- package/dist/types/src/scoring/fusion-wand.d.ts +19 -0
- package/dist/types/src/scoring/fusion-wand.d.ts.map +1 -0
- package/dist/types/src/scoring/multi-field.d.ts +10 -0
- package/dist/types/src/scoring/multi-field.d.ts.map +1 -0
- package/dist/types/src/scoring/parameter-learner.d.ts +42 -0
- package/dist/types/src/scoring/parameter-learner.d.ts.map +1 -0
- package/dist/types/src/scoring/vector.d.ts +42 -0
- package/dist/types/src/scoring/vector.d.ts.map +1 -0
- package/dist/types/src/scoring/wand.d.ts +51 -0
- package/dist/types/src/scoring/wand.d.ts.map +1 -0
- package/dist/types/src/sql/compiler.d.ts +551 -0
- package/dist/types/src/sql/compiler.d.ts.map +1 -0
- package/dist/types/src/sql/expr-evaluator.d.ts +43 -0
- package/dist/types/src/sql/expr-evaluator.d.ts.map +1 -0
- package/dist/types/src/sql/fts-query.d.ts +60 -0
- package/dist/types/src/sql/fts-query.d.ts.map +1 -0
- package/dist/types/src/sql/table.d.ts +72 -0
- package/dist/types/src/sql/table.d.ts.map +1 -0
- package/dist/types/src/storage/abc/document-store.d.ts +44 -0
- package/dist/types/src/storage/abc/document-store.d.ts.map +1 -0
- package/dist/types/src/storage/abc/graph-store.d.ts +109 -0
- package/dist/types/src/storage/abc/graph-store.d.ts.map +1 -0
- package/dist/types/src/storage/abc/inverted-index.d.ts +118 -0
- package/dist/types/src/storage/abc/inverted-index.d.ts.map +1 -0
- package/dist/types/src/storage/block-max-index.d.ts +45 -0
- package/dist/types/src/storage/block-max-index.d.ts.map +1 -0
- package/dist/types/src/storage/btree-index.d.ts +18 -0
- package/dist/types/src/storage/btree-index.d.ts.map +1 -0
- package/dist/types/src/storage/catalog.d.ts +87 -0
- package/dist/types/src/storage/catalog.d.ts.map +1 -0
- package/dist/types/src/storage/document-store.d.ts +20 -0
- package/dist/types/src/storage/document-store.d.ts.map +1 -0
- package/dist/types/src/storage/index-abc.d.ts +16 -0
- package/dist/types/src/storage/index-abc.d.ts.map +1 -0
- package/dist/types/src/storage/index-manager.d.ts +19 -0
- package/dist/types/src/storage/index-manager.d.ts.map +1 -0
- package/dist/types/src/storage/index-types.d.ts +10 -0
- package/dist/types/src/storage/index-types.d.ts.map +1 -0
- package/dist/types/src/storage/inverted-index.d.ts +55 -0
- package/dist/types/src/storage/inverted-index.d.ts.map +1 -0
- package/dist/types/src/storage/ivf-index.d.ts +57 -0
- package/dist/types/src/storage/ivf-index.d.ts.map +1 -0
- package/dist/types/src/storage/managed-connection.d.ts +64 -0
- package/dist/types/src/storage/managed-connection.d.ts.map +1 -0
- package/dist/types/src/storage/spatial-index.d.ts +18 -0
- package/dist/types/src/storage/spatial-index.d.ts.map +1 -0
- package/dist/types/src/storage/sqlite-document-store.d.ts +54 -0
- package/dist/types/src/storage/sqlite-document-store.d.ts.map +1 -0
- package/dist/types/src/storage/sqlite-graph-store.d.ts +59 -0
- package/dist/types/src/storage/sqlite-graph-store.d.ts.map +1 -0
- package/dist/types/src/storage/sqlite-inverted-index.d.ts +75 -0
- package/dist/types/src/storage/sqlite-inverted-index.d.ts.map +1 -0
- package/dist/types/src/storage/transaction.d.ts +15 -0
- package/dist/types/src/storage/transaction.d.ts.map +1 -0
- package/dist/types/src/storage/vector-index.d.ts +23 -0
- package/dist/types/src/storage/vector-index.d.ts.map +1 -0
- package/dist/uqa.es.js +16156 -0
- package/dist/uqa.es.js.map +1 -0
- package/dist/uqa.umd.js +11 -0
- package/dist/uqa.umd.js.map +1 -0
- package/package.json +73 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { ColumnDef } from "../sql/table.js";
|
|
2
|
+
export interface FDWColumnDef {
|
|
3
|
+
readonly name: string;
|
|
4
|
+
readonly type: string;
|
|
5
|
+
readonly nullable: boolean;
|
|
6
|
+
readonly defaultValue?: unknown;
|
|
7
|
+
}
|
|
8
|
+
export interface FDWPredicate {
|
|
9
|
+
readonly column: string;
|
|
10
|
+
readonly operator: string;
|
|
11
|
+
readonly value: unknown;
|
|
12
|
+
readonly value2?: unknown;
|
|
13
|
+
}
|
|
14
|
+
export interface ForeignServer {
|
|
15
|
+
readonly name: string;
|
|
16
|
+
readonly fdwType: string;
|
|
17
|
+
readonly options: Record<string, string>;
|
|
18
|
+
}
|
|
19
|
+
export interface ForeignTable {
|
|
20
|
+
name: string;
|
|
21
|
+
serverName: string;
|
|
22
|
+
columns: Map<string, ColumnDef>;
|
|
23
|
+
options: Record<string, string>;
|
|
24
|
+
}
|
|
25
|
+
export declare function createForeignServer(name: string, fdwType: string, options?: Record<string, string>): ForeignServer;
|
|
26
|
+
export declare function createForeignTable(name: string, serverName: string, columns: Map<string, ColumnDef>, options?: Record<string, string>): ForeignTable;
|
|
27
|
+
/**
|
|
28
|
+
* Build a FDWPredicate for equality comparison.
|
|
29
|
+
*/
|
|
30
|
+
export declare function fdwEquals(column: string, value: unknown): FDWPredicate;
|
|
31
|
+
/**
|
|
32
|
+
* Build a FDWPredicate for a range (BETWEEN) comparison.
|
|
33
|
+
*/
|
|
34
|
+
export declare function fdwBetween(column: string, low: unknown, high: unknown): FDWPredicate;
|
|
35
|
+
/**
|
|
36
|
+
* Build a FDWPredicate for IS NULL.
|
|
37
|
+
*/
|
|
38
|
+
export declare function fdwIsNull(column: string): FDWPredicate;
|
|
39
|
+
/**
|
|
40
|
+
* Build a FDWPredicate for IS NOT NULL.
|
|
41
|
+
*/
|
|
42
|
+
export declare function fdwIsNotNull(column: string): FDWPredicate;
|
|
43
|
+
/**
|
|
44
|
+
* Build a FDWPredicate for IN list.
|
|
45
|
+
*/
|
|
46
|
+
export declare function fdwIn(column: string, values: unknown[]): FDWPredicate;
|
|
47
|
+
//# sourceMappingURL=foreign-table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"foreign-table.d.ts","sourceRoot":"","sources":["../../../../src/fdw/foreign-table.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAMjD,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IA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YAAY,CAEpF;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,CAEtD;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,CAEzD;AAED;;GAEG;AACH,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,YAAY,CAErE"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { ForeignTable } from "./foreign-table.js";
|
|
2
|
+
/**
|
|
3
|
+
* A single pushdown predicate for FDW handlers.
|
|
4
|
+
*
|
|
5
|
+
* Represents "column operator value" comparisons that can be pushed
|
|
6
|
+
* down to the data source for server-side filtering (e.g. Hive
|
|
7
|
+
* partition pruning, remote WHERE clauses).
|
|
8
|
+
*
|
|
9
|
+
* Supported operators:
|
|
10
|
+
* - Comparison: =, !=, <>, <, <=, >, >=
|
|
11
|
+
* - Set membership: IN
|
|
12
|
+
* - Pattern matching: LIKE, NOT LIKE, ILIKE, NOT ILIKE
|
|
13
|
+
*/
|
|
14
|
+
export interface FDWPredicate {
|
|
15
|
+
/** Column name. */
|
|
16
|
+
readonly column: string;
|
|
17
|
+
/** Comparison operator (e.g. "=", "<", "IN", "LIKE"). */
|
|
18
|
+
readonly operator: string;
|
|
19
|
+
/**
|
|
20
|
+
* Literal value for the comparison.
|
|
21
|
+
* Scalar (number, string, boolean, null) for comparisons and pattern operators;
|
|
22
|
+
* array of scalars for IN.
|
|
23
|
+
*/
|
|
24
|
+
readonly value: unknown;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Abstract interface for scanning external data sources.
|
|
28
|
+
*
|
|
29
|
+
* Concrete implementations (DuckDBFDWHandler, ArrowFlightSQLFDWHandler)
|
|
30
|
+
* translate the scan request into native queries against the external
|
|
31
|
+
* data source and return results as rows of key-value objects.
|
|
32
|
+
*/
|
|
33
|
+
export declare abstract class FDWHandler {
|
|
34
|
+
/**
|
|
35
|
+
* Scan the foreign table and return rows.
|
|
36
|
+
*
|
|
37
|
+
* @param foreignTable - The foreign table metadata.
|
|
38
|
+
* @param columns - Optional column projection (all columns if null).
|
|
39
|
+
* @param predicates - Pushdown predicates for server-side filtering.
|
|
40
|
+
* Each FDWPredicate carries a column name, a comparison operator,
|
|
41
|
+
* and a literal value. Handlers translate these into native filter
|
|
42
|
+
* expressions (e.g. SQL WHERE clauses) so the data source can prune
|
|
43
|
+
* data before transmission -- critical for Hive partition pruning
|
|
44
|
+
* and remote query efficiency.
|
|
45
|
+
* @param limit - Optional row limit pushed down to the data source.
|
|
46
|
+
* @returns Array of row objects containing the requested data.
|
|
47
|
+
*/
|
|
48
|
+
abstract scan(foreignTable: ForeignTable, columns?: string[] | null, predicates?: FDWPredicate[] | null, limit?: number | null): Record<string, unknown>[];
|
|
49
|
+
/** Release any resources held by this handler. */
|
|
50
|
+
abstract close(): void;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../../src/fdw/handler.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,YAAY;IAC3B,mBAAmB;IACnB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,yDAAyD;IACzD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;CACzB;AAED;;;;;;GAMG;AACH,8BAAsB,UAAU;IAC9B;;;;;;;;;;;;;OAaG;IACH,QAAQ,CAAC,IAAI,CACX,YAAY,EAAE,YAAY,EAC1B,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,EACzB,UAAU,CAAC,EAAE,YAAY,EAAE,GAAG,IAAI,EAClC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GACpB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE;IAE5B,kDAAkD;IAClD,QAAQ,CAAC,KAAK,IAAI,IAAI;CACvB"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare class AttentionFusion {
|
|
2
|
+
private _attn;
|
|
3
|
+
constructor(nSignals: number, nQueryFeatures?: number, alpha?: number, normalize?: boolean, baseRate?: number | null);
|
|
4
|
+
get nSignals(): number;
|
|
5
|
+
get nQueryFeatures(): number;
|
|
6
|
+
fuse(probabilities: number[], queryFeatures: number[]): number;
|
|
7
|
+
fit(probs: number[][], labels: number[], queryFeatures: number[][]): void;
|
|
8
|
+
update(probs: number[], label: number, queryFeatures: number[]): void;
|
|
9
|
+
stateDict(): Record<string, unknown>;
|
|
10
|
+
loadStateDict(state: Record<string, unknown>): void;
|
|
11
|
+
}
|
|
12
|
+
export declare class MultiHeadAttentionFusion {
|
|
13
|
+
private _mh;
|
|
14
|
+
private _nQueryFeatures;
|
|
15
|
+
constructor(nSignals: number, nHeads?: number, nQueryFeatures?: number, alpha?: number, normalize?: boolean);
|
|
16
|
+
get nSignals(): number;
|
|
17
|
+
get nQueryFeatures(): number;
|
|
18
|
+
fuse(probabilities: number[], queryFeatures: number[]): number;
|
|
19
|
+
fit(probs: number[][], labels: number[], queryFeatures: number[][]): void;
|
|
20
|
+
stateDict(): Record<string, unknown>;
|
|
21
|
+
loadStateDict(state: Record<string, unknown>): void;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=attention.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attention.d.ts","sourceRoot":"","sources":["../../../../src/fusion/attention.ts"],"names":[],"mappings":"AAkBA,qBAAa,eAAe;IAC1B,OAAO,CAAC,KAAK,CAA0B;gBAGrC,QAAQ,EAAE,MAAM,EAChB,cAAc,SAAI,EAClB,KAAK,SAAM,EACX,SAAS,UAAQ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":3,"file":"boolean.d.ts","sourceRoot":"","sources":["../../../../src/fusion/boolean.ts"],"names":[],"mappings":"AAeA,qBAAa,oBAAoB;IAC/B,MAAM,CAAC,OAAO,CAAC,aAAa,EAAE,MAAM,EAAE,GAAG,MAAM;IAI/C,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,MAAM,EAAE,GAAG,MAAM;IAI9C,MAAM,CAAC,OAAO,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM;CAGlC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare class LearnedFusion {
|
|
2
|
+
private _learnable;
|
|
3
|
+
constructor(nSignals: number, alpha?: number);
|
|
4
|
+
get nSignals(): number;
|
|
5
|
+
fuse(probabilities: number[]): number;
|
|
6
|
+
update(probs: number[], label: number, options?: {
|
|
7
|
+
learningRate?: number;
|
|
8
|
+
}): void;
|
|
9
|
+
stateDict(): Record<string, unknown>;
|
|
10
|
+
loadStateDict(state: Record<string, unknown>): void;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=learned.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"learned.d.ts","sourceRoot":"","sources":["../../../../src/fusion/learned.ts"],"names":[],"mappings":"AAcA,qBAAa,aAAa;IACxB,OAAO,CAAC,UAAU,CAA0B;gBAEhC,QAAQ,EAAE,MAAM,EAAE,KAAK,SAAM;IAIzC,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED,IAAI,CAAC,aAAa,EAAE,MAAM,EAAE,GAAG,MAAM;IAKrC,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;IAUjF,SAAS,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAQpC,aAAa,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;CAUpD"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Log-odds conjunction framework (Section 4, Paper 4).
|
|
3
|
+
*
|
|
4
|
+
* Delegates to bayesian-bm25 package's log_odds_conjunction.
|
|
5
|
+
*/
|
|
6
|
+
export declare class LogOddsFusion {
|
|
7
|
+
/**
|
|
8
|
+
* Confidence scaling exponent.
|
|
9
|
+
* alpha=0.5 yields the sqrt(n) scaling law (Theorem 4.4.1).
|
|
10
|
+
*/
|
|
11
|
+
readonly alpha: number;
|
|
12
|
+
/**
|
|
13
|
+
* Gating mechanism for log-odds signals.
|
|
14
|
+
* "none" (default), "relu", or "swish".
|
|
15
|
+
*/
|
|
16
|
+
readonly gating: string | null;
|
|
17
|
+
/**
|
|
18
|
+
* @param confidenceAlpha - Confidence scaling exponent (default 0.5).
|
|
19
|
+
* @param gating - Gating mechanism: "none", "relu", or "swish".
|
|
20
|
+
*/
|
|
21
|
+
constructor(confidenceAlpha?: number, gating?: string | null);
|
|
22
|
+
/**
|
|
23
|
+
* Combine calibrated probability signals via log-odds conjunction.
|
|
24
|
+
*
|
|
25
|
+
* Returns 0.5 for an empty list and the single value for a single element.
|
|
26
|
+
*/
|
|
27
|
+
fuse(probabilities: number[]): number;
|
|
28
|
+
/**
|
|
29
|
+
* Log-odds mean aggregation (Definition 4.1.1, Paper 4).
|
|
30
|
+
*
|
|
31
|
+
* Computes the arithmetic mean in log-odds space and maps back to
|
|
32
|
+
* probability via sigmoid. Unlike fuse(), no confidence scaling
|
|
33
|
+
* (n^alpha) is applied -- the result is scale-neutral: if all
|
|
34
|
+
* signals report the same probability p, the output is exactly p
|
|
35
|
+
* regardless of n.
|
|
36
|
+
*
|
|
37
|
+
* This is the normalized Logarithmic Opinion Pool (Theorem 4.1.2a).
|
|
38
|
+
*/
|
|
39
|
+
fuseMean(probabilities: number[]): number;
|
|
40
|
+
/**
|
|
41
|
+
* Weighted log-odds conjunction (attention-like, Section 8, Paper 4).
|
|
42
|
+
*
|
|
43
|
+
* Each signal gets a per-signal weight applied in log-odds space.
|
|
44
|
+
*/
|
|
45
|
+
fuseWeighted(probabilities: number[], weights: number[]): number;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Quality metrics for a single signal (Paper 4, Section 6).
|
|
49
|
+
*
|
|
50
|
+
* Used to compute per-signal confidence scaling in AdaptiveLogOddsFusion.
|
|
51
|
+
*/
|
|
52
|
+
export interface SignalQuality {
|
|
53
|
+
/** Fraction of candidate docs returned by this signal. */
|
|
54
|
+
readonly coverageRatio: number;
|
|
55
|
+
/** Variance of signal scores. */
|
|
56
|
+
readonly scoreVariance: number;
|
|
57
|
+
/** Mean absolute calibration error. */
|
|
58
|
+
readonly calibrationError: number;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Log-odds fusion with per-signal adaptive confidence scaling.
|
|
62
|
+
*
|
|
63
|
+
* Instead of a uniform alpha, each signal gets an alpha computed
|
|
64
|
+
* from its quality metrics: signals with higher coverage, lower
|
|
65
|
+
* variance, and lower calibration error get higher confidence.
|
|
66
|
+
*
|
|
67
|
+
* alpha_i = base_alpha * (coverage * (1 - cal_error)) / (1 + variance)
|
|
68
|
+
*/
|
|
69
|
+
export declare class AdaptiveLogOddsFusion extends LogOddsFusion {
|
|
70
|
+
readonly baseAlpha: number;
|
|
71
|
+
constructor(baseAlpha?: number, gating?: string | null);
|
|
72
|
+
/**
|
|
73
|
+
* Compute per-signal confidence scaling from quality metrics.
|
|
74
|
+
*
|
|
75
|
+
* Higher coverage, lower calibration error, and lower variance
|
|
76
|
+
* all increase the signal's confidence alpha.
|
|
77
|
+
*/
|
|
78
|
+
computeSignalAlpha(quality: SignalQuality): number;
|
|
79
|
+
/**
|
|
80
|
+
* Fuse with per-signal adaptive weights.
|
|
81
|
+
*
|
|
82
|
+
* Computes raw alpha for each signal from its quality metrics,
|
|
83
|
+
* then normalizes to sum to 1.0 (required by log_odds_conjunction).
|
|
84
|
+
*/
|
|
85
|
+
fuseAdaptive(probabilities: number[], qualities: SignalQuality[]): number;
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=log-odds.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log-odds.d.ts","sourceRoot":"","sources":["../../../../src/fusion/log-odds.ts"],"names":[],"mappings":"AAsBA;;;;GAIG;AACH,qBAAa,aAAa;IACxB;;;OAGG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAE/B;;;OAGG;gBACS,eAAe,SAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI;IAKzD;;;;OAIG;IACH,IAAI,CAAC,aAAa,EAAE,MAAM,EAAE,GAAG,MAAM;IAWrC;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,aAAa,EAAE,MAAM,EAAE,GAAG,MAAM;IAczC;;;;OAIG;IACH,YAAY,CAAC,aAAa,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,MAAM;CASjE;AAID;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,0DAA0D;IAC1D,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,iCAAiC;IACjC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,uCAAuC;IACvC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;CACnC;AAID;;;;;;;;GAQG;AACH,qBAAa,qBAAsB,SAAQ,aAAa;IACtD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;gBAEf,SAAS,SAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI;IAKnD;;;;;OAKG;IACH,kBAAkB,CAAC,OAAO,EAAE,aAAa,GAAG,MAAM;IAQlD;;;;;OAKG;IACH,YAAY,CAAC,aAAa,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,aAAa,EAAE,GAAG,MAAM;CAW1E"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { InvertedIndex } from "../storage/abc/inverted-index.js";
|
|
2
|
+
export declare class QueryFeatureExtractor {
|
|
3
|
+
private readonly _index;
|
|
4
|
+
constructor(invertedIndex: InvertedIndex);
|
|
5
|
+
get nFeatures(): number;
|
|
6
|
+
extract(queryTerms: string[], field?: string | null): Float64Array;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=query-features.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query-features.d.ts","sourceRoot":"","sources":["../../../../src/fusion/query-features.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAEtE,qBAAa,qBAAqB;IAChC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAgB;gBAE3B,aAAa,EAAE,aAAa;IAIxC,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,YAAY;CA6CnE"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { PostingList } from "../core/posting-list.js";
|
|
2
|
+
import { Operator } from "../operators/base.js";
|
|
3
|
+
import type { ExecutionContext } from "../operators/base.js";
|
|
4
|
+
export declare class PageRankOperator extends Operator {
|
|
5
|
+
readonly damping: number;
|
|
6
|
+
readonly maxIterations: number;
|
|
7
|
+
readonly tolerance: number;
|
|
8
|
+
readonly graph: string;
|
|
9
|
+
constructor(opts: {
|
|
10
|
+
damping?: number;
|
|
11
|
+
maxIterations?: number;
|
|
12
|
+
tolerance?: number;
|
|
13
|
+
graph: string;
|
|
14
|
+
});
|
|
15
|
+
execute(context: ExecutionContext): PostingList;
|
|
16
|
+
}
|
|
17
|
+
export declare class HITSOperator extends Operator {
|
|
18
|
+
readonly maxIterations: number;
|
|
19
|
+
readonly tolerance: number;
|
|
20
|
+
readonly graph: string;
|
|
21
|
+
constructor(opts: {
|
|
22
|
+
maxIterations?: number;
|
|
23
|
+
tolerance?: number;
|
|
24
|
+
graph: string;
|
|
25
|
+
});
|
|
26
|
+
execute(context: ExecutionContext): PostingList;
|
|
27
|
+
}
|
|
28
|
+
export declare class BetweennessCentralityOperator extends Operator {
|
|
29
|
+
readonly graph: string;
|
|
30
|
+
constructor(opts: {
|
|
31
|
+
graph: string;
|
|
32
|
+
});
|
|
33
|
+
execute(context: ExecutionContext): PostingList;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=centrality.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"centrality.d.ts","sourceRoot":"","sources":["../../../../src/graph/centrality.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAM7D,qBAAa,gBAAiB,SAAQ,QAAQ;IAC5C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;gBAEX,IAAI,EAAE;QAChB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,KAAK,EAAE,MAAM,CAAC;KACf;IAQD,OAAO,CAAC,OAAO,EAAE,gBAAgB,GAAG,WAAW;CAqFhD;AAID,qBAAa,YAAa,SAAQ,QAAQ;IACxC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;gBAEX,IAAI,EAAE;QAAE,aAAa,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE;IAO/E,OAAO,CAAC,OAAO,EAAE,gBAAgB,GAAG,WAAW;CA6GhD;AAID,qBAAa,6BAA8B,SAAQ,QAAQ;IACzD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;gBAEX,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE;IAKnC,OAAO,CAAC,OAAO,EAAE,gBAAgB,GAAG,WAAW;CAuGhD"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { PostingList } from "../core/posting-list.js";
|
|
2
|
+
import { Operator } from "../operators/base.js";
|
|
3
|
+
import type { ExecutionContext } from "../operators/base.js";
|
|
4
|
+
export declare class ToGraphOperator extends Operator {
|
|
5
|
+
readonly source: Operator;
|
|
6
|
+
readonly graphName: string;
|
|
7
|
+
readonly labelField: string;
|
|
8
|
+
constructor(source: Operator, graphName: string, labelField?: string);
|
|
9
|
+
execute(context: ExecutionContext): PostingList;
|
|
10
|
+
}
|
|
11
|
+
export declare class FromGraphOperator extends Operator {
|
|
12
|
+
readonly graph: string;
|
|
13
|
+
constructor(graph: string);
|
|
14
|
+
execute(context: ExecutionContext): PostingList;
|
|
15
|
+
}
|
|
16
|
+
export declare class SemanticGraphSearchOperator extends Operator {
|
|
17
|
+
readonly startVertex: number;
|
|
18
|
+
readonly graph: string;
|
|
19
|
+
readonly queryVector: Float64Array;
|
|
20
|
+
readonly vectorField: string;
|
|
21
|
+
readonly threshold: number;
|
|
22
|
+
readonly maxHops: number;
|
|
23
|
+
constructor(opts: {
|
|
24
|
+
startVertex: number;
|
|
25
|
+
graph: string;
|
|
26
|
+
queryVector: Float64Array;
|
|
27
|
+
vectorField?: string;
|
|
28
|
+
threshold?: number;
|
|
29
|
+
maxHops?: number;
|
|
30
|
+
});
|
|
31
|
+
execute(context: ExecutionContext): PostingList;
|
|
32
|
+
}
|
|
33
|
+
export declare class VertexEmbeddingOperator extends Operator {
|
|
34
|
+
readonly graph: string;
|
|
35
|
+
readonly queryVector: Float64Array;
|
|
36
|
+
readonly vectorField: string;
|
|
37
|
+
constructor(opts: {
|
|
38
|
+
graph: string;
|
|
39
|
+
queryVector: Float64Array;
|
|
40
|
+
vectorField?: string;
|
|
41
|
+
});
|
|
42
|
+
execute(context: ExecutionContext): PostingList;
|
|
43
|
+
}
|
|
44
|
+
export declare class VectorEnhancedMatchOperator extends Operator {
|
|
45
|
+
readonly pattern: unknown;
|
|
46
|
+
readonly queryVector: Float64Array;
|
|
47
|
+
readonly scoreVariable: string;
|
|
48
|
+
readonly vectorField: string;
|
|
49
|
+
readonly threshold: number;
|
|
50
|
+
readonly graphName: string;
|
|
51
|
+
constructor(opts: {
|
|
52
|
+
pattern: unknown;
|
|
53
|
+
queryVector: Float64Array;
|
|
54
|
+
scoreVariable: string;
|
|
55
|
+
vectorField?: string;
|
|
56
|
+
threshold?: number;
|
|
57
|
+
graph: string;
|
|
58
|
+
});
|
|
59
|
+
execute(context: ExecutionContext): PostingList;
|
|
60
|
+
}
|
|
61
|
+
export declare class TextToGraphOperator extends Operator {
|
|
62
|
+
readonly source: Operator;
|
|
63
|
+
readonly graphName: string;
|
|
64
|
+
readonly windowSize: number;
|
|
65
|
+
constructor(source: Operator, graphName: string, windowSize?: number);
|
|
66
|
+
execute(context: ExecutionContext): PostingList;
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=cross-paradigm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cross-paradigm.d.ts","sourceRoot":"","sources":["../../../../src/graph/cross-paradigm.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACh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4
|
+
}
|
|
5
|
+
export interface IdentifierExpr {
|
|
6
|
+
readonly kind: "identifier";
|
|
7
|
+
readonly name: string;
|
|
8
|
+
}
|
|
9
|
+
export interface PropertyAccessExpr {
|
|
10
|
+
readonly kind: "property_access";
|
|
11
|
+
readonly object: CypherExpr;
|
|
12
|
+
readonly property: string;
|
|
13
|
+
}
|
|
14
|
+
export interface ParameterExpr {
|
|
15
|
+
readonly kind: "parameter";
|
|
16
|
+
readonly name: string;
|
|
17
|
+
}
|
|
18
|
+
export interface BinaryOpExpr {
|
|
19
|
+
readonly kind: "binary_op";
|
|
20
|
+
readonly op: string;
|
|
21
|
+
readonly left: CypherExpr;
|
|
22
|
+
readonly right: CypherExpr;
|
|
23
|
+
}
|
|
24
|
+
export interface UnaryOpExpr {
|
|
25
|
+
readonly kind: "unary_op";
|
|
26
|
+
readonly op: string;
|
|
27
|
+
readonly operand: CypherExpr;
|
|
28
|
+
}
|
|
29
|
+
export interface FunctionCallExpr {
|
|
30
|
+
readonly kind: "function_call";
|
|
31
|
+
readonly name: string;
|
|
32
|
+
readonly args: CypherExpr[];
|
|
33
|
+
}
|
|
34
|
+
export interface ListExpr {
|
|
35
|
+
readonly kind: "list";
|
|
36
|
+
readonly elements: CypherExpr[];
|
|
37
|
+
}
|
|
38
|
+
export interface InExpr {
|
|
39
|
+
readonly kind: "in";
|
|
40
|
+
readonly value: CypherExpr;
|
|
41
|
+
readonly list: CypherExpr;
|
|
42
|
+
}
|
|
43
|
+
export interface IsNullExpr {
|
|
44
|
+
readonly kind: "is_null";
|
|
45
|
+
readonly value: CypherExpr;
|
|
46
|
+
readonly negated: boolean;
|
|
47
|
+
}
|
|
48
|
+
export interface CaseExpr {
|
|
49
|
+
readonly kind: "case";
|
|
50
|
+
readonly operand: CypherExpr | null;
|
|
51
|
+
readonly whens: Array<{
|
|
52
|
+
when: CypherExpr;
|
|
53
|
+
then: CypherExpr;
|
|
54
|
+
}>;
|
|
55
|
+
readonly elseExpr: CypherExpr | null;
|
|
56
|
+
}
|
|
57
|
+
export interface ExistsExpr {
|
|
58
|
+
readonly kind: "exists";
|
|
59
|
+
readonly pattern: NodePattern;
|
|
60
|
+
}
|
|
61
|
+
export interface IndexExpr {
|
|
62
|
+
readonly kind: "index";
|
|
63
|
+
readonly value: CypherExpr;
|
|
64
|
+
readonly index: CypherExpr;
|
|
65
|
+
}
|
|
66
|
+
export type CypherExpr = LiteralExpr | IdentifierExpr | PropertyAccessExpr | ParameterExpr | BinaryOpExpr | UnaryOpExpr | FunctionCallExpr | ListExpr | InExpr | IsNullExpr | CaseExpr | ExistsExpr | IndexExpr;
|
|
67
|
+
export interface NodePattern {
|
|
68
|
+
readonly variable: string | null;
|
|
69
|
+
readonly labels: string[];
|
|
70
|
+
readonly properties: Map<string, CypherExpr>;
|
|
71
|
+
}
|
|
72
|
+
export interface RelationshipPattern {
|
|
73
|
+
readonly variable: string | null;
|
|
74
|
+
readonly types: string[];
|
|
75
|
+
readonly properties: Map<string, CypherExpr>;
|
|
76
|
+
readonly direction: "out" | "in" | "both";
|
|
77
|
+
readonly minHops: number | null;
|
|
78
|
+
readonly maxHops: number | null;
|
|
79
|
+
}
|
|
80
|
+
export interface PathPattern {
|
|
81
|
+
readonly elements: Array<NodePattern | RelationshipPattern>;
|
|
82
|
+
}
|
|
83
|
+
export interface MatchClause {
|
|
84
|
+
readonly kind: "match";
|
|
85
|
+
readonly patterns: PathPattern[];
|
|
86
|
+
readonly optional: boolean;
|
|
87
|
+
readonly where: CypherExpr | null;
|
|
88
|
+
}
|
|
89
|
+
export interface ReturnClause {
|
|
90
|
+
readonly kind: "return";
|
|
91
|
+
readonly items: ReturnItem[];
|
|
92
|
+
readonly distinct: boolean;
|
|
93
|
+
readonly orderBy: OrderByItem[] | null;
|
|
94
|
+
readonly skip: CypherExpr | null;
|
|
95
|
+
readonly limit: CypherExpr | null;
|
|
96
|
+
}
|
|
97
|
+
export interface ReturnItem {
|
|
98
|
+
readonly expr: CypherExpr;
|
|
99
|
+
readonly alias: string | null;
|
|
100
|
+
}
|
|
101
|
+
export interface OrderByItem {
|
|
102
|
+
readonly expr: CypherExpr;
|
|
103
|
+
readonly ascending: boolean;
|
|
104
|
+
}
|
|
105
|
+
export interface WithClause {
|
|
106
|
+
readonly kind: "with";
|
|
107
|
+
readonly items: ReturnItem[];
|
|
108
|
+
readonly distinct: boolean;
|
|
109
|
+
readonly where: CypherExpr | null;
|
|
110
|
+
readonly orderBy: OrderByItem[] | null;
|
|
111
|
+
readonly skip: CypherExpr | null;
|
|
112
|
+
readonly limit: CypherExpr | null;
|
|
113
|
+
}
|
|
114
|
+
export interface CreateClause {
|
|
115
|
+
readonly kind: "create";
|
|
116
|
+
readonly patterns: PathPattern[];
|
|
117
|
+
}
|
|
118
|
+
export interface DeleteClause {
|
|
119
|
+
readonly kind: "delete";
|
|
120
|
+
readonly exprs: CypherExpr[];
|
|
121
|
+
readonly detach: boolean;
|
|
122
|
+
}
|
|
123
|
+
export interface SetClause {
|
|
124
|
+
readonly kind: "set";
|
|
125
|
+
readonly items: SetItem[];
|
|
126
|
+
}
|
|
127
|
+
export interface SetItem {
|
|
128
|
+
readonly property: PropertyAccessExpr;
|
|
129
|
+
readonly value: CypherExpr;
|
|
130
|
+
readonly operator?: string;
|
|
131
|
+
}
|
|
132
|
+
export interface RemoveClause {
|
|
133
|
+
readonly kind: "remove";
|
|
134
|
+
readonly items: CypherExpr[];
|
|
135
|
+
}
|
|
136
|
+
export interface MergeClause {
|
|
137
|
+
readonly kind: "merge";
|
|
138
|
+
readonly pattern: PathPattern;
|
|
139
|
+
readonly onCreate: SetClause | null;
|
|
140
|
+
readonly onMatch: SetClause | null;
|
|
141
|
+
}
|
|
142
|
+
export interface UnwindClause {
|
|
143
|
+
readonly kind: "unwind";
|
|
144
|
+
readonly expr: CypherExpr;
|
|
145
|
+
readonly alias: string;
|
|
146
|
+
}
|
|
147
|
+
export interface CallClause {
|
|
148
|
+
readonly kind: "call";
|
|
149
|
+
readonly procedure: string;
|
|
150
|
+
readonly args: CypherExpr[];
|
|
151
|
+
readonly yields: string[] | null;
|
|
152
|
+
}
|
|
153
|
+
export type CypherClause = MatchClause | ReturnClause | WithClause | CreateClause | DeleteClause | SetClause | RemoveClause | MergeClause | UnwindClause | CallClause;
|
|
154
|
+
export interface CypherQuery {
|
|
155
|
+
readonly clauses: CypherClause[];
|
|
156
|
+
}
|
|
157
|
+
export declare function createLiteral(value: string | number | boolean | null): LiteralExpr;
|
|
158
|
+
export declare function createIdentifier(name: string): IdentifierExpr;
|
|
159
|
+
export declare function createPropertyAccess(object: CypherExpr, property: string): PropertyAccessExpr;
|
|
160
|
+
export declare function createParameter(name: string): ParameterExpr;
|
|
161
|
+
export declare function createBinaryOp(op: string, left: CypherExpr, right: CypherExpr): BinaryOpExpr;
|
|
162
|
+
export declare function createUnaryOp(op: string, operand: CypherExpr): UnaryOpExpr;
|
|
163
|
+
export declare function createFunctionCall(name: string, args: CypherExpr[]): FunctionCallExpr;
|
|
164
|
+
export declare function createNodePattern(variable: string | null, labels?: string[], properties?: Map<string, CypherExpr>): NodePattern;
|
|
165
|
+
export declare function createRelationshipPattern(opts?: Partial<{
|
|
166
|
+
variable: string | null;
|
|
167
|
+
types: string[];
|
|
168
|
+
properties: Map<string, CypherExpr>;
|
|
169
|
+
direction: "out" | "in" | "both";
|
|
170
|
+
minHops: number | null;
|
|
171
|
+
maxHops: number | null;
|
|
172
|
+
}>): RelationshipPattern;
|
|
173
|
+
export declare function createPathPattern(elements: Array<NodePattern | RelationshipPattern>): PathPattern;
|
|
174
|
+
export declare function createCypherQuery(clauses: CypherClause[]): CypherQuery;
|
|
175
|
+
//# sourceMappingURL=ast.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ast.d.ts","sourceRoot":"","sources":["../../../../../src/graph/cypher/ast.ts"],"names":[],"mappings":"AAcA,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,Q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aAAa,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,GAAG,WAAW,CAE1E;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,gBAAgB,CAErF;AAED,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,MAAM,GAAG,IAAI,EACvB,MAAM,CAAC,EAAE,MAAM,EAAE,EACjB,UAAU,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,GACnC,WAAW,CAMb;AAED,wBAAgB,yBAAyB,CACvC,IAAI,CAAC,EAAE,OAAO,CAAC;IACb,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACpC,SAAS,EAAE,KAAK,GAAG,IAAI,GAAG,MAAM,CAAC;IACjC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB,CAAC,GACD,mBAAmB,CASrB;AAED,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,KAAK,CAAC,WAAW,GAAG,mBAAmB,CAAC,GACjD,WAAW,CAEb;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,WAAW,CAEtE"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { PostingList } from "../../core/posting-list.js";
|
|
2
|
+
import { GraphPostingList } from "../posting-list.js";
|
|
3
|
+
import type { GraphStore } from "../../storage/abc/graph-store.js";
|
|
4
|
+
import type { CypherQuery } from "./ast.js";
|
|
5
|
+
export declare class CypherCompiler {
|
|
6
|
+
private readonly _graph;
|
|
7
|
+
private readonly _graphName;
|
|
8
|
+
private readonly _params;
|
|
9
|
+
private _nextDocId;
|
|
10
|
+
constructor(graph: GraphStore, graphName: string, params?: Record<string, unknown>);
|
|
11
|
+
get store(): GraphStore;
|
|
12
|
+
get graphName(): string;
|
|
13
|
+
execute(query: string, params?: Record<string, unknown>): PostingList;
|
|
14
|
+
executePostingList(query: string, params?: Record<string, unknown>): GraphPostingList;
|
|
15
|
+
executeAST(ast: CypherQuery, params?: Record<string, unknown>): PostingList;
|
|
16
|
+
executeASTPostingList(ast: CypherQuery, params?: Record<string, unknown>): GraphPostingList;
|
|
17
|
+
executeRows(query: string, params?: Record<string, unknown>): Array<Record<string, unknown>>;
|
|
18
|
+
executeASTRows(ast: CypherQuery, params?: Record<string, unknown>): Array<Record<string, unknown>>;
|
|
19
|
+
private _emptyBinding;
|
|
20
|
+
private _allocDocId;
|
|
21
|
+
private _makeBindingEntry;
|
|
22
|
+
private _execMatch;
|
|
23
|
+
private _matchPatterns;
|
|
24
|
+
private _matchPath;
|
|
25
|
+
private _assignAnonVars;
|
|
26
|
+
private _nodeCandidates;
|
|
27
|
+
private _vertexMatches;
|
|
28
|
+
private _expandRel;
|
|
29
|
+
private _expandSingleHop;
|
|
30
|
+
private _expandVarLength;
|
|
31
|
+
private _getEdges;
|
|
32
|
+
private _edgeMatches;
|
|
33
|
+
private _execCreate;
|
|
34
|
+
private _createPath;
|
|
35
|
+
private _createVertex;
|
|
36
|
+
private _createEdge;
|
|
37
|
+
private _execMerge;
|
|
38
|
+
private _execSet;
|
|
39
|
+
private _applySetItem;
|
|
40
|
+
private _execDelete;
|
|
41
|
+
private _execReturnPostingList;
|
|
42
|
+
private _execReturnWithAggregation;
|
|
43
|
+
private _evalAggregate;
|
|
44
|
+
private _execWith;
|
|
45
|
+
private _execWithAggregation;
|
|
46
|
+
private _execUnwind;
|
|
47
|
+
private _toAgtype;
|
|
48
|
+
private _distinctGpl;
|
|
49
|
+
private _orderByGpl;
|
|
50
|
+
private _sliceGpl;
|
|
51
|
+
private _eval;
|
|
52
|
+
private _evalPropertyAccess;
|
|
53
|
+
private _evalBinary;
|
|
54
|
+
private _evalUnary;
|
|
55
|
+
private _evalFunction;
|
|
56
|
+
private _evalIn;
|
|
57
|
+
private _evalIsNull;
|
|
58
|
+
private _evalCase;
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=compiler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compiler.d.ts","sourceRoot":"","sources":["../../../../../src/graph/cypher/compiler.ts"],"names":[],"mappings":"AAsCA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAsB,MAAM,oBAAoB,CAAC;AAE1E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,KAAK,EACV,WAAW,EAsBZ,MAAM,UAAU,CAAC;AA4ClB,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAa;IACpC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;IACpC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA0B;IAClD,OAAO,CAAC,UAAU,CAAS;gBAEf,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAOlF,IAAI,KAAK,IAAI,UAAU,CAEtB;IAED,IAAI,SAAS,IAAI,MAAM,CAEtB;IAID,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,WAAW;IAKrE,kBAAkB,CAChB,KAAK,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/B,gBAAgB;IAKnB,UAAU,CAAC,GAAG,EAAE,WAAW,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,WAAW;IAK3E,qBAAqB,CACnB,GAAG,EAAE,WAAW,EAChB,MAAM,CAAC,EAA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