grafeo-ogm 2.1.1 → 2.3.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 +126 -0
- package/README.md +98 -1
- package/dist/cjs/compilers/mutation.compiler.d.ts +94 -31
- package/dist/cjs/compilers/mutation.compiler.d.ts.map +1 -1
- package/dist/cjs/compilers/mutation.compiler.js +381 -343
- package/dist/cjs/compilers/mutation.compiler.js.map +1 -1
- package/dist/cjs/compilers/selection.compiler.d.ts +1 -1
- package/dist/cjs/compilers/selection.compiler.d.ts.map +1 -1
- package/dist/cjs/compilers/selection.compiler.js +33 -39
- package/dist/cjs/compilers/selection.compiler.js.map +1 -1
- package/dist/cjs/compilers/where.compiler.d.ts +206 -6
- package/dist/cjs/compilers/where.compiler.d.ts.map +1 -1
- package/dist/cjs/compilers/where.compiler.js +525 -176
- package/dist/cjs/compilers/where.compiler.js.map +1 -1
- package/dist/cjs/execution/executor.d.ts +11 -1
- package/dist/cjs/execution/executor.d.ts.map +1 -1
- package/dist/cjs/execution/executor.js +6 -3
- package/dist/cjs/execution/executor.js.map +1 -1
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/interface-model.d.ts +20 -10
- package/dist/cjs/interface-model.d.ts.map +1 -1
- package/dist/cjs/interface-model.js +47 -104
- package/dist/cjs/interface-model.js.map +1 -1
- package/dist/cjs/model.d.ts +42 -30
- package/dist/cjs/model.d.ts.map +1 -1
- package/dist/cjs/model.js +134 -99
- package/dist/cjs/model.js.map +1 -1
- package/dist/cjs/ogm.d.ts.map +1 -1
- package/dist/cjs/ogm.js +1 -0
- package/dist/cjs/ogm.js.map +1 -1
- package/dist/cjs/policy/explain.d.ts +59 -0
- package/dist/cjs/policy/explain.d.ts.map +1 -0
- package/dist/cjs/policy/explain.js +175 -0
- package/dist/cjs/policy/explain.js.map +1 -0
- package/dist/cjs/policy/nested-writes.d.ts +35 -0
- package/dist/cjs/policy/nested-writes.d.ts.map +1 -0
- package/dist/cjs/policy/nested-writes.js +199 -0
- package/dist/cjs/policy/nested-writes.js.map +1 -0
- package/dist/cjs/policy/resolver.d.ts +26 -2
- package/dist/cjs/policy/resolver.d.ts.map +1 -1
- package/dist/cjs/policy/resolver.js +103 -33
- package/dist/cjs/policy/resolver.js.map +1 -1
- package/dist/cjs/policy/types.d.ts +105 -0
- package/dist/cjs/policy/types.d.ts.map +1 -1
- package/dist/cjs/policy/types.js +24 -0
- package/dist/cjs/policy/types.js.map +1 -1
- package/dist/esm/compilers/mutation.compiler.d.ts +94 -31
- package/dist/esm/compilers/mutation.compiler.d.ts.map +1 -1
- package/dist/esm/compilers/mutation.compiler.js +381 -344
- package/dist/esm/compilers/mutation.compiler.js.map +1 -1
- package/dist/esm/compilers/selection.compiler.d.ts +1 -1
- package/dist/esm/compilers/selection.compiler.d.ts.map +1 -1
- package/dist/esm/compilers/selection.compiler.js +33 -39
- package/dist/esm/compilers/selection.compiler.js.map +1 -1
- package/dist/esm/compilers/where.compiler.d.ts +206 -6
- package/dist/esm/compilers/where.compiler.d.ts.map +1 -1
- package/dist/esm/compilers/where.compiler.js +524 -178
- package/dist/esm/compilers/where.compiler.js.map +1 -1
- package/dist/esm/execution/executor.d.ts +11 -1
- package/dist/esm/execution/executor.d.ts.map +1 -1
- package/dist/esm/execution/executor.js +6 -3
- package/dist/esm/execution/executor.js.map +1 -1
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/interface-model.d.ts +20 -10
- package/dist/esm/interface-model.d.ts.map +1 -1
- package/dist/esm/interface-model.js +47 -104
- package/dist/esm/interface-model.js.map +1 -1
- package/dist/esm/model.d.ts +42 -30
- package/dist/esm/model.d.ts.map +1 -1
- package/dist/esm/model.js +136 -101
- package/dist/esm/model.js.map +1 -1
- package/dist/esm/ogm.d.ts.map +1 -1
- package/dist/esm/ogm.js +1 -0
- package/dist/esm/ogm.js.map +1 -1
- package/dist/esm/policy/explain.d.ts +59 -0
- package/dist/esm/policy/explain.d.ts.map +1 -0
- package/dist/esm/policy/explain.js +169 -0
- package/dist/esm/policy/explain.js.map +1 -0
- package/dist/esm/policy/nested-writes.d.ts +35 -0
- package/dist/esm/policy/nested-writes.d.ts.map +1 -0
- package/dist/esm/policy/nested-writes.js +193 -0
- package/dist/esm/policy/nested-writes.js.map +1 -0
- package/dist/esm/policy/resolver.d.ts +26 -2
- package/dist/esm/policy/resolver.d.ts.map +1 -1
- package/dist/esm/policy/resolver.js +102 -33
- package/dist/esm/policy/resolver.js.map +1 -1
- package/dist/esm/policy/types.d.ts +105 -0
- package/dist/esm/policy/types.d.ts.map +1 -1
- package/dist/esm/policy/types.js +23 -0
- package/dist/esm/policy/types.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/policy/types.ts"],"names":[],"mappings":";AAAA;;;;;GAKG
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/policy/types.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AA8NH,4BAUC;AAED,gCAqBC;AAkDD,kCA2CC;AAUD,8CAMC;AAED,gDAMC;AAlXD,sCAAqC;AAoLrC,8EAA8E;AAC9E,wEAAwE;AACxE,+DAA+D;AAC/D,8EAA8E;AAE9E,SAAS,MAAM,CAAmB,GAAM;IACtC,OAAO,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AAC5B,CAAC;AAED,SAAS,qBAAqB,CAC5B,UAA8C,EAC9C,IAAY;IAEZ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC;QACvD,MAAM,IAAI,iBAAQ,CAChB,GAAG,IAAI,kDAAkD,CAC1D,CAAC;AACN,CAAC;AAED,MAAM,gBA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d,CAAC;AAED,SAAgB,kBAAkB,CAChC,CAAuB;IAEvB,KAAK,MAAM,EAAE,IAAI,CAAC,CAAC,UAAU;QAC3B,IAAI,gBAAgB,CAAC,GAAG,CAAC,EAAY,CAAC;YAAE,OAAO,IAAI,CAAC;IACtD,OAAO,KAAK,CAAC;AACf,CAAC;AAgBD;;;;;;;;;;;;;;;;GAgBG;AACU,QAAA,cAAc,GAAqB,MAAM,CAAC,MAAM,CAAC;IAC5D,UAAU,EAAE,IAAI;IAChB,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;IAC9B,YAAY,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;CAC7B,CAAC,CAAC"}
|
|
@@ -55,6 +55,34 @@ export declare class MutationCompiler {
|
|
|
55
55
|
*/
|
|
56
56
|
private buildTargetPolicyPredicate;
|
|
57
57
|
private getPolicyWhereCompiler;
|
|
58
|
+
/**
|
|
59
|
+
* Compile a nested-write `where` (connect, disconnect, nested update,
|
|
60
|
+
* nested/cascade delete) against `targetVar` through `WhereCompiler` —
|
|
61
|
+
* the single where implementation (v2.3.0: the mutation compiler's
|
|
62
|
+
* parallel builder was removed after repeatedly drifting from it).
|
|
63
|
+
* Operators, null semantics, abstract relationship targets and —
|
|
64
|
+
* crucially — traversal-policy enforcement are identical to a direct
|
|
65
|
+
* `where`: a relationship filter inside it AND-stitches the traversed
|
|
66
|
+
* type's `read` policy. The target's OWN operation policy is added
|
|
67
|
+
* separately by `buildTargetPolicyPredicate`, so the root here is bound
|
|
68
|
+
* as `NO_ROOT_POLICY`.
|
|
69
|
+
*
|
|
70
|
+
* Returns `''` for an absent or empty where.
|
|
71
|
+
*/
|
|
72
|
+
private compileTargetWhere;
|
|
73
|
+
/**
|
|
74
|
+
* The bulk-connect UNWIND fast path compiles each where key against the
|
|
75
|
+
* ROW's own value (`connItem.where.node.<key>`), which `WhereCompiler`
|
|
76
|
+
* cannot express. It is therefore restricted to the one shape where
|
|
77
|
+
* that is exact: every item's where is `{ node: { … } }` or bare
|
|
78
|
+
* properties, holding only declared, stored scalar properties of the
|
|
79
|
+
* target (registered operators allowed) with NON-NULL values — no
|
|
80
|
+
* `AND`/`OR`/`NOT`/`node_NOT`, no relationship traversal, no `@cypher`
|
|
81
|
+
* field. Every predicate it emits is then a scalar comparison against a
|
|
82
|
+
* concrete row value, so it can only narrow matches, never fail open.
|
|
83
|
+
* Anything else takes the per-item path through `WhereCompiler`.
|
|
84
|
+
*/
|
|
85
|
+
private isConnectFastPathEligible;
|
|
58
86
|
/**
|
|
59
87
|
* Surface a logical operator that contributed zero effective conditions.
|
|
60
88
|
* Mirrors WhereCompiler.warnEmptyLogical — fires only on the anomalous
|
|
@@ -68,7 +96,20 @@ export declare class MutationCompiler {
|
|
|
68
96
|
* Generate CREATE Cypher for one or more nodes.
|
|
69
97
|
* Handles scalar properties, nested relationship creates, and connects.
|
|
70
98
|
*/
|
|
71
|
-
compileCreate(inputs: Record<string, unknown>[], nodeDef: NodeDefinition, labels?: string[]
|
|
99
|
+
compileCreate(inputs: Record<string, unknown>[], nodeDef: NodeDefinition, labels?: string[],
|
|
100
|
+
/**
|
|
101
|
+
* The caller's `create` bundle (v2.3.0). Its `resolveForType` gates
|
|
102
|
+
* every connect target in the nested input by the TARGET type's `read`
|
|
103
|
+
* policy — pre-2.3.0 the create path threaded no policy at all.
|
|
104
|
+
*/
|
|
105
|
+
policyContext?: PolicyContextBundle,
|
|
106
|
+
/**
|
|
107
|
+
* Shared `param<N>` counter; continue it into the RETURN selection so
|
|
108
|
+
* nested-filter params never collide with the selection's.
|
|
109
|
+
*/
|
|
110
|
+
paramCounter?: {
|
|
111
|
+
count: number;
|
|
112
|
+
}): MutationResult;
|
|
72
113
|
/**
|
|
73
114
|
* Generate UPDATE Cypher (SET properties + connect/disconnect).
|
|
74
115
|
*/
|
|
@@ -95,12 +136,45 @@ export declare class MutationCompiler {
|
|
|
95
136
|
}): MutationResult;
|
|
96
137
|
/**
|
|
97
138
|
* Generate DELETE Cypher with optional cascade.
|
|
139
|
+
*
|
|
140
|
+
* v2.3.0 — each cascaded relationship honours its per-item `where` and
|
|
141
|
+
* is gated by the TARGET type's `delete` policy (`buildNestedDelete`).
|
|
142
|
+
* Pre-2.3.0 the cascade iterated only the relationship KEYS: the
|
|
143
|
+
* documented `{ where }` was ignored, so every related node — shared
|
|
144
|
+
* ones included — was deleted, with no policy check.
|
|
98
145
|
*/
|
|
99
146
|
compileDelete(nodeDef: NodeDefinition, whereResult: {
|
|
100
147
|
cypher: string;
|
|
101
148
|
params: Record<string, unknown>;
|
|
102
149
|
preludes?: string[];
|
|
103
|
-
}, deleteInput?: Record<string, unknown
|
|
150
|
+
}, deleteInput?: Record<string, unknown>,
|
|
151
|
+
/** The caller's `delete` bundle; gates each cascade target. */
|
|
152
|
+
policyContext?: PolicyContextBundle,
|
|
153
|
+
/** Shared `param<N>` counter, continued from the root WHERE. */
|
|
154
|
+
paramCounter?: {
|
|
155
|
+
count: number;
|
|
156
|
+
}): MutationResult;
|
|
157
|
+
/**
|
|
158
|
+
* Nested / cascade delete of ONE relationship's targets (v2.3.0), shared
|
|
159
|
+
* by `compileDelete` (`Model.delete`'s `delete` input) and delete-inside-
|
|
160
|
+
* `update`. One subquery per spec item:
|
|
161
|
+
*
|
|
162
|
+
* <withClause>
|
|
163
|
+
* CALL {
|
|
164
|
+
* <withClause>
|
|
165
|
+
* MATCH (src)-[:REL]->(t)
|
|
166
|
+
* WHERE <item.where via WhereCompiler> AND <target `delete` policy>
|
|
167
|
+
* DETACH DELETE t
|
|
168
|
+
* RETURN count(*) AS _del_<tag>_<i>
|
|
169
|
+
* }
|
|
170
|
+
*
|
|
171
|
+
* `spec` is one item or an array (singular vs list relationships);
|
|
172
|
+
* `null` means "no cascade" (GraphQL InputMaybe). `{}` / no `where`
|
|
173
|
+
* deletes every related node the target's `delete` policy permits.
|
|
174
|
+
* A multi-level cascade (`delete` inside an item) and unknown item keys
|
|
175
|
+
* are rejected instead of silently ignored.
|
|
176
|
+
*/
|
|
177
|
+
private buildNestedDelete;
|
|
104
178
|
/**
|
|
105
179
|
* Generate MERGE (upsert) Cypher with ON CREATE SET / ON MATCH SET.
|
|
106
180
|
* Scalar properties only — nested relationship ops are not supported.
|
|
@@ -157,37 +231,26 @@ export declare class MutationCompiler {
|
|
|
157
231
|
* Returns the base property name and the Cypher expression template.
|
|
158
232
|
*/
|
|
159
233
|
private parseOperatorSuffix;
|
|
160
|
-
/**
|
|
161
|
-
* Build WHERE conditions for connect/disconnect operations.
|
|
162
|
-
* Handles operator suffixes (_IN, _NOT, _NOT_IN, _CONTAINS, etc.),
|
|
163
|
-
* NOT blocks, and relationship filters (_SOME, _NONE, _ALL, _SINGLE).
|
|
164
|
-
*
|
|
165
|
-
* @param targetNodeDef - Optional node definition for the target node.
|
|
166
|
-
* Required to resolve relationship filters like `configurations_SOME`.
|
|
167
|
-
* When omitted, relationship filters are silently skipped.
|
|
168
|
-
*/
|
|
169
|
-
private buildNodeWhereConditions;
|
|
170
|
-
/**
|
|
171
|
-
* Build WHERE conditions from a connection-level WHERE spec.
|
|
172
|
-
* Handles `node`, `NOT`, `AND`, `OR` at the connection level.
|
|
173
|
-
*
|
|
174
|
-
* Connection WHERE format: `{ node: {...}, NOT: { node: {...} }, AND: [...], OR: [...] }`
|
|
175
|
-
*/
|
|
176
|
-
private buildConnectionWhereConditions;
|
|
177
|
-
/** Counter for unique relationship filter variables within a single WHERE clause. */
|
|
178
|
-
private relFilterCounter;
|
|
179
|
-
/**
|
|
180
|
-
* Try to compile a relationship filter condition (_SOME, _NONE, _ALL, _SINGLE).
|
|
181
|
-
* Returns the Cypher expression string or null if the key is not a relationship filter.
|
|
182
|
-
*/
|
|
183
|
-
private tryBuildRelationshipFilter;
|
|
184
234
|
private buildGeneratedIdClause;
|
|
185
|
-
/**
|
|
186
|
-
* Check if any item in an array connect spec has relationship filters in its WHERE clause.
|
|
187
|
-
* Relationship filters require EXISTS subqueries which can't use UNWIND param references.
|
|
188
|
-
*/
|
|
189
|
-
private arrayConnectHasRelationshipFilters;
|
|
190
235
|
private extractConnectWhereConditions;
|
|
191
236
|
private extractEdgeProperties;
|
|
192
237
|
}
|
|
238
|
+
/**
|
|
239
|
+
* Map a nested-mutation connection where onto an equivalent NODE where on
|
|
240
|
+
* the target, for `WhereCompiler` (v2.3.0). Mutation `where` never supports
|
|
241
|
+
* edge filters, so the two shapes are interchangeable:
|
|
242
|
+
*
|
|
243
|
+
* { node: A } → A
|
|
244
|
+
* { node_NOT: A } → { NOT: A }
|
|
245
|
+
* { NOT: C } → { NOT: map(C) }
|
|
246
|
+
* { AND: [C…] } → { AND: [map(C)…] } (likewise OR; `OR: []`
|
|
247
|
+
* still matches nothing)
|
|
248
|
+
* bare properties → themselves (legacy `{ id: 'x' }` shape)
|
|
249
|
+
*
|
|
250
|
+
* `edge`/`edge_NOT` throw (unsupported in mutations). In a connection-
|
|
251
|
+
* shaped where, any other key throws too — the removed parallel builder
|
|
252
|
+
* silently IGNORED such keys (`{ id: 'x', NOT: {…} }` dropped `id`),
|
|
253
|
+
* widening the match.
|
|
254
|
+
*/
|
|
255
|
+
export declare function connectionWhereToNodeWhere(spec: Record<string, unknown>): Record<string, unknown>;
|
|
193
256
|
//# sourceMappingURL=mutation.compiler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutation.compiler.d.ts","sourceRoot":"","sources":["../../../src/compilers/mutation.compiler.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"mutation.compiler.d.ts","sourceRoot":"","sources":["../../../src/compilers/mutation.compiler.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGvD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CA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