@_linked/core 2.12.0 → 2.13.0-next.20260706164859
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/CHANGELOG.md +6 -0
- package/lib/esm/queries/IRPipeline.d.ts +7 -1
- package/lib/esm/queries/IRPipeline.js +20 -6
- package/lib/esm/queries/IRPipeline.js.map +1 -1
- package/lib/esm/queries/queryDispatch.js +12 -2
- package/lib/esm/queries/queryDispatch.js.map +1 -1
- package/package.json +10 -13
- package/lib/cjs/collections/CoreSet.d.ts +0 -47
- package/lib/cjs/collections/CoreSet.js +0 -136
- package/lib/cjs/collections/CoreSet.js.map +0 -1
- package/lib/cjs/collections/ShapeSet.d.ts +0 -6
- package/lib/cjs/collections/ShapeSet.js +0 -20
- package/lib/cjs/collections/ShapeSet.js.map +0 -1
- package/lib/cjs/expressions/Expr.d.ts +0 -29
- package/lib/cjs/expressions/Expr.js +0 -80
- package/lib/cjs/expressions/Expr.js.map +0 -1
- package/lib/cjs/expressions/ExpressionMethods.d.ts +0 -85
- package/lib/cjs/expressions/ExpressionMethods.js +0 -3
- package/lib/cjs/expressions/ExpressionMethods.js.map +0 -1
- package/lib/cjs/expressions/ExpressionNode.d.ts +0 -144
- package/lib/cjs/expressions/ExpressionNode.js +0 -432
- package/lib/cjs/expressions/ExpressionNode.js.map +0 -1
- package/lib/cjs/index.d.ts +0 -29
- package/lib/cjs/index.js +0 -65
- package/lib/cjs/index.js.map +0 -1
- package/lib/cjs/interfaces/ICoreIterable.d.ts +0 -14
- package/lib/cjs/interfaces/ICoreIterable.js +0 -3
- package/lib/cjs/interfaces/ICoreIterable.js.map +0 -1
- package/lib/cjs/interfaces/IDataset.d.ts +0 -26
- package/lib/cjs/interfaces/IDataset.js +0 -3
- package/lib/cjs/interfaces/IDataset.js.map +0 -1
- package/lib/cjs/interfaces/IFileStore.d.ts +0 -16
- package/lib/cjs/interfaces/IFileStore.js +0 -3
- package/lib/cjs/interfaces/IFileStore.js.map +0 -1
- package/lib/cjs/ontologies/linked-core.d.ts +0 -15
- package/lib/cjs/ontologies/linked-core.js +0 -38
- package/lib/cjs/ontologies/linked-core.js.map +0 -1
- package/lib/cjs/ontologies/npm.d.ts +0 -6
- package/lib/cjs/ontologies/npm.js +0 -15
- package/lib/cjs/ontologies/npm.js.map +0 -1
- package/lib/cjs/ontologies/owl.d.ts +0 -14
- package/lib/cjs/ontologies/owl.js +0 -21
- package/lib/cjs/ontologies/owl.js.map +0 -1
- package/lib/cjs/ontologies/rdf.d.ts +0 -13
- package/lib/cjs/ontologies/rdf.js +0 -27
- package/lib/cjs/ontologies/rdf.js.map +0 -1
- package/lib/cjs/ontologies/rdfs.d.ts +0 -16
- package/lib/cjs/ontologies/rdfs.js +0 -33
- package/lib/cjs/ontologies/rdfs.js.map +0 -1
- package/lib/cjs/ontologies/shacl.d.ts +0 -103
- package/lib/cjs/ontologies/shacl.js +0 -152
- package/lib/cjs/ontologies/shacl.js.map +0 -1
- package/lib/cjs/ontologies/xsd.d.ts +0 -19
- package/lib/cjs/ontologies/xsd.js +0 -41
- package/lib/cjs/ontologies/xsd.js.map +0 -1
- package/lib/cjs/package.d.ts +0 -4
- package/lib/cjs/package.js +0 -6
- package/lib/cjs/package.js.map +0 -1
- package/lib/cjs/package.json +0 -9
- package/lib/cjs/paths/PropertyPathExpr.d.ts +0 -38
- package/lib/cjs/paths/PropertyPathExpr.js +0 -221
- package/lib/cjs/paths/PropertyPathExpr.js.map +0 -1
- package/lib/cjs/paths/normalizePropertyPath.d.ts +0 -23
- package/lib/cjs/paths/normalizePropertyPath.js +0 -75
- package/lib/cjs/paths/normalizePropertyPath.js.map +0 -1
- package/lib/cjs/paths/pathExprToSparql.d.ts +0 -14
- package/lib/cjs/paths/pathExprToSparql.js +0 -136
- package/lib/cjs/paths/pathExprToSparql.js.map +0 -1
- package/lib/cjs/queries/ContextRef.d.ts +0 -32
- package/lib/cjs/queries/ContextRef.js +0 -69
- package/lib/cjs/queries/ContextRef.js.map +0 -1
- package/lib/cjs/queries/CreateBuilder.d.ts +0 -59
- package/lib/cjs/queries/CreateBuilder.js +0 -138
- package/lib/cjs/queries/CreateBuilder.js.map +0 -1
- package/lib/cjs/queries/CreateQuery.d.ts +0 -20
- package/lib/cjs/queries/CreateQuery.js +0 -3
- package/lib/cjs/queries/CreateQuery.js.map +0 -1
- package/lib/cjs/queries/DeleteBuilder.d.ts +0 -56
- package/lib/cjs/queries/DeleteBuilder.js +0 -172
- package/lib/cjs/queries/DeleteBuilder.js.map +0 -1
- package/lib/cjs/queries/DeleteQuery.d.ts +0 -37
- package/lib/cjs/queries/DeleteQuery.js +0 -3
- package/lib/cjs/queries/DeleteQuery.js.map +0 -1
- package/lib/cjs/queries/DslJsonExpression.d.ts +0 -68
- package/lib/cjs/queries/DslJsonExpression.js +0 -427
- package/lib/cjs/queries/DslJsonExpression.js.map +0 -1
- package/lib/cjs/queries/FieldSet.d.ts +0 -310
- package/lib/cjs/queries/FieldSet.js +0 -802
- package/lib/cjs/queries/FieldSet.js.map +0 -1
- package/lib/cjs/queries/IRAliasScope.d.ts +0 -20
- package/lib/cjs/queries/IRAliasScope.js +0 -52
- package/lib/cjs/queries/IRAliasScope.js.map +0 -1
- package/lib/cjs/queries/IRCanonicalize.d.ts +0 -19
- package/lib/cjs/queries/IRCanonicalize.js +0 -19
- package/lib/cjs/queries/IRCanonicalize.js.map +0 -1
- package/lib/cjs/queries/IRDesugar.d.ts +0 -123
- package/lib/cjs/queries/IRDesugar.js +0 -261
- package/lib/cjs/queries/IRDesugar.js.map +0 -1
- package/lib/cjs/queries/IRLower.d.ts +0 -25
- package/lib/cjs/queries/IRLower.js +0 -398
- package/lib/cjs/queries/IRLower.js.map +0 -1
- package/lib/cjs/queries/IRMutation.d.ts +0 -53
- package/lib/cjs/queries/IRMutation.js +0 -130
- package/lib/cjs/queries/IRMutation.js.map +0 -1
- package/lib/cjs/queries/IRPipeline.d.ts +0 -8
- package/lib/cjs/queries/IRPipeline.js +0 -25
- package/lib/cjs/queries/IRPipeline.js.map +0 -1
- package/lib/cjs/queries/IRProjection.d.ts +0 -39
- package/lib/cjs/queries/IRProjection.js +0 -105
- package/lib/cjs/queries/IRProjection.js.map +0 -1
- package/lib/cjs/queries/IntermediateRepresentation.d.ts +0 -282
- package/lib/cjs/queries/IntermediateRepresentation.js +0 -3
- package/lib/cjs/queries/IntermediateRepresentation.js.map +0 -1
- package/lib/cjs/queries/MutationQuery.d.ts +0 -50
- package/lib/cjs/queries/MutationQuery.js +0 -334
- package/lib/cjs/queries/MutationQuery.js.map +0 -1
- package/lib/cjs/queries/MutationSerialization.d.ts +0 -102
- package/lib/cjs/queries/MutationSerialization.js +0 -207
- package/lib/cjs/queries/MutationSerialization.js.map +0 -1
- package/lib/cjs/queries/MutationThenable.d.ts +0 -18
- package/lib/cjs/queries/MutationThenable.js +0 -32
- package/lib/cjs/queries/MutationThenable.js.map +0 -1
- package/lib/cjs/queries/PropertyPath.d.ts +0 -38
- package/lib/cjs/queries/PropertyPath.js +0 -82
- package/lib/cjs/queries/PropertyPath.js.map +0 -1
- package/lib/cjs/queries/ProxiedPathBuilder.d.ts +0 -14
- package/lib/cjs/queries/ProxiedPathBuilder.js +0 -29
- package/lib/cjs/queries/ProxiedPathBuilder.js.map +0 -1
- package/lib/cjs/queries/QueryBuilder.d.ts +0 -193
- package/lib/cjs/queries/QueryBuilder.js +0 -519
- package/lib/cjs/queries/QueryBuilder.js.map +0 -1
- package/lib/cjs/queries/QueryBuilderSerialization.d.ts +0 -31
- package/lib/cjs/queries/QueryBuilderSerialization.js +0 -68
- package/lib/cjs/queries/QueryBuilderSerialization.js.map +0 -1
- package/lib/cjs/queries/QueryContext.d.ts +0 -50
- package/lib/cjs/queries/QueryContext.js +0 -147
- package/lib/cjs/queries/QueryContext.js.map +0 -1
- package/lib/cjs/queries/QueryFactory.d.ts +0 -80
- package/lib/cjs/queries/QueryFactory.js +0 -21
- package/lib/cjs/queries/QueryFactory.js.map +0 -1
- package/lib/cjs/queries/SelectQuery.d.ts +0 -302
- package/lib/cjs/queries/SelectQuery.js +0 -761
- package/lib/cjs/queries/SelectQuery.js.map +0 -1
- package/lib/cjs/queries/UpdateBuilder.d.ts +0 -69
- package/lib/cjs/queries/UpdateBuilder.js +0 -199
- package/lib/cjs/queries/UpdateBuilder.js.map +0 -1
- package/lib/cjs/queries/UpdateQuery.d.ts +0 -18
- package/lib/cjs/queries/UpdateQuery.js +0 -3
- package/lib/cjs/queries/UpdateQuery.js.map +0 -1
- package/lib/cjs/queries/fromJSON.d.ts +0 -16
- package/lib/cjs/queries/fromJSON.js +0 -41
- package/lib/cjs/queries/fromJSON.js.map +0 -1
- package/lib/cjs/queries/lower.d.ts +0 -28
- package/lib/cjs/queries/lower.js +0 -114
- package/lib/cjs/queries/lower.js.map +0 -1
- package/lib/cjs/queries/lowerMutationJSON.d.ts +0 -25
- package/lib/cjs/queries/lowerMutationJSON.js +0 -173
- package/lib/cjs/queries/lowerMutationJSON.js.map +0 -1
- package/lib/cjs/queries/mutationLowerSpec.d.ts +0 -32
- package/lib/cjs/queries/mutationLowerSpec.js +0 -8
- package/lib/cjs/queries/mutationLowerSpec.js.map +0 -1
- package/lib/cjs/queries/queryDispatch.d.ts +0 -33
- package/lib/cjs/queries/queryDispatch.js +0 -33
- package/lib/cjs/queries/queryDispatch.js.map +0 -1
- package/lib/cjs/queries/resolveShape.d.ts +0 -10
- package/lib/cjs/queries/resolveShape.js +0 -23
- package/lib/cjs/queries/resolveShape.js.map +0 -1
- package/lib/cjs/queries/wireVersion.d.ts +0 -7
- package/lib/cjs/queries/wireVersion.js +0 -25
- package/lib/cjs/queries/wireVersion.js.map +0 -1
- package/lib/cjs/shapes/List.d.ts +0 -35
- package/lib/cjs/shapes/List.js +0 -72
- package/lib/cjs/shapes/List.js.map +0 -1
- package/lib/cjs/shapes/PathNode.d.ts +0 -20
- package/lib/cjs/shapes/PathNode.js +0 -68
- package/lib/cjs/shapes/PathNode.js.map +0 -1
- package/lib/cjs/shapes/SHACL.d.ts +0 -300
- package/lib/cjs/shapes/SHACL.js +0 -612
- package/lib/cjs/shapes/SHACL.js.map +0 -1
- package/lib/cjs/shapes/Shape.d.ts +0 -74
- package/lib/cjs/shapes/Shape.js +0 -124
- package/lib/cjs/shapes/Shape.js.map +0 -1
- package/lib/cjs/shapes/serializePathToNodeData.d.ts +0 -24
- package/lib/cjs/shapes/serializePathToNodeData.js +0 -67
- package/lib/cjs/shapes/serializePathToNodeData.js.map +0 -1
- package/lib/cjs/shapes/syncShapes.d.ts +0 -38
- package/lib/cjs/shapes/syncShapes.js +0 -214
- package/lib/cjs/shapes/syncShapes.js.map +0 -1
- package/lib/cjs/sparql/SparqlAlgebra.d.ts +0 -190
- package/lib/cjs/sparql/SparqlAlgebra.js +0 -4
- package/lib/cjs/sparql/SparqlAlgebra.js.map +0 -1
- package/lib/cjs/sparql/SparqlDataset.d.ts +0 -60
- package/lib/cjs/sparql/SparqlDataset.js +0 -117
- package/lib/cjs/sparql/SparqlDataset.js.map +0 -1
- package/lib/cjs/sparql/algebraToString.d.ts +0 -13
- package/lib/cjs/sparql/algebraToString.js +0 -385
- package/lib/cjs/sparql/algebraToString.js.map +0 -1
- package/lib/cjs/sparql/index.d.ts +0 -9
- package/lib/cjs/sparql/index.js +0 -41
- package/lib/cjs/sparql/index.js.map +0 -1
- package/lib/cjs/sparql/irToAlgebra.d.ts +0 -79
- package/lib/cjs/sparql/irToAlgebra.js +0 -2042
- package/lib/cjs/sparql/irToAlgebra.js.map +0 -1
- package/lib/cjs/sparql/resultMapping.d.ts +0 -36
- package/lib/cjs/sparql/resultMapping.js +0 -563
- package/lib/cjs/sparql/resultMapping.js.map +0 -1
- package/lib/cjs/sparql/sparqlUtils.d.ts +0 -53
- package/lib/cjs/sparql/sparqlUtils.js +0 -154
- package/lib/cjs/sparql/sparqlUtils.js.map +0 -1
- package/lib/cjs/utils/LinkedErrorLogging.d.ts +0 -13
- package/lib/cjs/utils/LinkedErrorLogging.js +0 -22
- package/lib/cjs/utils/LinkedErrorLogging.js.map +0 -1
- package/lib/cjs/utils/LinkedFileStorage.d.ts +0 -23
- package/lib/cjs/utils/LinkedFileStorage.js +0 -62
- package/lib/cjs/utils/LinkedFileStorage.js.map +0 -1
- package/lib/cjs/utils/LinkedStorage.d.ts +0 -40
- package/lib/cjs/utils/LinkedStorage.js +0 -148
- package/lib/cjs/utils/LinkedStorage.js.map +0 -1
- package/lib/cjs/utils/NameSpace.d.ts +0 -2
- package/lib/cjs/utils/NameSpace.js +0 -8
- package/lib/cjs/utils/NameSpace.js.map +0 -1
- package/lib/cjs/utils/NodeReference.d.ts +0 -30
- package/lib/cjs/utils/NodeReference.js +0 -54
- package/lib/cjs/utils/NodeReference.js.map +0 -1
- package/lib/cjs/utils/Package.d.ts +0 -153
- package/lib/cjs/utils/Package.js +0 -419
- package/lib/cjs/utils/Package.js.map +0 -1
- package/lib/cjs/utils/Prefix.d.ts +0 -22
- package/lib/cjs/utils/Prefix.js +0 -104
- package/lib/cjs/utils/Prefix.js.map +0 -1
- package/lib/cjs/utils/ShapeClass.d.ts +0 -30
- package/lib/cjs/utils/ShapeClass.js +0 -180
- package/lib/cjs/utils/ShapeClass.js.map +0 -1
- package/lib/cjs/utils/URI.d.ts +0 -18
- package/lib/cjs/utils/URI.js +0 -42
- package/lib/cjs/utils/URI.js.map +0 -1
- package/lib/cjs/utils/cached.d.ts +0 -14
- package/lib/cjs/utils/cached.js +0 -71
- package/lib/cjs/utils/cached.js.map +0 -1
- package/lib/cjs/utils/loadStores.d.ts +0 -34
- package/lib/cjs/utils/loadStores.js +0 -105
- package/lib/cjs/utils/loadStores.js.map +0 -1
- package/lib/cjs/utils/parseDatasetsConfig.d.ts +0 -49
- package/lib/cjs/utils/parseDatasetsConfig.js +0 -110
- package/lib/cjs/utils/parseDatasetsConfig.js.map +0 -1
- package/lib/esm/package.json +0 -9
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MutationSerialization.js","sour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AW,CAAC,0CAAE,KAAK,mCAAI,KAAK;QAC/D,CAAC,CAAC,KAAK,CAAC;IACZ,MAAM,GAAG,GAA4B,EAAE,CAAC;IACxC,IAAI,OAAO,IAAI,CAAC,WAAW,CAAC,KAAK,QAAQ;QAAE,GAAG,CAAC,EAAE,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC;IACtE,KAAK,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;QAC9C,IAAI,GAAG,KAAK,WAAW,IAAI,GAAG,KAAK,cAAc,IAAI,GAAG,KAAK,SAAS;YAAE,SAAS;QACjF,+DAA+D;QAC/D,IAAI,GAAG,KAAK,WAAW,IAAI,GAAG,KAAK,aAAa,IAAI,GAAG,KAAK,WAAW;YAAE,SAAS;QAClF,MAAM,IAAI,GAAG,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,gBAAgB,CAAC,GAAG,CAAC,CAAC;QAC9C,GAAG,CAAC,GAAG,CAAC,GAAG,gBAAgB,CAAC,GAAwB,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC;IACzE,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared thenable base for the mutation builders (Create/Update/Delete).
|
|
3
|
-
*
|
|
4
|
-
* Each builder is a lazy, `await`-able handle: it implements the full
|
|
5
|
-
* `Promise<R>` surface by delegating to its own `exec()`, so `await builder`
|
|
6
|
-
* runs the mutation. This base holds the identical `then`/`catch`/`finally`/
|
|
7
|
-
* `Symbol.toStringTag` wiring; subclasses provide only `exec()` and a `_tag`.
|
|
8
|
-
*/
|
|
9
|
-
export declare abstract class MutationThenable<R> implements PromiseLike<R>, Promise<R> {
|
|
10
|
-
/** Execute the mutation. Subclasses implement the dispatch. */
|
|
11
|
-
abstract exec(): Promise<R>;
|
|
12
|
-
/** Class name reported by `Symbol.toStringTag` (stable under minification). */
|
|
13
|
-
protected abstract readonly _tag: string;
|
|
14
|
-
then<TResult1 = R, TResult2 = never>(onfulfilled?: ((value: R) => TResult1 | PromiseLike<TResult1>) | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null): Promise<TResult1 | TResult2>;
|
|
15
|
-
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null): Promise<R | TResult>;
|
|
16
|
-
finally(onfinally?: (() => void) | null): Promise<R>;
|
|
17
|
-
get [Symbol.toStringTag](): string;
|
|
18
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
4
|
-
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
|
-
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
6
|
-
*/
|
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.MutationThenable = void 0;
|
|
9
|
-
/**
|
|
10
|
-
* Shared thenable base for the mutation builders (Create/Update/Delete).
|
|
11
|
-
*
|
|
12
|
-
* Each builder is a lazy, `await`-able handle: it implements the full
|
|
13
|
-
* `Promise<R>` surface by delegating to its own `exec()`, so `await builder`
|
|
14
|
-
* runs the mutation. This base holds the identical `then`/`catch`/`finally`/
|
|
15
|
-
* `Symbol.toStringTag` wiring; subclasses provide only `exec()` and a `_tag`.
|
|
16
|
-
*/
|
|
17
|
-
class MutationThenable {
|
|
18
|
-
then(onfulfilled, onrejected) {
|
|
19
|
-
return this.exec().then(onfulfilled, onrejected);
|
|
20
|
-
}
|
|
21
|
-
catch(onrejected) {
|
|
22
|
-
return this.then().catch(onrejected);
|
|
23
|
-
}
|
|
24
|
-
finally(onfinally) {
|
|
25
|
-
return this.then().finally(onfinally);
|
|
26
|
-
}
|
|
27
|
-
get [Symbol.toStringTag]() {
|
|
28
|
-
return this._tag;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
exports.MutationThenable = MutationThenable;
|
|
32
|
-
//# sourceMappingURL=MutationThenable.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MutationThenable.js","sourceRoot":"","sources":["../../../src/queries/MutationThenable.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH;;;;;;;GAOG;AACH,MAAsB,gBAAgB;IAOpC,IAAI,CACF,WAAqE,EACrE,UAAuE;QAEvE,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;IACnD,CAAC;IAED,KAAK,CACH,UAAqE;QAErE,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IACvC,CAAC;IAED,OAAO,CAAC,SAA+B;QACrC,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACxC,CAAC;IAED,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC;QACtB,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;CACF;AA3BD,4CA2BC"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import type { PropertyShape, NodeShape } from '../shapes/SHACL.js';
|
|
2
|
-
/**
|
|
3
|
-
* A value object representing a sequence of property traversals from a root shape.
|
|
4
|
-
*
|
|
5
|
-
* Each segment is a PropertyShape representing one hop in the traversal.
|
|
6
|
-
* For example, `friends.name` on PersonShape produces a PropertyPath with
|
|
7
|
-
* two segments: [friendsPropertyShape, namePropertyShape].
|
|
8
|
-
*
|
|
9
|
-
* This is used by FieldSet and QueryBuilder to describe which properties
|
|
10
|
-
* to select/filter, independent of proxy tracing.
|
|
11
|
-
*/
|
|
12
|
-
export declare class PropertyPath {
|
|
13
|
-
readonly rootShape: NodeShape;
|
|
14
|
-
readonly segments: readonly PropertyShape[];
|
|
15
|
-
constructor(rootShape: NodeShape, segments: readonly PropertyShape[]);
|
|
16
|
-
/** Append a property traversal hop, returning a new PropertyPath. */
|
|
17
|
-
prop(property: PropertyShape): PropertyPath;
|
|
18
|
-
/** The terminal (leaf) property of this path. */
|
|
19
|
-
get terminal(): PropertyShape | undefined;
|
|
20
|
-
/** The depth (number of hops) of this path. */
|
|
21
|
-
get depth(): number;
|
|
22
|
-
/** String representation using property labels joined by dots. */
|
|
23
|
-
toString(): string;
|
|
24
|
-
/** Two PropertyPaths are equal if they have the same root shape and same segment sequence. */
|
|
25
|
-
equals(other: PropertyPath): boolean;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Resolve a dot-separated property path string into a PropertyPath.
|
|
29
|
-
*
|
|
30
|
-
* Walks the shape's property shapes by label, following valueShape references
|
|
31
|
-
* to traverse into nested shapes.
|
|
32
|
-
*
|
|
33
|
-
* Example: `walkPropertyPath(PersonShape, 'friends.name')` resolves
|
|
34
|
-
* [friendsPropertyShape, namePropertyShape].
|
|
35
|
-
*
|
|
36
|
-
* @throws If any segment cannot be resolved.
|
|
37
|
-
*/
|
|
38
|
-
export declare function walkPropertyPath(shape: NodeShape, path: string): PropertyPath;
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PropertyPath = void 0;
|
|
4
|
-
exports.walkPropertyPath = walkPropertyPath;
|
|
5
|
-
const ShapeClass_js_1 = require("../utils/ShapeClass.js");
|
|
6
|
-
/**
|
|
7
|
-
* A value object representing a sequence of property traversals from a root shape.
|
|
8
|
-
*
|
|
9
|
-
* Each segment is a PropertyShape representing one hop in the traversal.
|
|
10
|
-
* For example, `friends.name` on PersonShape produces a PropertyPath with
|
|
11
|
-
* two segments: [friendsPropertyShape, namePropertyShape].
|
|
12
|
-
*
|
|
13
|
-
* This is used by FieldSet and QueryBuilder to describe which properties
|
|
14
|
-
* to select/filter, independent of proxy tracing.
|
|
15
|
-
*/
|
|
16
|
-
class PropertyPath {
|
|
17
|
-
constructor(rootShape, segments) {
|
|
18
|
-
this.rootShape = rootShape;
|
|
19
|
-
this.segments = segments;
|
|
20
|
-
}
|
|
21
|
-
/** Append a property traversal hop, returning a new PropertyPath. */
|
|
22
|
-
prop(property) {
|
|
23
|
-
return new PropertyPath(this.rootShape, [...this.segments, property]);
|
|
24
|
-
}
|
|
25
|
-
/** The terminal (leaf) property of this path. */
|
|
26
|
-
get terminal() {
|
|
27
|
-
return this.segments[this.segments.length - 1];
|
|
28
|
-
}
|
|
29
|
-
/** The depth (number of hops) of this path. */
|
|
30
|
-
get depth() {
|
|
31
|
-
return this.segments.length;
|
|
32
|
-
}
|
|
33
|
-
/** String representation using property labels joined by dots. */
|
|
34
|
-
toString() {
|
|
35
|
-
return this.segments.map((s) => s.label).join('.');
|
|
36
|
-
}
|
|
37
|
-
/** Two PropertyPaths are equal if they have the same root shape and same segment sequence. */
|
|
38
|
-
equals(other) {
|
|
39
|
-
if (this.rootShape.id !== other.rootShape.id)
|
|
40
|
-
return false;
|
|
41
|
-
if (this.segments.length !== other.segments.length)
|
|
42
|
-
return false;
|
|
43
|
-
return this.segments.every((s, i) => s.id === other.segments[i].id);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
exports.PropertyPath = PropertyPath;
|
|
47
|
-
/**
|
|
48
|
-
* Resolve a dot-separated property path string into a PropertyPath.
|
|
49
|
-
*
|
|
50
|
-
* Walks the shape's property shapes by label, following valueShape references
|
|
51
|
-
* to traverse into nested shapes.
|
|
52
|
-
*
|
|
53
|
-
* Example: `walkPropertyPath(PersonShape, 'friends.name')` resolves
|
|
54
|
-
* [friendsPropertyShape, namePropertyShape].
|
|
55
|
-
*
|
|
56
|
-
* @throws If any segment cannot be resolved.
|
|
57
|
-
*/
|
|
58
|
-
function walkPropertyPath(shape, path) {
|
|
59
|
-
const labels = path.split('.');
|
|
60
|
-
const segments = [];
|
|
61
|
-
let currentShape = shape;
|
|
62
|
-
for (const label of labels) {
|
|
63
|
-
const propertyShape = currentShape.getPropertyShape(label);
|
|
64
|
-
if (!propertyShape) {
|
|
65
|
-
throw new Error(`Property '${label}' not found on shape '${currentShape.label || currentShape.id}' while resolving path '${path}'`);
|
|
66
|
-
}
|
|
67
|
-
segments.push(propertyShape);
|
|
68
|
-
// If there are more segments to resolve, follow the valueShape
|
|
69
|
-
if (segments.length < labels.length) {
|
|
70
|
-
if (!propertyShape.valueShape) {
|
|
71
|
-
throw new Error(`Property '${label}' on shape '${currentShape.label || currentShape.id}' has no valueShape; cannot traverse further in path '${path}'`);
|
|
72
|
-
}
|
|
73
|
-
const shapeClass = (0, ShapeClass_js_1.getShapeClass)(propertyShape.valueShape);
|
|
74
|
-
if (!shapeClass || !shapeClass.shape) {
|
|
75
|
-
throw new Error(`Cannot resolve valueShape '${propertyShape.valueShape.id}' for property '${label}' in path '${path}'`);
|
|
76
|
-
}
|
|
77
|
-
currentShape = shapeClass.shape;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
return new PropertyPath(shape, segments);
|
|
81
|
-
}
|
|
82
|
-
//# sourceMappingURL=PropertyPath.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PropertyPath.js","sourceRoot":"","sources":["../../../src/queries/PropertyPath.ts"],"names":[],"mappings":";;;AA0DA,4CAgCC;AAzFD,0DAAqD;AAErD;;;;;;;;;GASG;AACH,MAAa,YAAY;IACvB,YACW,SAAoB,EACpB,QAAkC;QADlC,cAAS,GAAT,SAAS,CAAW;QACpB,aAAQ,GAAR,QAAQ,CAA0B;IAC1C,CAAC;IAEJ,qEAAqE;IACrE,IAAI,CAAC,QAAuB;QAC1B,OAAO,IAAI,YAAY,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,GAAG,IAAI,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC;IACxE,CAAC;IAED,iDAAiD;IACjD,IAAI,QAAQ;QACV,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,Q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C,EAAE,2BAA2B,IAAI,GAAG,CACnH,CAAC;QACJ,CAAC;QACD,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAE7B,+DAA+D;QAC/D,IAAI,QAAQ,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC;YACpC,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE,CAAC;gBAC9B,MAAM,IAAI,KAAK,CACb,aAAa,KAAK,eAAe,YAAY,CAAC,KAAK,IAAI,YAAY,CAAC,EAAE,yDAAyD,IAAI,GAAG,CACvI,CAAC;YACJ,CAAC;YACD,MAAM,UAAU,GAAG,IAAA,6BAAa,EAAC,aAAa,CAAC,UAAU,CAAC,CAAC;YAC3D,IAAI,CAAC,UAAU,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;gBACrC,MAAM,IAAI,KAAK,CACb,8BAA8B,aAAa,CAAC,UAAU,CAAC,EAAE,mBAAmB,KAAK,cAAc,IAAI,GAAG,CACvG,CAAC;YACJ,CAAC;YACD,YAAY,GAAG,UAAU,CAAC,KAAK,CAAC;QAClC,CAAC;IACH,CAAC;IAED,OAAO,IAAI,YAAY,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;AAC3C,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Shape, type ShapeConstructor } from '../shapes/Shape.js';
|
|
2
|
-
import { QueryBuilderObject } from './SelectQuery.js';
|
|
3
|
-
/**
|
|
4
|
-
* Creates the proxy object used as the `p` parameter in query callbacks.
|
|
5
|
-
*
|
|
6
|
-
* Property access on the returned proxy (e.g., `p.name`, `p.friends.name`)
|
|
7
|
-
* creates QueryBuilderObject chains that trace the path of requested properties.
|
|
8
|
-
* This is the shared foundation for both the DSL (`Person.select(p => p.name)`)
|
|
9
|
-
* and the future QueryBuilder API.
|
|
10
|
-
*
|
|
11
|
-
* Originally extracted from SelectQueryFactory.getQueryShape() to enable reuse
|
|
12
|
-
* across the DSL and dynamic query building.
|
|
13
|
-
*/
|
|
14
|
-
export declare function createProxiedPathBuilder<S extends Shape>(shape: ShapeConstructor<S> | QueryBuilderObject): QueryBuilderObject;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createProxiedPathBuilder = createProxiedPathBuilder;
|
|
4
|
-
const SelectQuery_js_1 = require("./SelectQuery.js");
|
|
5
|
-
/**
|
|
6
|
-
* Creates the proxy object used as the `p` parameter in query callbacks.
|
|
7
|
-
*
|
|
8
|
-
* Property access on the returned proxy (e.g., `p.name`, `p.friends.name`)
|
|
9
|
-
* creates QueryBuilderObject chains that trace the path of requested properties.
|
|
10
|
-
* This is the shared foundation for both the DSL (`Person.select(p => p.name)`)
|
|
11
|
-
* and the future QueryBuilder API.
|
|
12
|
-
*
|
|
13
|
-
* Originally extracted from SelectQueryFactory.getQueryShape() to enable reuse
|
|
14
|
-
* across the DSL and dynamic query building.
|
|
15
|
-
*/
|
|
16
|
-
function createProxiedPathBuilder(shape) {
|
|
17
|
-
if (shape instanceof SelectQuery_js_1.QueryBuilderObject) {
|
|
18
|
-
// When a QueryBuilderObject is passed directly (e.g. QueryPrimitives
|
|
19
|
-
// used as the shape for where-clause evaluation), use it as-is.
|
|
20
|
-
return shape;
|
|
21
|
-
}
|
|
22
|
-
// Create a dummy shape instance and wrap it in a QueryShape proxy.
|
|
23
|
-
// The proxy intercepts property access and resolves each property name
|
|
24
|
-
// to its PropertyShape, building a chain of QueryBuilderObjects that
|
|
25
|
-
// records which path was traversed.
|
|
26
|
-
const dummyShape = new shape();
|
|
27
|
-
return SelectQuery_js_1.QueryShape.create(dummyShape);
|
|
28
|
-
}
|
|
29
|
-
//# sourceMappingURL=ProxiedPathBuilder.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ProxiedPathBuilder.js","sourceRoot":"","sources":["../../../src/queries/ProxiedPathBuilder.ts"],"names":[],"mappings":";;AAcA,4DAcC;AA3BD,qDAAgE;AAEhE;;;;;;;;;;GAUG;AACH,SAAgB,wBAAwB,CACtC,KAA+C;IAE/C,IAAI,KAAK,YAAY,mCAAkB,EAAE,CAAC;QACxC,qEAAqE;QACrE,gEAAgE;QAChE,OAAO,KAAK,CAAC;IACf,CAAC;IACD,mEAAmE;IACnE,uEAAuE;IACvE,qEAAqE;IACrE,oCAAoC;IACpC,MAAM,UAAU,GAAG,IAAI,KAAK,EAAE,CAAC;IAC/B,OAAO,2BAAU,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;AACvC,CAAC"}
|
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
import { Shape, type ShapeConstructor } from '../shapes/Shape.js';
|
|
2
|
-
import { type QueryBuildFn, type WhereClause, type QueryResponseToResultType, type SelectAllQueryResponse, type QueryComponentLike } from './SelectQuery.js';
|
|
3
|
-
import type { RawSelectInput } from './IRDesugar.js';
|
|
4
|
-
import type { IDataset } from '../interfaces/IDataset.js';
|
|
5
|
-
import type { NodeShape } from '../shapes/SHACL.js';
|
|
6
|
-
import type { NodeReferenceValue } from './QueryFactory.js';
|
|
7
|
-
import { FieldSet, type FieldSetFieldJSON } from './FieldSet.js';
|
|
8
|
-
import { PendingQueryContext } from './QueryContext.js';
|
|
9
|
-
import { type ContextRefJSON } from './ContextRef.js';
|
|
10
|
-
import { type WherePathJSON, type SortByPathJSON, type RawMinusEntryJSON } from './QueryBuilderSerialization.js';
|
|
11
|
-
/** JSON representation of a SelectBuilder. */
|
|
12
|
-
export type QueryBuilderJSON = {
|
|
13
|
-
/** DSL-JSON wire-format version. */
|
|
14
|
-
v?: string;
|
|
15
|
-
shape: string;
|
|
16
|
-
fields?: FieldSetFieldJSON[];
|
|
17
|
-
limit?: number;
|
|
18
|
-
offset?: number;
|
|
19
|
-
/** A node id, or a `{@ctx: name}` context reference resolved at lowering. */
|
|
20
|
-
subject?: string | ContextRefJSON;
|
|
21
|
-
subjects?: string[];
|
|
22
|
-
/** `.one()` — unwrap a single result. */
|
|
23
|
-
one?: boolean;
|
|
24
|
-
where?: WherePathJSON;
|
|
25
|
-
sortBy?: SortByPathJSON;
|
|
26
|
-
minusEntries?: RawMinusEntryJSON[];
|
|
27
|
-
nullSubject?: boolean;
|
|
28
|
-
};
|
|
29
|
-
/**
|
|
30
|
-
* An immutable, fluent query builder for select queries.
|
|
31
|
-
*
|
|
32
|
-
* Every mutation method (`.select()`, `.where()`, `.limit()`, etc.) returns
|
|
33
|
-
* a **new** SelectBuilder instance — the original is never modified.
|
|
34
|
-
*
|
|
35
|
-
* Implements `PromiseLike` so queries execute on `await`:
|
|
36
|
-
* ```ts
|
|
37
|
-
* const results = await SelectBuilder.from(Person).select(p => p.name);
|
|
38
|
-
* ```
|
|
39
|
-
*
|
|
40
|
-
* Produces a raw select input (`toRawInput()`) that the free `lower()` function
|
|
41
|
-
* turns into IR; the builder itself carries no dependency on the IR pipeline.
|
|
42
|
-
*/
|
|
43
|
-
export declare class SelectBuilder<S extends Shape = Shape, R = any, Result = any> implements PromiseLike<Result>, Promise<Result> {
|
|
44
|
-
private readonly _shape;
|
|
45
|
-
private readonly _selectFn?;
|
|
46
|
-
private readonly _whereFn?;
|
|
47
|
-
private readonly _sortByFn?;
|
|
48
|
-
private readonly _sortDirection?;
|
|
49
|
-
private readonly _limit?;
|
|
50
|
-
private readonly _offset?;
|
|
51
|
-
private readonly _subject?;
|
|
52
|
-
private readonly _subjects?;
|
|
53
|
-
private readonly _singleResult?;
|
|
54
|
-
private readonly _selectAllLabels?;
|
|
55
|
-
private readonly _fieldSet?;
|
|
56
|
-
private readonly _preloads?;
|
|
57
|
-
private readonly _minusEntries?;
|
|
58
|
-
private readonly _nullSubject?;
|
|
59
|
-
private readonly _pendingContextName?;
|
|
60
|
-
private readonly _where?;
|
|
61
|
-
private readonly _sortBy?;
|
|
62
|
-
private readonly _rawMinusEntries?;
|
|
63
|
-
private constructor();
|
|
64
|
-
/** Create a shallow clone with overrides. */
|
|
65
|
-
private clone;
|
|
66
|
-
/**
|
|
67
|
-
* Create a SelectBuilder for the given shape.
|
|
68
|
-
*
|
|
69
|
-
* Accepts a shape class (e.g. `Person`), a NodeShape instance,
|
|
70
|
-
* or a shape IRI string (resolved via the shape registry).
|
|
71
|
-
*/
|
|
72
|
-
static from<S extends Shape>(shape: ShapeConstructor<S> | string): SelectBuilder<S>;
|
|
73
|
-
/** Set the select projection via a callback, labels, or FieldSet. */
|
|
74
|
-
select<NewR>(fn: QueryBuildFn<S, NewR>): SelectBuilder<S, NewR, QueryResponseToResultType<NewR, S>[]>;
|
|
75
|
-
select(labels: string[]): SelectBuilder<S>;
|
|
76
|
-
select<NewR>(fieldSet: FieldSet<NewR>): SelectBuilder<S, NewR, QueryResponseToResultType<NewR, S>[]>;
|
|
77
|
-
/** Select all decorated properties of the shape. */
|
|
78
|
-
selectAll(): SelectBuilder<S, any, QueryResponseToResultType<SelectAllQueryResponse<S>, S>[]>;
|
|
79
|
-
/** Add a where clause. */
|
|
80
|
-
where(fn: WhereClause<S>): SelectBuilder<S, R, Result>;
|
|
81
|
-
/**
|
|
82
|
-
* Exclude results matching a MINUS pattern.
|
|
83
|
-
*
|
|
84
|
-
* Accepts:
|
|
85
|
-
* - A shape constructor to exclude by type: `.minus(Employee)`
|
|
86
|
-
* - A WHERE callback to exclude by condition: `.minus(p => p.hobby.equals('Chess'))`
|
|
87
|
-
* - A callback returning a property or array of properties for existence exclusion:
|
|
88
|
-
* `.minus(p => p.hobby)` or `.minus(p => [p.hobby, p.bestFriend.name])`
|
|
89
|
-
*
|
|
90
|
-
* Chainable: `.minus(A).minus(B)` produces two separate `MINUS { }` blocks.
|
|
91
|
-
*/
|
|
92
|
-
minus(shapeOrFn: ShapeConstructor<any> | WhereClause<S> | ((s: any) => any)): SelectBuilder<S, R, Result>;
|
|
93
|
-
/** Set sort order. */
|
|
94
|
-
orderBy<OR>(fn: QueryBuildFn<S, OR>, direction?: 'ASC' | 'DESC'): SelectBuilder<S, R, Result>;
|
|
95
|
-
/**
|
|
96
|
-
* @deprecated Use `orderBy()` instead.
|
|
97
|
-
*/
|
|
98
|
-
sortBy<OR>(fn: QueryBuildFn<S, OR>, direction?: 'ASC' | 'DESC'): SelectBuilder<S, R, Result>;
|
|
99
|
-
/** Set result limit. */
|
|
100
|
-
limit(n: number): SelectBuilder<S, R, Result>;
|
|
101
|
-
/** Set result offset. */
|
|
102
|
-
offset(n: number): SelectBuilder<S, R, Result>;
|
|
103
|
-
/** Target a single entity by ID. Implies singleResult; unwraps array Result type. */
|
|
104
|
-
for(id: string | NodeReferenceValue | PendingQueryContext | null | undefined): SelectBuilder<S, R, Result extends (infer E)[] ? E : Result>;
|
|
105
|
-
/**
|
|
106
|
-
* Whether the query has a pending (lazy) context that hasn't resolved yet.
|
|
107
|
-
* Returns true when .for() received a PendingQueryContext whose value isn't available yet.
|
|
108
|
-
*/
|
|
109
|
-
hasPendingContext(): boolean;
|
|
110
|
-
/** Target multiple entities by ID, or all if no ids given. */
|
|
111
|
-
forAll(ids?: (string | NodeReferenceValue)[]): SelectBuilder<S, R, Result>;
|
|
112
|
-
/** Limit to one result. Unwraps array Result type to single element. */
|
|
113
|
-
one(): SelectBuilder<S, R, Result extends (infer E)[] ? E : Result>;
|
|
114
|
-
/**
|
|
115
|
-
* Preload a component's query fields at the given property path.
|
|
116
|
-
*
|
|
117
|
-
* This merges the component's query paths into this query's selection,
|
|
118
|
-
* wrapping them in an OPTIONAL block (handled by the IR pipeline).
|
|
119
|
-
*
|
|
120
|
-
* Equivalent to the DSL's `.preloadFor()`:
|
|
121
|
-
* ```ts
|
|
122
|
-
* // DSL style
|
|
123
|
-
* Person.select(p => p.bestFriend.preloadFor(PersonCard))
|
|
124
|
-
* // SelectBuilder style
|
|
125
|
-
* SelectBuilder.from(Person).select(p => [p.name]).preload('bestFriend', PersonCard)
|
|
126
|
-
* ```
|
|
127
|
-
*
|
|
128
|
-
* NOTE: Preloads hold live component references and are not serializable.
|
|
129
|
-
* They are merged into the selection when the field set is evaluated
|
|
130
|
-
* (`_fieldsWithPreloads()`), so changes to preload handling must account for
|
|
131
|
-
* the selectFn wrapping logic.
|
|
132
|
-
*/
|
|
133
|
-
preload<CS extends Shape, CR>(path: string, component: QueryComponentLike<CS, CR>): SelectBuilder<S, R, Result>;
|
|
134
|
-
/**
|
|
135
|
-
* Returns the current selection as a FieldSet.
|
|
136
|
-
* If the selection was set via a FieldSet, returns that directly.
|
|
137
|
-
* If set via selectAll labels, constructs a FieldSet from them.
|
|
138
|
-
* If set via a callback, eagerly evaluates it through the proxy to produce a FieldSet.
|
|
139
|
-
*/
|
|
140
|
-
fields(): FieldSet | undefined;
|
|
141
|
-
/** Return the FieldSet with preload entries merged in (if any). */
|
|
142
|
-
private _fieldsWithPreloads;
|
|
143
|
-
/** Evaluate minus entry callbacks into RawMinusEntry[] (plain data). */
|
|
144
|
-
private _evaluateMinusEntries;
|
|
145
|
-
/**
|
|
146
|
-
* Serialize this SelectBuilder to a plain JSON object.
|
|
147
|
-
*
|
|
148
|
-
* Selections are serializable regardless of how they were set (FieldSet,
|
|
149
|
-
* string[], selectAll, or callback). Callback-based selections are eagerly
|
|
150
|
-
* evaluated through the proxy to produce a FieldSet.
|
|
151
|
-
*
|
|
152
|
-
* Where, orderBy, and minus clauses are evaluated through the proxy and
|
|
153
|
-
* serialized as plain data structures. Preloads are merged into the FieldSet
|
|
154
|
-
* as subSelect entries, producing identical IR on deserialization.
|
|
155
|
-
*/
|
|
156
|
-
toJSON(): QueryBuilderJSON;
|
|
157
|
-
/**
|
|
158
|
-
* Reconstruct a SelectBuilder from a JSON object.
|
|
159
|
-
* Resolves shape IRI via getShapeClass() and field paths as label selections.
|
|
160
|
-
*/
|
|
161
|
-
static fromJSON<S extends Shape = Shape>(json: QueryBuilderJSON): SelectBuilder<S>;
|
|
162
|
-
/**
|
|
163
|
-
* Get the raw pipeline input.
|
|
164
|
-
*
|
|
165
|
-
* Constructs RawSelectInput directly from FieldSet entries.
|
|
166
|
-
*/
|
|
167
|
-
toRawInput(): RawSelectInput;
|
|
168
|
-
/** Build RawSelectInput directly from FieldSet entries. */
|
|
169
|
-
private _buildDirectRawInput;
|
|
170
|
-
/** Discriminator for the free `lower()` function and dataset routing. */
|
|
171
|
-
readonly __queryKind: "select";
|
|
172
|
-
/** The shape this query targets — the routing key datasets/`LinkedStorage` use. */
|
|
173
|
-
get shape(): NodeShape;
|
|
174
|
-
/**
|
|
175
|
-
* Execute the query and return results.
|
|
176
|
-
*
|
|
177
|
-
* @param target Optional explicit dataset (a store or a router — a router *is* an
|
|
178
|
-
* `IDataset`) to run against. Omitted → the global query dispatch (the router's
|
|
179
|
-
* shape-based default). A `target` runs on that dataset only; the global router is
|
|
180
|
-
* untouched. `await`ing the builder (the PromiseLike path) always uses the global
|
|
181
|
-
* dispatch — only `.exec(target)` overrides.
|
|
182
|
-
*/
|
|
183
|
-
exec(target?: IDataset): Promise<Result>;
|
|
184
|
-
/** `await` triggers execution. */
|
|
185
|
-
then<TResult1 = Result, TResult2 = never>(onfulfilled?: ((value: Result) => TResult1 | PromiseLike<TResult1>) | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null): Promise<TResult1 | TResult2>;
|
|
186
|
-
/** Catch errors from execution. Chain off then() to avoid re-executing. */
|
|
187
|
-
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null): Promise<Result | TResult>;
|
|
188
|
-
/** Finally handler after execution. Chain off then() to avoid re-executing. */
|
|
189
|
-
finally(onfinally?: (() => void) | null): Promise<Result>;
|
|
190
|
-
get [Symbol.toStringTag](): string;
|
|
191
|
-
}
|
|
192
|
-
/** @deprecated Renamed to `SelectBuilder`. This alias will be removed in a future major. */
|
|
193
|
-
export { SelectBuilder as QueryBuilder };
|