@nicia-ai/typegraph 0.24.0 → 0.24.1
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/dist/backend/postgres/index.cjs +3 -3
- package/dist/backend/postgres/index.js +1 -1
- package/dist/backend/sqlite/index.cjs +3 -3
- package/dist/backend/sqlite/index.js +2 -2
- package/dist/backend/sqlite/libsql.cjs +3 -3
- package/dist/backend/sqlite/libsql.js +2 -2
- package/dist/backend/sqlite/local.cjs +4 -4
- package/dist/backend/sqlite/local.js +2 -2
- package/dist/{chunk-JYUQA77I.js → chunk-GFGVREHH.js} +3 -3
- package/dist/{chunk-JYUQA77I.js.map → chunk-GFGVREHH.js.map} +1 -1
- package/dist/{chunk-7TU5EWQ7.js → chunk-GUTQTMOV.js} +2 -2
- package/dist/chunk-GUTQTMOV.js.map +1 -0
- package/dist/{chunk-RS5OLGEW.js → chunk-LBORRUNJ.js} +2 -2
- package/dist/chunk-LBORRUNJ.js.map +1 -0
- package/dist/{chunk-WRWVWKQL.cjs → chunk-OLROXS2S.cjs} +2 -2
- package/dist/chunk-OLROXS2S.cjs.map +1 -0
- package/dist/{chunk-3MDBMCFF.cjs → chunk-OVJ2BE5Q.cjs} +5 -5
- package/dist/{chunk-3MDBMCFF.cjs.map → chunk-OVJ2BE5Q.cjs.map} +1 -1
- package/dist/{chunk-HRNQ3DVJ.cjs → chunk-PAUN562Y.cjs} +6 -6
- package/dist/{chunk-HRNQ3DVJ.cjs.map → chunk-PAUN562Y.cjs.map} +1 -1
- package/dist/{chunk-GTG5J4UP.js → chunk-QOLTW7OZ.js} +3 -3
- package/dist/{chunk-GTG5J4UP.js.map → chunk-QOLTW7OZ.js.map} +1 -1
- package/dist/{chunk-RNUNP5JD.cjs → chunk-SUHW2UYL.cjs} +2 -2
- package/dist/chunk-SUHW2UYL.cjs.map +1 -0
- package/dist/index.cjs +61 -61
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/interchange/index.cjs +6 -6
- package/dist/interchange/index.js +1 -1
- package/dist/schema/index.cjs +21 -21
- package/dist/schema/index.js +3 -3
- package/package.json +5 -5
- package/dist/chunk-7TU5EWQ7.js.map +0 -1
- package/dist/chunk-RNUNP5JD.cjs.map +0 -1
- package/dist/chunk-RS5OLGEW.js.map +0 -1
- package/dist/chunk-WRWVWKQL.cjs.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkHTGDWIDE_cjs = require('./chunk-HTGDWIDE.cjs');
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
4
|
+
var chunkPAUN562Y_cjs = require('./chunk-PAUN562Y.cjs');
|
|
5
|
+
var chunkOLROXS2S_cjs = require('./chunk-OLROXS2S.cjs');
|
|
6
|
+
var chunkSUHW2UYL_cjs = require('./chunk-SUHW2UYL.cjs');
|
|
7
7
|
var chunkO5PST6TB_cjs = require('./chunk-O5PST6TB.cjs');
|
|
8
8
|
var chunk3JK66E3I_cjs = require('./chunk-3JK66E3I.cjs');
|
|
9
9
|
var chunkUVZHTBZ5_cjs = require('./chunk-UVZHTBZ5.cjs');
|
|
@@ -112,7 +112,7 @@ function validateSchemaKeys(schema, name) {
|
|
|
112
112
|
function defineNode(name, options) {
|
|
113
113
|
validateSchemaKeys(options.schema, name);
|
|
114
114
|
return Object.freeze({
|
|
115
|
-
[
|
|
115
|
+
[chunkOLROXS2S_cjs.NODE_TYPE_BRAND]: true,
|
|
116
116
|
kind: name,
|
|
117
117
|
schema: options.schema,
|
|
118
118
|
description: options.description
|
|
@@ -131,7 +131,7 @@ function defineEdge(name, options) {
|
|
|
131
131
|
const schema = options?.schema ?? EMPTY_SCHEMA;
|
|
132
132
|
validateSchemaKeys2(schema, name);
|
|
133
133
|
return Object.freeze({
|
|
134
|
-
[
|
|
134
|
+
[chunkOLROXS2S_cjs.EDGE_TYPE_BRAND]: true,
|
|
135
135
|
kind: name,
|
|
136
136
|
schema,
|
|
137
137
|
description: options?.description,
|
|
@@ -151,7 +151,7 @@ function metaEdge(name, options = {}) {
|
|
|
151
151
|
description: options.description
|
|
152
152
|
};
|
|
153
153
|
return Object.freeze({
|
|
154
|
-
[
|
|
154
|
+
[chunkPAUN562Y_cjs.META_EDGE_BRAND]: true,
|
|
155
155
|
name,
|
|
156
156
|
properties
|
|
157
157
|
});
|
|
@@ -187,7 +187,7 @@ function createExternalRef(table) {
|
|
|
187
187
|
// src/ontology/core-meta-edges.ts
|
|
188
188
|
function createMetaEdge(name, properties) {
|
|
189
189
|
return Object.freeze({
|
|
190
|
-
[
|
|
190
|
+
[chunkPAUN562Y_cjs.META_EDGE_BRAND]: true,
|
|
191
191
|
name,
|
|
192
192
|
properties: {
|
|
193
193
|
transitive: properties.transitive ?? false,
|
|
@@ -199,7 +199,7 @@ function createMetaEdge(name, properties) {
|
|
|
199
199
|
}
|
|
200
200
|
});
|
|
201
201
|
}
|
|
202
|
-
var subClassOfMetaEdge = createMetaEdge(
|
|
202
|
+
var subClassOfMetaEdge = createMetaEdge(chunkPAUN562Y_cjs.META_EDGE_SUB_CLASS_OF, {
|
|
203
203
|
transitive: true,
|
|
204
204
|
inference: "subsumption",
|
|
205
205
|
description: "Type inheritance (Podcast subClassOf Media)"
|
|
@@ -211,9 +211,9 @@ function subClassOf(child, parent) {
|
|
|
211
211
|
to: parent
|
|
212
212
|
};
|
|
213
213
|
}
|
|
214
|
-
var broaderMetaEdge = createMetaEdge(
|
|
214
|
+
var broaderMetaEdge = createMetaEdge(chunkPAUN562Y_cjs.META_EDGE_BROADER, {
|
|
215
215
|
transitive: true,
|
|
216
|
-
inverse:
|
|
216
|
+
inverse: chunkPAUN562Y_cjs.META_EDGE_NARROWER,
|
|
217
217
|
inference: "hierarchy",
|
|
218
218
|
description: "Broader concept (ML broader AI)"
|
|
219
219
|
});
|
|
@@ -224,9 +224,9 @@ function broader(narrowerConcept, broaderConcept) {
|
|
|
224
224
|
to: broaderConcept
|
|
225
225
|
};
|
|
226
226
|
}
|
|
227
|
-
var narrowerMetaEdge = createMetaEdge(
|
|
227
|
+
var narrowerMetaEdge = createMetaEdge(chunkPAUN562Y_cjs.META_EDGE_NARROWER, {
|
|
228
228
|
transitive: true,
|
|
229
|
-
inverse:
|
|
229
|
+
inverse: chunkPAUN562Y_cjs.META_EDGE_BROADER,
|
|
230
230
|
inference: "hierarchy",
|
|
231
231
|
description: "Narrower concept (AI narrower ML)"
|
|
232
232
|
});
|
|
@@ -237,7 +237,7 @@ function narrower(broaderConcept, narrowerConcept) {
|
|
|
237
237
|
to: narrowerConcept
|
|
238
238
|
};
|
|
239
239
|
}
|
|
240
|
-
var relatedToMetaEdge = createMetaEdge(
|
|
240
|
+
var relatedToMetaEdge = createMetaEdge(chunkPAUN562Y_cjs.META_EDGE_RELATED_TO, {
|
|
241
241
|
symmetric: true,
|
|
242
242
|
inference: "association",
|
|
243
243
|
description: "Non-hierarchical association"
|
|
@@ -249,7 +249,7 @@ function relatedTo(conceptA, conceptB) {
|
|
|
249
249
|
to: conceptB
|
|
250
250
|
};
|
|
251
251
|
}
|
|
252
|
-
var equivalentToMetaEdge = createMetaEdge(
|
|
252
|
+
var equivalentToMetaEdge = createMetaEdge(chunkPAUN562Y_cjs.META_EDGE_EQUIVALENT_TO, {
|
|
253
253
|
symmetric: true,
|
|
254
254
|
transitive: true,
|
|
255
255
|
inference: "substitution",
|
|
@@ -262,7 +262,7 @@ function equivalentTo(kindA, kindBOrIri) {
|
|
|
262
262
|
to: kindBOrIri
|
|
263
263
|
};
|
|
264
264
|
}
|
|
265
|
-
var sameAsMetaEdge = createMetaEdge(
|
|
265
|
+
var sameAsMetaEdge = createMetaEdge(chunkPAUN562Y_cjs.META_EDGE_SAME_AS, {
|
|
266
266
|
symmetric: true,
|
|
267
267
|
transitive: true,
|
|
268
268
|
inference: "substitution",
|
|
@@ -275,7 +275,7 @@ function sameAs(kindA, kindBOrIri) {
|
|
|
275
275
|
to: kindBOrIri
|
|
276
276
|
};
|
|
277
277
|
}
|
|
278
|
-
var differentFromMetaEdge = createMetaEdge(
|
|
278
|
+
var differentFromMetaEdge = createMetaEdge(chunkPAUN562Y_cjs.META_EDGE_DIFFERENT_FROM, {
|
|
279
279
|
symmetric: true,
|
|
280
280
|
inference: "constraint",
|
|
281
281
|
description: "Explicitly different individuals"
|
|
@@ -287,7 +287,7 @@ function differentFrom(kindA, kindB) {
|
|
|
287
287
|
to: kindB
|
|
288
288
|
};
|
|
289
289
|
}
|
|
290
|
-
var disjointWithMetaEdge = createMetaEdge(
|
|
290
|
+
var disjointWithMetaEdge = createMetaEdge(chunkPAUN562Y_cjs.META_EDGE_DISJOINT_WITH, {
|
|
291
291
|
symmetric: true,
|
|
292
292
|
inference: "constraint",
|
|
293
293
|
description: "Mutually exclusive types"
|
|
@@ -299,9 +299,9 @@ function disjointWith(kindA, kindB) {
|
|
|
299
299
|
to: kindB
|
|
300
300
|
};
|
|
301
301
|
}
|
|
302
|
-
var partOfMetaEdge = createMetaEdge(
|
|
302
|
+
var partOfMetaEdge = createMetaEdge(chunkPAUN562Y_cjs.META_EDGE_PART_OF, {
|
|
303
303
|
transitive: true,
|
|
304
|
-
inverse:
|
|
304
|
+
inverse: chunkPAUN562Y_cjs.META_EDGE_HAS_PART,
|
|
305
305
|
inference: "composition",
|
|
306
306
|
description: "X is part of Y"
|
|
307
307
|
});
|
|
@@ -312,9 +312,9 @@ function partOf(part, whole) {
|
|
|
312
312
|
to: whole
|
|
313
313
|
};
|
|
314
314
|
}
|
|
315
|
-
var hasPartMetaEdge = createMetaEdge(
|
|
315
|
+
var hasPartMetaEdge = createMetaEdge(chunkPAUN562Y_cjs.META_EDGE_HAS_PART, {
|
|
316
316
|
transitive: true,
|
|
317
|
-
inverse:
|
|
317
|
+
inverse: chunkPAUN562Y_cjs.META_EDGE_PART_OF,
|
|
318
318
|
inference: "composition",
|
|
319
319
|
description: "Y has part X"
|
|
320
320
|
});
|
|
@@ -325,12 +325,12 @@ function hasPart(whole, part) {
|
|
|
325
325
|
to: part
|
|
326
326
|
};
|
|
327
327
|
}
|
|
328
|
-
var inverseOfMetaEdge = createMetaEdge(
|
|
328
|
+
var inverseOfMetaEdge = createMetaEdge(chunkPAUN562Y_cjs.META_EDGE_INVERSE_OF, {
|
|
329
329
|
symmetric: true,
|
|
330
330
|
inference: "none",
|
|
331
331
|
description: "Edge A is inverse of edge B"
|
|
332
332
|
});
|
|
333
|
-
var impliesMetaEdge = createMetaEdge(
|
|
333
|
+
var impliesMetaEdge = createMetaEdge(chunkPAUN562Y_cjs.META_EDGE_IMPLIES, {
|
|
334
334
|
transitive: true,
|
|
335
335
|
inference: "none",
|
|
336
336
|
description: "Edge A implies edge B exists"
|
|
@@ -9549,12 +9549,12 @@ function createQueryBuilder(graphId, registry, options) {
|
|
|
9549
9549
|
function buildKindRegistry(graph) {
|
|
9550
9550
|
const nodeTypes = extractNodeTypes(graph);
|
|
9551
9551
|
const edgeTypes = extractEdgeTypes(graph);
|
|
9552
|
-
const closures = graph.ontology.length > 0 ?
|
|
9553
|
-
return new
|
|
9552
|
+
const closures = graph.ontology.length > 0 ? chunkPAUN562Y_cjs.computeClosuresFromOntology(graph.ontology) : chunkPAUN562Y_cjs.createEmptyClosures();
|
|
9553
|
+
return new chunkPAUN562Y_cjs.KindRegistry(nodeTypes, edgeTypes, closures);
|
|
9554
9554
|
}
|
|
9555
9555
|
function extractNodeTypes(graph) {
|
|
9556
9556
|
const result = /* @__PURE__ */ new Map();
|
|
9557
|
-
for (const typeName of
|
|
9557
|
+
for (const typeName of chunkOLROXS2S_cjs.getNodeKinds(graph)) {
|
|
9558
9558
|
const registration = graph.nodes[typeName];
|
|
9559
9559
|
result.set(typeName, registration.type);
|
|
9560
9560
|
}
|
|
@@ -9562,7 +9562,7 @@ function extractNodeTypes(graph) {
|
|
|
9562
9562
|
}
|
|
9563
9563
|
function extractEdgeTypes(graph) {
|
|
9564
9564
|
const result = /* @__PURE__ */ new Map();
|
|
9565
|
-
for (const typeName of
|
|
9565
|
+
for (const typeName of chunkOLROXS2S_cjs.getEdgeKinds(graph)) {
|
|
9566
9566
|
const registration = graph.edges[typeName];
|
|
9567
9567
|
result.set(typeName, registration.type);
|
|
9568
9568
|
}
|
|
@@ -9982,7 +9982,7 @@ function createEdgeCollection(config) {
|
|
|
9982
9982
|
temporalMode: mode
|
|
9983
9983
|
};
|
|
9984
9984
|
if (mode === "current" || mode === "asOf") {
|
|
9985
|
-
params.asOf = options?.asOf ??
|
|
9985
|
+
params.asOf = options?.asOf ?? chunkOLROXS2S_cjs.nowIso();
|
|
9986
9986
|
}
|
|
9987
9987
|
if (options?.from?.kind !== void 0)
|
|
9988
9988
|
params.fromKind = options.from.kind;
|
|
@@ -10003,7 +10003,7 @@ function createEdgeCollection(config) {
|
|
|
10003
10003
|
temporalMode: mode
|
|
10004
10004
|
};
|
|
10005
10005
|
if (mode === "current" || mode === "asOf") {
|
|
10006
|
-
params.asOf = options?.asOf ??
|
|
10006
|
+
params.asOf = options?.asOf ?? chunkOLROXS2S_cjs.nowIso();
|
|
10007
10007
|
}
|
|
10008
10008
|
if (options?.from?.kind !== void 0)
|
|
10009
10009
|
params.fromKind = options.from.kind;
|
|
@@ -10284,7 +10284,7 @@ function createNodeCollection(config) {
|
|
|
10284
10284
|
const mode2 = options.temporalMode ?? defaultTemporalMode;
|
|
10285
10285
|
let query = createQuery().from(kind, "_n").temporal(
|
|
10286
10286
|
mode2,
|
|
10287
|
-
mode2 === "asOf" ? options.asOf ??
|
|
10287
|
+
mode2 === "asOf" ? options.asOf ?? chunkOLROXS2S_cjs.nowIso() : void 0
|
|
10288
10288
|
).whereNode("_n", options.where).select((ctx) => ctx._n);
|
|
10289
10289
|
if (options.limit !== void 0) query = query.limit(options.limit);
|
|
10290
10290
|
if (options.offset !== void 0) query = query.offset(options.offset);
|
|
@@ -10299,7 +10299,7 @@ function createNodeCollection(config) {
|
|
|
10299
10299
|
temporalMode: mode
|
|
10300
10300
|
};
|
|
10301
10301
|
if (mode === "current" || mode === "asOf") {
|
|
10302
|
-
params.asOf = options?.asOf ??
|
|
10302
|
+
params.asOf = options?.asOf ?? chunkOLROXS2S_cjs.nowIso();
|
|
10303
10303
|
}
|
|
10304
10304
|
if (options?.limit !== void 0) params.limit = options.limit;
|
|
10305
10305
|
if (options?.offset !== void 0) params.offset = options.offset;
|
|
@@ -10315,7 +10315,7 @@ function createNodeCollection(config) {
|
|
|
10315
10315
|
temporalMode: mode
|
|
10316
10316
|
};
|
|
10317
10317
|
if (mode === "current" || mode === "asOf") {
|
|
10318
|
-
params.asOf = options?.asOf ??
|
|
10318
|
+
params.asOf = options?.asOf ?? chunkOLROXS2S_cjs.nowIso();
|
|
10319
10319
|
}
|
|
10320
10320
|
return backend.countNodesByKind(params);
|
|
10321
10321
|
},
|
|
@@ -10942,12 +10942,12 @@ async function validateAndPrepareEdgeCreate(ctx, input, id, backend) {
|
|
|
10942
10942
|
nodeId: input.toId
|
|
10943
10943
|
});
|
|
10944
10944
|
}
|
|
10945
|
-
const validatedProps =
|
|
10945
|
+
const validatedProps = chunkPAUN562Y_cjs.validateEdgeProps(edgeKind.schema, input.props, {
|
|
10946
10946
|
kind,
|
|
10947
10947
|
operation: "create"
|
|
10948
10948
|
});
|
|
10949
|
-
const validFrom =
|
|
10950
|
-
const validTo =
|
|
10949
|
+
const validFrom = chunkOLROXS2S_cjs.validateOptionalIsoDate(input.validFrom, "validFrom");
|
|
10950
|
+
const validTo = chunkOLROXS2S_cjs.validateOptionalIsoDate(input.validTo, "validTo");
|
|
10951
10951
|
const cardinality = registration.cardinality ?? "many";
|
|
10952
10952
|
const constraintContext = {
|
|
10953
10953
|
graphId: ctx.graphId,
|
|
@@ -11092,12 +11092,12 @@ async function executeEdgeUpdate(ctx, input, backend) {
|
|
|
11092
11092
|
const edgeKind = registration.type;
|
|
11093
11093
|
const existingProps = JSON.parse(existing.props);
|
|
11094
11094
|
const mergedProps = { ...existingProps, ...input.props };
|
|
11095
|
-
const validatedProps =
|
|
11095
|
+
const validatedProps = chunkPAUN562Y_cjs.validateEdgeProps(edgeKind.schema, mergedProps, {
|
|
11096
11096
|
kind: existing.kind,
|
|
11097
11097
|
operation: "update",
|
|
11098
11098
|
id
|
|
11099
11099
|
});
|
|
11100
|
-
const validTo =
|
|
11100
|
+
const validTo = chunkOLROXS2S_cjs.validateOptionalIsoDate(input.validTo, "validTo");
|
|
11101
11101
|
const updateParams = {
|
|
11102
11102
|
graphId: ctx.graphId,
|
|
11103
11103
|
id,
|
|
@@ -11118,12 +11118,12 @@ async function executeEdgeUpsertUpdate(ctx, input, backend, options) {
|
|
|
11118
11118
|
const edgeKind = registration.type;
|
|
11119
11119
|
const existingProps = JSON.parse(existing.props);
|
|
11120
11120
|
const mergedProps = { ...existingProps, ...input.props };
|
|
11121
|
-
const validatedProps =
|
|
11121
|
+
const validatedProps = chunkPAUN562Y_cjs.validateEdgeProps(edgeKind.schema, mergedProps, {
|
|
11122
11122
|
kind: existing.kind,
|
|
11123
11123
|
operation: "update",
|
|
11124
11124
|
id
|
|
11125
11125
|
});
|
|
11126
|
-
const validTo =
|
|
11126
|
+
const validTo = chunkOLROXS2S_cjs.validateOptionalIsoDate(input.validTo, "validTo");
|
|
11127
11127
|
const updateParams = {
|
|
11128
11128
|
graphId: ctx.graphId,
|
|
11129
11129
|
id,
|
|
@@ -11275,7 +11275,7 @@ async function executeEdgeGetOrCreateByEndpoints(ctx, kind, fromKind, fromId, to
|
|
|
11275
11275
|
const matchOn = options?.matchOn ?? [];
|
|
11276
11276
|
const registration = getEdgeRegistration(ctx.graph, kind);
|
|
11277
11277
|
const edgeKind = registration.type;
|
|
11278
|
-
const validatedProps =
|
|
11278
|
+
const validatedProps = chunkPAUN562Y_cjs.validateEdgeProps(edgeKind.schema, props, {
|
|
11279
11279
|
kind,
|
|
11280
11280
|
operation: "create"
|
|
11281
11281
|
});
|
|
@@ -11357,7 +11357,7 @@ async function executeEdgeBulkGetOrCreateByEndpoints(ctx, kind, items, backend,
|
|
|
11357
11357
|
validateMatchOnFields(edgeKind.schema, matchOn, kind);
|
|
11358
11358
|
const validated = [];
|
|
11359
11359
|
for (const item of items) {
|
|
11360
|
-
const validatedProps =
|
|
11360
|
+
const validatedProps = chunkPAUN562Y_cjs.validateEdgeProps(edgeKind.schema, item.props, {
|
|
11361
11361
|
kind,
|
|
11362
11362
|
operation: "create"
|
|
11363
11363
|
});
|
|
@@ -12004,12 +12004,12 @@ async function validateAndPrepareNodeCreate(ctx, input, id, backend) {
|
|
|
12004
12004
|
const kind = input.kind;
|
|
12005
12005
|
const registration = getNodeRegistration(ctx.graph, kind);
|
|
12006
12006
|
const nodeKind = registration.type;
|
|
12007
|
-
const validatedProps =
|
|
12007
|
+
const validatedProps = chunkPAUN562Y_cjs.validateNodeProps(nodeKind.schema, input.props, {
|
|
12008
12008
|
kind,
|
|
12009
12009
|
operation: "create"
|
|
12010
12010
|
});
|
|
12011
|
-
const validFrom =
|
|
12012
|
-
const validTo =
|
|
12011
|
+
const validFrom = chunkOLROXS2S_cjs.validateOptionalIsoDate(input.validFrom, "validFrom");
|
|
12012
|
+
const validTo = chunkOLROXS2S_cjs.validateOptionalIsoDate(input.validTo, "validTo");
|
|
12013
12013
|
const existingNode = await backend.getNode(ctx.graphId, kind, id);
|
|
12014
12014
|
if (existingNode && !existingNode.deleted_at) {
|
|
12015
12015
|
throw createNodeAlreadyExistsError(kind, id);
|
|
@@ -12078,12 +12078,12 @@ async function performNodeUpdate(ctx, input, backend, options) {
|
|
|
12078
12078
|
const existingProps = JSON.parse(existing.props);
|
|
12079
12079
|
const mergedProps = { ...existingProps, ...input.props };
|
|
12080
12080
|
const nodeKind = registration.type;
|
|
12081
|
-
const validatedProps =
|
|
12081
|
+
const validatedProps = chunkPAUN562Y_cjs.validateNodeProps(nodeKind.schema, mergedProps, {
|
|
12082
12082
|
kind,
|
|
12083
12083
|
operation: "update",
|
|
12084
12084
|
id
|
|
12085
12085
|
});
|
|
12086
|
-
const validTo =
|
|
12086
|
+
const validTo = chunkOLROXS2S_cjs.validateOptionalIsoDate(input.validTo, "validTo");
|
|
12087
12087
|
await updateUniquenessEntries(
|
|
12088
12088
|
createUniquenessContext(ctx.graphId, ctx.registry, backend),
|
|
12089
12089
|
kind,
|
|
@@ -12351,7 +12351,7 @@ async function executeNodeGetOrCreateByConstraint(ctx, kind, constraintName, pro
|
|
|
12351
12351
|
const ifExists = options?.ifExists ?? "return";
|
|
12352
12352
|
const registration = getNodeRegistration(ctx.graph, kind);
|
|
12353
12353
|
const nodeKind = registration.type;
|
|
12354
|
-
const validatedProps =
|
|
12354
|
+
const validatedProps = chunkPAUN562Y_cjs.validateNodeProps(nodeKind.schema, props, {
|
|
12355
12355
|
kind,
|
|
12356
12356
|
operation: "create"
|
|
12357
12357
|
});
|
|
@@ -12423,7 +12423,7 @@ async function executeNodeGetOrCreateByConstraint(ctx, kind, constraintName, pro
|
|
|
12423
12423
|
async function executeNodeFindByConstraint(ctx, kind, constraintName, props, backend) {
|
|
12424
12424
|
const registration = getNodeRegistration(ctx.graph, kind);
|
|
12425
12425
|
const nodeKind = registration.type;
|
|
12426
|
-
const validatedProps =
|
|
12426
|
+
const validatedProps = chunkPAUN562Y_cjs.validateNodeProps(nodeKind.schema, props, {
|
|
12427
12427
|
kind,
|
|
12428
12428
|
operation: "create"
|
|
12429
12429
|
});
|
|
@@ -12460,7 +12460,7 @@ async function executeNodeFindByConstraint(ctx, kind, constraintName, props, bac
|
|
|
12460
12460
|
function validateAndComputeKeys(nodeKind, kind, constraint, items) {
|
|
12461
12461
|
const validated = [];
|
|
12462
12462
|
for (const item of items) {
|
|
12463
|
-
const validatedProps =
|
|
12463
|
+
const validatedProps = chunkPAUN562Y_cjs.validateNodeProps(nodeKind.schema, item.props, {
|
|
12464
12464
|
kind,
|
|
12465
12465
|
operation: "create"
|
|
12466
12466
|
});
|
|
@@ -12754,7 +12754,7 @@ async function rebuildFulltextIndex(ctx, nodeKind, options) {
|
|
|
12754
12754
|
}
|
|
12755
12755
|
}
|
|
12756
12756
|
};
|
|
12757
|
-
await
|
|
12757
|
+
await chunkSUHW2UYL_cjs.runOptionallyInTransaction(backend, writePage);
|
|
12758
12758
|
processed += rows.length;
|
|
12759
12759
|
upserted += pageResult.toUpsert.length;
|
|
12760
12760
|
cleared += pageResult.toDelete.length;
|
|
@@ -13472,7 +13472,7 @@ var Store = class {
|
|
|
13472
13472
|
* @returns A tuple with per-query typed results, preserving input order
|
|
13473
13473
|
*/
|
|
13474
13474
|
async batch(...queries) {
|
|
13475
|
-
return
|
|
13475
|
+
return chunkSUHW2UYL_cjs.runOptionallyInTransaction(this.#backend, async (target) => {
|
|
13476
13476
|
const results = [];
|
|
13477
13477
|
for (const query of queries) {
|
|
13478
13478
|
const result = await query.executeOn(target);
|
|
@@ -13703,7 +13703,7 @@ var Store = class {
|
|
|
13703
13703
|
// === Internal: Temporal Filtering ===
|
|
13704
13704
|
#matchesTemporalMode(row, options) {
|
|
13705
13705
|
const mode = options?.temporalMode ?? this.#graph.defaults.temporalMode;
|
|
13706
|
-
const asOf = options?.asOf ??
|
|
13706
|
+
const asOf = options?.asOf ?? chunkOLROXS2S_cjs.nowIso();
|
|
13707
13707
|
switch (mode) {
|
|
13708
13708
|
case "current":
|
|
13709
13709
|
case "asOf": {
|
|
@@ -13736,41 +13736,41 @@ function createStore(graph, backend, options) {
|
|
|
13736
13736
|
}
|
|
13737
13737
|
async function createStoreWithSchema(graph, backend, options) {
|
|
13738
13738
|
const store = createStore(graph, backend, options);
|
|
13739
|
-
const result = await
|
|
13739
|
+
const result = await chunkPAUN562Y_cjs.ensureSchema(backend, graph, options);
|
|
13740
13740
|
return [store, result];
|
|
13741
13741
|
}
|
|
13742
13742
|
|
|
13743
13743
|
Object.defineProperty(exports, "isMetaEdge", {
|
|
13744
13744
|
enumerable: true,
|
|
13745
|
-
get: function () { return
|
|
13745
|
+
get: function () { return chunkPAUN562Y_cjs.isMetaEdge; }
|
|
13746
13746
|
});
|
|
13747
13747
|
Object.defineProperty(exports, "defineGraph", {
|
|
13748
13748
|
enumerable: true,
|
|
13749
|
-
get: function () { return
|
|
13749
|
+
get: function () { return chunkOLROXS2S_cjs.defineGraph; }
|
|
13750
13750
|
});
|
|
13751
13751
|
Object.defineProperty(exports, "getEdgeKinds", {
|
|
13752
13752
|
enumerable: true,
|
|
13753
|
-
get: function () { return
|
|
13753
|
+
get: function () { return chunkOLROXS2S_cjs.getEdgeKinds; }
|
|
13754
13754
|
});
|
|
13755
13755
|
Object.defineProperty(exports, "getNodeKinds", {
|
|
13756
13756
|
enumerable: true,
|
|
13757
|
-
get: function () { return
|
|
13757
|
+
get: function () { return chunkOLROXS2S_cjs.getNodeKinds; }
|
|
13758
13758
|
});
|
|
13759
13759
|
Object.defineProperty(exports, "isEdgeType", {
|
|
13760
13760
|
enumerable: true,
|
|
13761
|
-
get: function () { return
|
|
13761
|
+
get: function () { return chunkOLROXS2S_cjs.isEdgeType; }
|
|
13762
13762
|
});
|
|
13763
13763
|
Object.defineProperty(exports, "isEdgeTypeWithEndpoints", {
|
|
13764
13764
|
enumerable: true,
|
|
13765
|
-
get: function () { return
|
|
13765
|
+
get: function () { return chunkOLROXS2S_cjs.isEdgeTypeWithEndpoints; }
|
|
13766
13766
|
});
|
|
13767
13767
|
Object.defineProperty(exports, "isGraphDef", {
|
|
13768
13768
|
enumerable: true,
|
|
13769
|
-
get: function () { return
|
|
13769
|
+
get: function () { return chunkOLROXS2S_cjs.isGraphDef; }
|
|
13770
13770
|
});
|
|
13771
13771
|
Object.defineProperty(exports, "isNodeType", {
|
|
13772
13772
|
enumerable: true,
|
|
13773
|
-
get: function () { return
|
|
13773
|
+
get: function () { return chunkOLROXS2S_cjs.isNodeType; }
|
|
13774
13774
|
});
|
|
13775
13775
|
Object.defineProperty(exports, "BackendDisposedError", {
|
|
13776
13776
|
enumerable: true,
|