@_linked/core 2.12.0 → 2.13.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/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,144 +0,0 @@
|
|
|
1
|
-
import type { IRExpression } from '../queries/IntermediateRepresentation.js';
|
|
2
|
-
import { PendingQueryContext } from '../queries/QueryContext.js';
|
|
3
|
-
export type ExpressionInput = ExpressionNode | string | number | boolean | Date | PendingQueryContext;
|
|
4
|
-
/**
|
|
5
|
-
* Map from placeholder sourceAlias → PropertyShape ID segments.
|
|
6
|
-
* Used to track unresolved property references from proxy tracing
|
|
7
|
-
* that need to be resolved during IR lowering.
|
|
8
|
-
*/
|
|
9
|
-
export type PropertyRefMap = ReadonlyMap<string, readonly string[]>;
|
|
10
|
-
export declare function toIRExpression(input: ExpressionInput): IRExpression;
|
|
11
|
-
export declare class ExpressionNode {
|
|
12
|
-
readonly ir: IRExpression;
|
|
13
|
-
/** Property reference map for unresolved proxy-traced property references. */
|
|
14
|
-
readonly _refs: PropertyRefMap;
|
|
15
|
-
constructor(ir: IRExpression, refs?: PropertyRefMap);
|
|
16
|
-
/** Create a derived node that merges refs from this and other inputs. */
|
|
17
|
-
private _derive;
|
|
18
|
-
/** Create a derived node with no additional inputs. */
|
|
19
|
-
private _wrap;
|
|
20
|
-
plus(n: ExpressionInput): ExpressionNode;
|
|
21
|
-
minus(n: ExpressionInput): ExpressionNode;
|
|
22
|
-
times(n: ExpressionInput): ExpressionNode;
|
|
23
|
-
divide(n: ExpressionInput): ExpressionNode;
|
|
24
|
-
abs(): ExpressionNode;
|
|
25
|
-
round(): ExpressionNode;
|
|
26
|
-
ceil(): ExpressionNode;
|
|
27
|
-
floor(): ExpressionNode;
|
|
28
|
-
power(n: number): ExpressionNode;
|
|
29
|
-
eq(v: ExpressionInput): ExpressionNode;
|
|
30
|
-
equals(v: ExpressionInput): ExpressionNode;
|
|
31
|
-
neq(v: ExpressionInput): ExpressionNode;
|
|
32
|
-
notEquals(v: ExpressionInput): ExpressionNode;
|
|
33
|
-
gt(v: ExpressionInput): ExpressionNode;
|
|
34
|
-
greaterThan(v: ExpressionInput): ExpressionNode;
|
|
35
|
-
gte(v: ExpressionInput): ExpressionNode;
|
|
36
|
-
greaterThanOrEqual(v: ExpressionInput): ExpressionNode;
|
|
37
|
-
lt(v: ExpressionInput): ExpressionNode;
|
|
38
|
-
lessThan(v: ExpressionInput): ExpressionNode;
|
|
39
|
-
lte(v: ExpressionInput): ExpressionNode;
|
|
40
|
-
lessThanOrEqual(v: ExpressionInput): ExpressionNode;
|
|
41
|
-
/** True when this value is one of `values` (SPARQL `IN`). Empty list → matches nothing. */
|
|
42
|
-
oneOf(values: ExpressionInput[]): ExpressionNode;
|
|
43
|
-
/** True when this value is NOT one of `values` (SPARQL `NOT IN`). Empty list → matches everything. */
|
|
44
|
-
notOneOf(values: ExpressionInput[]): ExpressionNode;
|
|
45
|
-
concat(...parts: ExpressionInput[]): ExpressionNode;
|
|
46
|
-
contains(s: ExpressionInput): ExpressionNode;
|
|
47
|
-
startsWith(s: ExpressionInput): ExpressionNode;
|
|
48
|
-
endsWith(s: ExpressionInput): ExpressionNode;
|
|
49
|
-
substr(start: number, len?: number): ExpressionNode;
|
|
50
|
-
before(s: ExpressionInput): ExpressionNode;
|
|
51
|
-
after(s: ExpressionInput): ExpressionNode;
|
|
52
|
-
replace(pat: string, rep: string, flags?: string): ExpressionNode;
|
|
53
|
-
ucase(): ExpressionNode;
|
|
54
|
-
lcase(): ExpressionNode;
|
|
55
|
-
strlen(): ExpressionNode;
|
|
56
|
-
encodeForUri(): ExpressionNode;
|
|
57
|
-
matches(pat: string, flags?: string): ExpressionNode;
|
|
58
|
-
year(): ExpressionNode;
|
|
59
|
-
month(): ExpressionNode;
|
|
60
|
-
day(): ExpressionNode;
|
|
61
|
-
hours(): ExpressionNode;
|
|
62
|
-
minutes(): ExpressionNode;
|
|
63
|
-
seconds(): ExpressionNode;
|
|
64
|
-
timezone(): ExpressionNode;
|
|
65
|
-
tz(): ExpressionNode;
|
|
66
|
-
and(expr: ExpressionInput): ExpressionNode;
|
|
67
|
-
or(expr: ExpressionInput): ExpressionNode;
|
|
68
|
-
not(): ExpressionNode;
|
|
69
|
-
isDefined(): ExpressionNode;
|
|
70
|
-
isNotDefined(): ExpressionNode;
|
|
71
|
-
defaultTo(fallback: ExpressionInput): ExpressionNode;
|
|
72
|
-
lang(): ExpressionNode;
|
|
73
|
-
datatype(): ExpressionNode;
|
|
74
|
-
str(): ExpressionNode;
|
|
75
|
-
iri(): ExpressionNode;
|
|
76
|
-
isIri(): ExpressionNode;
|
|
77
|
-
isLiteral(): ExpressionNode;
|
|
78
|
-
isBlank(): ExpressionNode;
|
|
79
|
-
isNumeric(): ExpressionNode;
|
|
80
|
-
md5(): ExpressionNode;
|
|
81
|
-
sha256(): ExpressionNode;
|
|
82
|
-
sha512(): ExpressionNode;
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Create an ExpressionNode from a proxy-traced property access.
|
|
86
|
-
* Uses a placeholder sourceAlias that gets resolved during IR lowering.
|
|
87
|
-
*
|
|
88
|
-
* The segments array maps to a property path (e.g. ['bestFriend', 'name']).
|
|
89
|
-
* Only the last segment becomes the property_expr's .property; earlier segments
|
|
90
|
-
* are stored in the refs map and resolved as traversals during lowering.
|
|
91
|
-
*/
|
|
92
|
-
export declare function tracedPropertyExpression(segmentIds: readonly string[]): ExpressionNode;
|
|
93
|
-
/**
|
|
94
|
-
* Create a traced expression that resolves to an alias reference (the entity itself,
|
|
95
|
-
* not a property on it). Used for root shape comparisons like `p.equals(entity)`.
|
|
96
|
-
* The traversalSegmentIds are walked to resolve the alias, then the result is alias_expr.
|
|
97
|
-
*/
|
|
98
|
-
export declare function tracedAliasExpression(traversalSegmentIds: readonly string[]): ExpressionNode;
|
|
99
|
-
/**
|
|
100
|
-
* Resolve unresolved property references in an IRExpression tree.
|
|
101
|
-
* Walks the tree and replaces placeholder sourceAlias values with
|
|
102
|
-
* real aliases resolved via pathOptions.
|
|
103
|
-
*/
|
|
104
|
-
export declare function resolveExpressionRefs(expr: IRExpression, refs: PropertyRefMap, rootAlias: string, resolveTraversal: (fromAlias: string, propertyShapeId: string) => string): IRExpression;
|
|
105
|
-
/**
|
|
106
|
-
* Represents an EXISTS quantifier condition over a collection path.
|
|
107
|
-
* Used by .some(), .every(), .none() on QueryShapeSet.
|
|
108
|
-
* Supports .and() / .or() / .not() chaining to compose with other conditions.
|
|
109
|
-
*
|
|
110
|
-
* The desugar/lower pipeline recognizes this via isExistsCondition() and builds
|
|
111
|
-
* IRExistsExpression with proper traversal patterns and aliases.
|
|
112
|
-
*/
|
|
113
|
-
export declare class ExistsCondition {
|
|
114
|
-
/** PropertyShape IDs forming the path from root to the collection. */
|
|
115
|
-
readonly pathSegmentIds: readonly string[];
|
|
116
|
-
/** The inner predicate ExpressionNode. */
|
|
117
|
-
readonly predicate: ExpressionNode;
|
|
118
|
-
/** Whether the EXISTS is negated (NOT EXISTS). */
|
|
119
|
-
readonly negated: boolean;
|
|
120
|
-
/** Optional chained and/or conditions. */
|
|
121
|
-
private readonly _chain;
|
|
122
|
-
constructor(
|
|
123
|
-
/** PropertyShape IDs forming the path from root to the collection. */
|
|
124
|
-
pathSegmentIds: readonly string[],
|
|
125
|
-
/** The inner predicate ExpressionNode. */
|
|
126
|
-
predicate: ExpressionNode,
|
|
127
|
-
/** Whether the EXISTS is negated (NOT EXISTS). */
|
|
128
|
-
negated?: boolean,
|
|
129
|
-
/** Optional chained and/or conditions. */
|
|
130
|
-
_chain?: Array<{
|
|
131
|
-
op: 'and' | 'or';
|
|
132
|
-
condition: ExpressionNode | ExistsCondition;
|
|
133
|
-
}>);
|
|
134
|
-
not(): ExistsCondition;
|
|
135
|
-
and(other: ExpressionInput | ExistsCondition): ExistsCondition;
|
|
136
|
-
or(other: ExpressionInput | ExistsCondition): ExistsCondition;
|
|
137
|
-
get chain(): ReadonlyArray<{
|
|
138
|
-
op: 'and' | 'or';
|
|
139
|
-
condition: ExpressionNode | ExistsCondition;
|
|
140
|
-
}>;
|
|
141
|
-
}
|
|
142
|
-
export declare function isExistsCondition(value: unknown): value is ExistsCondition;
|
|
143
|
-
/** Check if a value is an ExpressionNode. */
|
|
144
|
-
export declare function isExpressionNode(value: unknown): value is ExpressionNode;
|
|
@@ -1,432 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ExistsCondition = exports.ExpressionNode = void 0;
|
|
4
|
-
exports.toIRExpression = toIRExpression;
|
|
5
|
-
exports.tracedPropertyExpression = tracedPropertyExpression;
|
|
6
|
-
exports.tracedAliasExpression = tracedAliasExpression;
|
|
7
|
-
exports.resolveExpressionRefs = resolveExpressionRefs;
|
|
8
|
-
exports.isExistsCondition = isExistsCondition;
|
|
9
|
-
exports.isExpressionNode = isExpressionNode;
|
|
10
|
-
const QueryContext_js_1 = require("../queries/QueryContext.js");
|
|
11
|
-
const VALID_REGEX_FLAGS = new Set(['i', 'm', 's']);
|
|
12
|
-
function validateRegexFlags(flags) {
|
|
13
|
-
if (!flags)
|
|
14
|
-
return;
|
|
15
|
-
for (const ch of flags) {
|
|
16
|
-
if (!VALID_REGEX_FLAGS.has(ch)) {
|
|
17
|
-
throw new Error(`Unsupported regex flag "${ch}". Only "i", "m", "s" are supported.`);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
function toIRExpression(input) {
|
|
22
|
-
if (input instanceof ExpressionNode)
|
|
23
|
-
return input.ir;
|
|
24
|
-
if (typeof input === 'string')
|
|
25
|
-
return { kind: 'literal_expr', value: input };
|
|
26
|
-
if (typeof input === 'number')
|
|
27
|
-
return { kind: 'literal_expr', value: input };
|
|
28
|
-
if (typeof input === 'boolean')
|
|
29
|
-
return { kind: 'literal_expr', value: input };
|
|
30
|
-
if (input instanceof Date)
|
|
31
|
-
return { kind: 'literal_expr', value: input.toISOString() };
|
|
32
|
-
// A live query-context reference → carry the name; `lower()` resolves it.
|
|
33
|
-
if (input instanceof QueryContext_js_1.PendingQueryContext)
|
|
34
|
-
return { kind: 'reference_expr', contextName: input.contextName };
|
|
35
|
-
if (typeof input === 'object' && input !== null && 'id' in input)
|
|
36
|
-
return { kind: 'reference_expr', value: input.id };
|
|
37
|
-
throw new Error(`Invalid expression input: ${input}`);
|
|
38
|
-
}
|
|
39
|
-
function binary(op, left, right) {
|
|
40
|
-
return { kind: 'binary_expr', operator: op, left, right: toIRExpression(right) };
|
|
41
|
-
}
|
|
42
|
-
function fnExpr(name, ...args) {
|
|
43
|
-
return { kind: 'function_expr', name, args };
|
|
44
|
-
}
|
|
45
|
-
class ExpressionNode {
|
|
46
|
-
constructor(ir, refs) {
|
|
47
|
-
this.ir = ir;
|
|
48
|
-
this._refs = refs !== null && refs !== void 0 ? refs : new Map();
|
|
49
|
-
}
|
|
50
|
-
/** Create a derived node that merges refs from this and other inputs. */
|
|
51
|
-
_derive(ir, ...others) {
|
|
52
|
-
const merged = new Map(this._refs);
|
|
53
|
-
for (const other of others) {
|
|
54
|
-
if (other instanceof ExpressionNode) {
|
|
55
|
-
for (const [k, v] of other._refs)
|
|
56
|
-
merged.set(k, v);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
return new ExpressionNode(ir, merged);
|
|
60
|
-
}
|
|
61
|
-
/** Create a derived node with no additional inputs. */
|
|
62
|
-
_wrap(ir) {
|
|
63
|
-
return new ExpressionNode(ir, this._refs);
|
|
64
|
-
}
|
|
65
|
-
// ---------------------------------------------------------------------------
|
|
66
|
-
// Arithmetic
|
|
67
|
-
// ---------------------------------------------------------------------------
|
|
68
|
-
plus(n) {
|
|
69
|
-
return this._derive(binary('+', this.ir, n), n);
|
|
70
|
-
}
|
|
71
|
-
minus(n) {
|
|
72
|
-
return this._derive(binary('-', this.ir, n), n);
|
|
73
|
-
}
|
|
74
|
-
times(n) {
|
|
75
|
-
return this._derive(binary('*', this.ir, n), n);
|
|
76
|
-
}
|
|
77
|
-
divide(n) {
|
|
78
|
-
return this._derive(binary('/', this.ir, n), n);
|
|
79
|
-
}
|
|
80
|
-
abs() {
|
|
81
|
-
return this._wrap(fnExpr('ABS', this.ir));
|
|
82
|
-
}
|
|
83
|
-
round() {
|
|
84
|
-
return this._wrap(fnExpr('ROUND', this.ir));
|
|
85
|
-
}
|
|
86
|
-
ceil() {
|
|
87
|
-
return this._wrap(fnExpr('CEIL', this.ir));
|
|
88
|
-
}
|
|
89
|
-
floor() {
|
|
90
|
-
return this._wrap(fnExpr('FLOOR', this.ir));
|
|
91
|
-
}
|
|
92
|
-
power(n) {
|
|
93
|
-
if (!Number.isInteger(n) || n < 1) {
|
|
94
|
-
throw new Error(`power() exponent must be a positive integer, got ${n}`);
|
|
95
|
-
}
|
|
96
|
-
if (n > 20) {
|
|
97
|
-
throw new Error(`power() exponent must be ≤ 20 to avoid query bloat, got ${n}`);
|
|
98
|
-
}
|
|
99
|
-
if (n === 1)
|
|
100
|
-
return new ExpressionNode(this.ir, this._refs);
|
|
101
|
-
let result = this.ir;
|
|
102
|
-
for (let i = 1; i < n; i++) {
|
|
103
|
-
result = { kind: 'binary_expr', operator: '*', left: result, right: this.ir };
|
|
104
|
-
}
|
|
105
|
-
return new ExpressionNode(result, this._refs);
|
|
106
|
-
}
|
|
107
|
-
// ---------------------------------------------------------------------------
|
|
108
|
-
// Comparison (short + long aliases)
|
|
109
|
-
// ---------------------------------------------------------------------------
|
|
110
|
-
eq(v) {
|
|
111
|
-
return this._derive(binary('=', this.ir, v), v);
|
|
112
|
-
}
|
|
113
|
-
equals(v) {
|
|
114
|
-
return this.eq(v);
|
|
115
|
-
}
|
|
116
|
-
neq(v) {
|
|
117
|
-
return this._derive(binary('!=', this.ir, v), v);
|
|
118
|
-
}
|
|
119
|
-
notEquals(v) {
|
|
120
|
-
return this.neq(v);
|
|
121
|
-
}
|
|
122
|
-
gt(v) {
|
|
123
|
-
return this._derive(binary('>', this.ir, v), v);
|
|
124
|
-
}
|
|
125
|
-
greaterThan(v) {
|
|
126
|
-
return this.gt(v);
|
|
127
|
-
}
|
|
128
|
-
gte(v) {
|
|
129
|
-
return this._derive(binary('>=', this.ir, v), v);
|
|
130
|
-
}
|
|
131
|
-
greaterThanOrEqual(v) {
|
|
132
|
-
return this.gte(v);
|
|
133
|
-
}
|
|
134
|
-
lt(v) {
|
|
135
|
-
return this._derive(binary('<', this.ir, v), v);
|
|
136
|
-
}
|
|
137
|
-
lessThan(v) {
|
|
138
|
-
return this.lt(v);
|
|
139
|
-
}
|
|
140
|
-
lte(v) {
|
|
141
|
-
return this._derive(binary('<=', this.ir, v), v);
|
|
142
|
-
}
|
|
143
|
-
lessThanOrEqual(v) {
|
|
144
|
-
return this.lte(v);
|
|
145
|
-
}
|
|
146
|
-
// ---------------------------------------------------------------------------
|
|
147
|
-
// Membership — `value IN (…)` / `NOT IN (…)`
|
|
148
|
-
// ---------------------------------------------------------------------------
|
|
149
|
-
/** True when this value is one of `values` (SPARQL `IN`). Empty list → matches nothing. */
|
|
150
|
-
oneOf(values) {
|
|
151
|
-
return this._derive({ kind: 'in_expr', negated: false, value: this.ir, source: { list: values.map(toIRExpression) } }, ...values);
|
|
152
|
-
}
|
|
153
|
-
/** True when this value is NOT one of `values` (SPARQL `NOT IN`). Empty list → matches everything. */
|
|
154
|
-
notOneOf(values) {
|
|
155
|
-
return this._derive({ kind: 'in_expr', negated: true, value: this.ir, source: { list: values.map(toIRExpression) } }, ...values);
|
|
156
|
-
}
|
|
157
|
-
// ---------------------------------------------------------------------------
|
|
158
|
-
// String
|
|
159
|
-
// ---------------------------------------------------------------------------
|
|
160
|
-
concat(...parts) {
|
|
161
|
-
return this._derive(fnExpr('CONCAT', this.ir, ...parts.map(toIRExpression)), ...parts);
|
|
162
|
-
}
|
|
163
|
-
contains(s) {
|
|
164
|
-
return this._derive(fnExpr('CONTAINS', this.ir, toIRExpression(s)), s);
|
|
165
|
-
}
|
|
166
|
-
startsWith(s) {
|
|
167
|
-
return this._derive(fnExpr('STRSTARTS', this.ir, toIRExpression(s)), s);
|
|
168
|
-
}
|
|
169
|
-
endsWith(s) {
|
|
170
|
-
return this._derive(fnExpr('STRENDS', this.ir, toIRExpression(s)), s);
|
|
171
|
-
}
|
|
172
|
-
substr(start, len) {
|
|
173
|
-
const args = [
|
|
174
|
-
this.ir,
|
|
175
|
-
{ kind: 'literal_expr', value: start },
|
|
176
|
-
];
|
|
177
|
-
if (len !== undefined) {
|
|
178
|
-
args.push({ kind: 'literal_expr', value: len });
|
|
179
|
-
}
|
|
180
|
-
return this._wrap(fnExpr('SUBSTR', ...args));
|
|
181
|
-
}
|
|
182
|
-
before(s) {
|
|
183
|
-
return this._derive(fnExpr('STRBEFORE', this.ir, toIRExpression(s)), s);
|
|
184
|
-
}
|
|
185
|
-
after(s) {
|
|
186
|
-
return this._derive(fnExpr('STRAFTER', this.ir, toIRExpression(s)), s);
|
|
187
|
-
}
|
|
188
|
-
replace(pat, rep, flags) {
|
|
189
|
-
validateRegexFlags(flags);
|
|
190
|
-
const args = [
|
|
191
|
-
this.ir,
|
|
192
|
-
{ kind: 'literal_expr', value: pat },
|
|
193
|
-
{ kind: 'literal_expr', value: rep },
|
|
194
|
-
];
|
|
195
|
-
if (flags) {
|
|
196
|
-
args.push({ kind: 'literal_expr', value: flags });
|
|
197
|
-
}
|
|
198
|
-
return this._wrap(fnExpr('REPLACE', ...args));
|
|
199
|
-
}
|
|
200
|
-
ucase() {
|
|
201
|
-
return this._wrap(fnExpr('UCASE', this.ir));
|
|
202
|
-
}
|
|
203
|
-
lcase() {
|
|
204
|
-
return this._wrap(fnExpr('LCASE', this.ir));
|
|
205
|
-
}
|
|
206
|
-
strlen() {
|
|
207
|
-
return this._wrap(fnExpr('STRLEN', this.ir));
|
|
208
|
-
}
|
|
209
|
-
encodeForUri() {
|
|
210
|
-
return this._wrap(fnExpr('ENCODE_FOR_URI', this.ir));
|
|
211
|
-
}
|
|
212
|
-
matches(pat, flags) {
|
|
213
|
-
validateRegexFlags(flags);
|
|
214
|
-
const args = [
|
|
215
|
-
this.ir,
|
|
216
|
-
{ kind: 'literal_expr', value: pat },
|
|
217
|
-
];
|
|
218
|
-
if (flags) {
|
|
219
|
-
args.push({ kind: 'literal_expr', value: flags });
|
|
220
|
-
}
|
|
221
|
-
return this._wrap(fnExpr('REGEX', ...args));
|
|
222
|
-
}
|
|
223
|
-
// ---------------------------------------------------------------------------
|
|
224
|
-
// Date/Time
|
|
225
|
-
// ---------------------------------------------------------------------------
|
|
226
|
-
year() { return this._wrap(fnExpr('YEAR', this.ir)); }
|
|
227
|
-
month() { return this._wrap(fnExpr('MONTH', this.ir)); }
|
|
228
|
-
day() { return this._wrap(fnExpr('DAY', this.ir)); }
|
|
229
|
-
hours() { return this._wrap(fnExpr('HOURS', this.ir)); }
|
|
230
|
-
minutes() { return this._wrap(fnExpr('MINUTES', this.ir)); }
|
|
231
|
-
seconds() { return this._wrap(fnExpr('SECONDS', this.ir)); }
|
|
232
|
-
timezone() { return this._wrap(fnExpr('TIMEZONE', this.ir)); }
|
|
233
|
-
tz() { return this._wrap(fnExpr('TZ', this.ir)); }
|
|
234
|
-
// ---------------------------------------------------------------------------
|
|
235
|
-
// Logical
|
|
236
|
-
// ---------------------------------------------------------------------------
|
|
237
|
-
and(expr) {
|
|
238
|
-
return this._derive({
|
|
239
|
-
kind: 'logical_expr',
|
|
240
|
-
operator: 'and',
|
|
241
|
-
expressions: [this.ir, toIRExpression(expr)],
|
|
242
|
-
}, expr);
|
|
243
|
-
}
|
|
244
|
-
or(expr) {
|
|
245
|
-
return this._derive({
|
|
246
|
-
kind: 'logical_expr',
|
|
247
|
-
operator: 'or',
|
|
248
|
-
expressions: [this.ir, toIRExpression(expr)],
|
|
249
|
-
}, expr);
|
|
250
|
-
}
|
|
251
|
-
not() {
|
|
252
|
-
return this._wrap({ kind: 'not_expr', expression: this.ir });
|
|
253
|
-
}
|
|
254
|
-
// ---------------------------------------------------------------------------
|
|
255
|
-
// Null-handling
|
|
256
|
-
// ---------------------------------------------------------------------------
|
|
257
|
-
isDefined() {
|
|
258
|
-
return this._wrap(fnExpr('BOUND', this.ir));
|
|
259
|
-
}
|
|
260
|
-
isNotDefined() {
|
|
261
|
-
return this._wrap({
|
|
262
|
-
kind: 'not_expr',
|
|
263
|
-
expression: fnExpr('BOUND', this.ir),
|
|
264
|
-
});
|
|
265
|
-
}
|
|
266
|
-
defaultTo(fallback) {
|
|
267
|
-
return this._derive(fnExpr('COALESCE', this.ir, toIRExpression(fallback)), fallback);
|
|
268
|
-
}
|
|
269
|
-
// ---------------------------------------------------------------------------
|
|
270
|
-
// RDF introspection
|
|
271
|
-
// ---------------------------------------------------------------------------
|
|
272
|
-
lang() { return this._wrap(fnExpr('LANG', this.ir)); }
|
|
273
|
-
datatype() { return this._wrap(fnExpr('DATATYPE', this.ir)); }
|
|
274
|
-
// ---------------------------------------------------------------------------
|
|
275
|
-
// Type casting / checking
|
|
276
|
-
// ---------------------------------------------------------------------------
|
|
277
|
-
str() { return this._wrap(fnExpr('STR', this.ir)); }
|
|
278
|
-
iri() { return this._wrap(fnExpr('IRI', this.ir)); }
|
|
279
|
-
isIri() { return this._wrap(fnExpr('isIRI', this.ir)); }
|
|
280
|
-
isLiteral() { return this._wrap(fnExpr('isLiteral', this.ir)); }
|
|
281
|
-
isBlank() { return this._wrap(fnExpr('isBlank', this.ir)); }
|
|
282
|
-
isNumeric() { return this._wrap(fnExpr('isNumeric', this.ir)); }
|
|
283
|
-
// ---------------------------------------------------------------------------
|
|
284
|
-
// Hash
|
|
285
|
-
// ---------------------------------------------------------------------------
|
|
286
|
-
md5() { return this._wrap(fnExpr('MD5', this.ir)); }
|
|
287
|
-
sha256() { return this._wrap(fnExpr('SHA256', this.ir)); }
|
|
288
|
-
sha512() { return this._wrap(fnExpr('SHA512', this.ir)); }
|
|
289
|
-
}
|
|
290
|
-
exports.ExpressionNode = ExpressionNode;
|
|
291
|
-
// ---------------------------------------------------------------------------
|
|
292
|
-
// Proxy tracing helpers
|
|
293
|
-
// ---------------------------------------------------------------------------
|
|
294
|
-
let _refCounter = 0;
|
|
295
|
-
/**
|
|
296
|
-
* Create an ExpressionNode from a proxy-traced property access.
|
|
297
|
-
* Uses a placeholder sourceAlias that gets resolved during IR lowering.
|
|
298
|
-
*
|
|
299
|
-
* The segments array maps to a property path (e.g. ['bestFriend', 'name']).
|
|
300
|
-
* Only the last segment becomes the property_expr's .property; earlier segments
|
|
301
|
-
* are stored in the refs map and resolved as traversals during lowering.
|
|
302
|
-
*/
|
|
303
|
-
function tracedPropertyExpression(segmentIds) {
|
|
304
|
-
const placeholder = `__ref_${_refCounter++}__`;
|
|
305
|
-
const lastSegment = segmentIds[segmentIds.length - 1];
|
|
306
|
-
const ir = {
|
|
307
|
-
kind: 'property_expr',
|
|
308
|
-
sourceAlias: placeholder,
|
|
309
|
-
property: lastSegment,
|
|
310
|
-
};
|
|
311
|
-
const refs = new Map([[placeholder, segmentIds]]);
|
|
312
|
-
return new ExpressionNode(ir, refs);
|
|
313
|
-
}
|
|
314
|
-
/**
|
|
315
|
-
* Create a traced expression that resolves to an alias reference (the entity itself,
|
|
316
|
-
* not a property on it). Used for root shape comparisons like `p.equals(entity)`.
|
|
317
|
-
* The traversalSegmentIds are walked to resolve the alias, then the result is alias_expr.
|
|
318
|
-
*/
|
|
319
|
-
function tracedAliasExpression(traversalSegmentIds) {
|
|
320
|
-
const placeholder = `__alias_ref_${_refCounter++}__`;
|
|
321
|
-
const ir = {
|
|
322
|
-
kind: 'alias_expr',
|
|
323
|
-
alias: placeholder,
|
|
324
|
-
};
|
|
325
|
-
const refs = new Map([[placeholder, traversalSegmentIds]]);
|
|
326
|
-
return new ExpressionNode(ir, refs);
|
|
327
|
-
}
|
|
328
|
-
/**
|
|
329
|
-
* Resolve unresolved property references in an IRExpression tree.
|
|
330
|
-
* Walks the tree and replaces placeholder sourceAlias values with
|
|
331
|
-
* real aliases resolved via pathOptions.
|
|
332
|
-
*/
|
|
333
|
-
function resolveExpressionRefs(expr, refs, rootAlias, resolveTraversal) {
|
|
334
|
-
if (refs.size === 0)
|
|
335
|
-
return expr;
|
|
336
|
-
const resolve = (e) => {
|
|
337
|
-
switch (e.kind) {
|
|
338
|
-
case 'property_expr': {
|
|
339
|
-
const segments = refs.get(e.sourceAlias);
|
|
340
|
-
if (!segments)
|
|
341
|
-
return e;
|
|
342
|
-
// Resolve: first N-1 segments are traversals, last is property
|
|
343
|
-
let currentAlias = rootAlias;
|
|
344
|
-
for (let i = 0; i < segments.length - 1; i++) {
|
|
345
|
-
currentAlias = resolveTraversal(currentAlias, segments[i]);
|
|
346
|
-
}
|
|
347
|
-
return {
|
|
348
|
-
kind: 'property_expr',
|
|
349
|
-
sourceAlias: currentAlias,
|
|
350
|
-
property: segments[segments.length - 1],
|
|
351
|
-
};
|
|
352
|
-
}
|
|
353
|
-
case 'alias_expr': {
|
|
354
|
-
const segments = refs.get(e.alias);
|
|
355
|
-
if (!segments)
|
|
356
|
-
return e;
|
|
357
|
-
// Resolve all segments as traversals, return alias_expr for the final alias
|
|
358
|
-
let currentAlias = rootAlias;
|
|
359
|
-
for (const seg of segments) {
|
|
360
|
-
currentAlias = resolveTraversal(currentAlias, seg);
|
|
361
|
-
}
|
|
362
|
-
return { kind: 'alias_expr', alias: currentAlias };
|
|
363
|
-
}
|
|
364
|
-
case 'binary_expr':
|
|
365
|
-
return Object.assign(Object.assign({}, e), { left: resolve(e.left), right: resolve(e.right) });
|
|
366
|
-
case 'in_expr':
|
|
367
|
-
return Object.assign(Object.assign({}, e), { value: resolve(e.value), source: { list: e.source.list.map(resolve) } });
|
|
368
|
-
case 'function_expr':
|
|
369
|
-
return Object.assign(Object.assign({}, e), { args: e.args.map(resolve) });
|
|
370
|
-
case 'aggregate_expr':
|
|
371
|
-
return Object.assign(Object.assign({}, e), { args: e.args.map(resolve) });
|
|
372
|
-
case 'logical_expr':
|
|
373
|
-
return Object.assign(Object.assign({}, e), { expressions: e.expressions.map(resolve) });
|
|
374
|
-
case 'not_expr':
|
|
375
|
-
return Object.assign(Object.assign({}, e), { expression: resolve(e.expression) });
|
|
376
|
-
default:
|
|
377
|
-
return e;
|
|
378
|
-
}
|
|
379
|
-
};
|
|
380
|
-
return resolve(expr);
|
|
381
|
-
}
|
|
382
|
-
/**
|
|
383
|
-
* Represents an EXISTS quantifier condition over a collection path.
|
|
384
|
-
* Used by .some(), .every(), .none() on QueryShapeSet.
|
|
385
|
-
* Supports .and() / .or() / .not() chaining to compose with other conditions.
|
|
386
|
-
*
|
|
387
|
-
* The desugar/lower pipeline recognizes this via isExistsCondition() and builds
|
|
388
|
-
* IRExistsExpression with proper traversal patterns and aliases.
|
|
389
|
-
*/
|
|
390
|
-
class ExistsCondition {
|
|
391
|
-
constructor(
|
|
392
|
-
/** PropertyShape IDs forming the path from root to the collection. */
|
|
393
|
-
pathSegmentIds,
|
|
394
|
-
/** The inner predicate ExpressionNode. */
|
|
395
|
-
predicate,
|
|
396
|
-
/** Whether the EXISTS is negated (NOT EXISTS). */
|
|
397
|
-
negated = false,
|
|
398
|
-
/** Optional chained and/or conditions. */
|
|
399
|
-
_chain = []) {
|
|
400
|
-
this.pathSegmentIds = pathSegmentIds;
|
|
401
|
-
this.predicate = predicate;
|
|
402
|
-
this.negated = negated;
|
|
403
|
-
this._chain = _chain;
|
|
404
|
-
}
|
|
405
|
-
not() {
|
|
406
|
-
return new ExistsCondition(this.pathSegmentIds, this.predicate, !this.negated, this._chain);
|
|
407
|
-
}
|
|
408
|
-
and(other) {
|
|
409
|
-
return new ExistsCondition(this.pathSegmentIds, this.predicate, this.negated, [
|
|
410
|
-
...this._chain,
|
|
411
|
-
{ op: 'and', condition: other instanceof ExistsCondition ? other : other instanceof ExpressionNode ? other : new ExpressionNode(toIRExpression(other)) },
|
|
412
|
-
]);
|
|
413
|
-
}
|
|
414
|
-
or(other) {
|
|
415
|
-
return new ExistsCondition(this.pathSegmentIds, this.predicate, this.negated, [
|
|
416
|
-
...this._chain,
|
|
417
|
-
{ op: 'or', condition: other instanceof ExistsCondition ? other : other instanceof ExpressionNode ? other : new ExpressionNode(toIRExpression(other)) },
|
|
418
|
-
]);
|
|
419
|
-
}
|
|
420
|
-
get chain() {
|
|
421
|
-
return this._chain;
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
exports.ExistsCondition = ExistsCondition;
|
|
425
|
-
function isExistsCondition(value) {
|
|
426
|
-
return value instanceof ExistsCondition;
|
|
427
|
-
}
|
|
428
|
-
/** Check if a value is an ExpressionNode. */
|
|
429
|
-
function isExpressionNode(value) {
|
|
430
|
-
return value instanceof ExpressionNode;
|
|
431
|
-
}
|
|
432
|
-
//# sourceMappingURL=ExpressionNode.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ExpressionNode.js","sourceRoot":"","sources":["../../../src/expressions/ExpressionNode.ts"],"names":[],"mappings":";;;AA4BA,wCAgBC;AAqVD,4DAYC;AAOD,sDAUC;AAOD,sDA4DC;AA6CD,8CAEC;AAGD,4CAEC;AAjhBD,gEAA+D;AAW/D,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;AAEnD,SAAS,kBAAkB,CAAC,KAAyB;IACnD,IAAI,CAAC,KAAK;QAAE,OAAO;IACnB,KAAK,MAAM,EAAE,IAAI,KAAK,EAAE,CAAC;QACvB,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC;YAC/B,MAAM,IAAI,KAAK,CACb,2BAA2B,EAAE,sCAAsC,CACpE,CAAC;QACJ,CAAC;IACH,CAAC;AACH,CAAC;AAED,SAAgB,cAAc,CAAC,KAAsB;IACnD,IAAI,KAAK,YAAY,cAAc;QAAE,OAAO,KAAK,CAAC,EAAE,CAAC;IACrD,IAAI,OAAO,KAAK,KAAK,QAAQ;QAC3B,OAAO,EAAC,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,KAAK,EAAC,CAAC;IAC9C,IAAI,OAAO,KAAK,KAAK,QAAQ;QAC3B,OAAO,EAAC,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,KAAK,EAAC,CAAC;IAC9C,IAAI,OAAO,KAAK,KAAK,SAAS;QAC5B,OAA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C,SAAS,EAAE,IAAI,CAAC,OAAO,EAAE;YAC5E,GAAG,IAAI,CAAC,MAAM;YACd,EAAC,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,YAAY,eAAe,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,YAAY,cAAc,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,cAAc,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,EAAC;SACvJ,CAAC,CAAC;IACL,CAAC;IAED,EAAE,CAAC,KAAwC;QACzC,OAAO,IAAI,eAAe,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,OAAO,EAAE;YAC5E,GAAG,IAAI,CAAC,MAAM;YACd,EAAC,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,YAAY,eAAe,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,YAAY,cAAc,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,cAAc,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,EAAC;SACtJ,CAAC,CAAC;IACL,CAAC;IAED,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;CACF;AAjCD,0CAiCC;AAED,SAAgB,iBAAiB,CAAC,KAAc;IAC9C,OAAO,KAAK,YAAY,eAAe,CAAC;AAC1C,CAAC;AAED,6CAA6C;AAC7C,SAAgB,gBAAgB,CAAC,KAAc;IAC7C,OAAO,KAAK,YAAY,cAAc,CAAC;AACzC,CAAC"}
|
package/lib/cjs/index.d.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export { syncShapes, syncShape } from './shapes/syncShapes.js';
|
|
2
|
-
export { rdfList } from './shapes/List.js';
|
|
3
|
-
export { serializePathToNodeData } from './shapes/serializePathToNodeData.js';
|
|
4
|
-
export { Shape } from './shapes/Shape.js';
|
|
5
|
-
export { LinkedStorage } from './utils/LinkedStorage.js';
|
|
6
|
-
export { SelectBuilder, QueryBuilder } from './queries/QueryBuilder.js';
|
|
7
|
-
export { lower } from './queries/lower.js';
|
|
8
|
-
export type { LowerableQuery } from './queries/lower.js';
|
|
9
|
-
export { fromJSON } from './queries/fromJSON.js';
|
|
10
|
-
export type { QueryJSON } from './queries/fromJSON.js';
|
|
11
|
-
export { getQueryContext, setQueryContext, subscribeQueryContext, PendingQueryContext, UnresolvedContextError, } from './queries/QueryContext.js';
|
|
12
|
-
export { CONTEXT_REF_KEY, encodeContextRef, isContextRefJSON, resolveContextId, } from './queries/ContextRef.js';
|
|
13
|
-
export type { ContextRefJSON } from './queries/ContextRef.js';
|
|
14
|
-
export { PropertyPath, walkPropertyPath } from './queries/PropertyPath.js';
|
|
15
|
-
export { FieldSet } from './queries/FieldSet.js';
|
|
16
|
-
export type { FieldSetEntry, FieldSetInput, FieldSetJSON, FieldSetFieldJSON } from './queries/FieldSet.js';
|
|
17
|
-
export type { QueryBuilderJSON } from './queries/QueryBuilder.js';
|
|
18
|
-
export { CreateBuilder } from './queries/CreateBuilder.js';
|
|
19
|
-
export { UpdateBuilder } from './queries/UpdateBuilder.js';
|
|
20
|
-
export { DeleteBuilder } from './queries/DeleteBuilder.js';
|
|
21
|
-
export type { DeleteId } from './queries/DeleteBuilder.js';
|
|
22
|
-
export { ExpressionNode } from './expressions/ExpressionNode.js';
|
|
23
|
-
export type { ExpressionInput, PropertyRefMap } from './expressions/ExpressionNode.js';
|
|
24
|
-
export { Expr } from './expressions/Expr.js';
|
|
25
|
-
export type { ExpressionUpdateProxy, ExpressionUpdateResult, BaseExpressionMethods, NumericExpressionMethods, StringExpressionMethods, DateExpressionMethods, BooleanExpressionMethods, } from './expressions/ExpressionMethods.js';
|
|
26
|
-
export type { LinkedComponentInterface, QueryComponentLike } from './queries/SelectQuery.js';
|
|
27
|
-
export { encodeNodeData, encodeValue, } from './queries/MutationSerialization.js';
|
|
28
|
-
export { decodeNodeData, lowerMutationJSON, } from './queries/lowerMutationJSON.js';
|
|
29
|
-
export type { MutationJSON, CreateMutationJSON, UpdateMutationJSON, DeleteMutationJSON, MutationValueJSON, MutationNodeDataJSON, } from './queries/MutationSerialization.js';
|