@nicia-ai/typegraph 0.38.0 → 0.39.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.
Files changed (95) hide show
  1. package/dist/backend/postgres/index.cjs +16 -16
  2. package/dist/backend/postgres/index.js +3 -3
  3. package/dist/backend/postgres/pglite-store.cjs +11 -11
  4. package/dist/backend/postgres/pglite-store.d.cts +1 -1
  5. package/dist/backend/postgres/pglite-store.d.ts +1 -1
  6. package/dist/backend/postgres/pglite-store.js +8 -8
  7. package/dist/backend/postgres/pglite.cjs +5 -5
  8. package/dist/backend/postgres/pglite.js +4 -4
  9. package/dist/backend/sqlite/index.cjs +6 -6
  10. package/dist/backend/sqlite/index.js +3 -3
  11. package/dist/backend/sqlite/libsql.cjs +5 -5
  12. package/dist/backend/sqlite/libsql.js +3 -3
  13. package/dist/backend/sqlite/local-store.cjs +11 -11
  14. package/dist/backend/sqlite/local-store.d.cts +1 -1
  15. package/dist/backend/sqlite/local-store.d.ts +1 -1
  16. package/dist/backend/sqlite/local-store.js +9 -9
  17. package/dist/backend/sqlite/local.cjs +6 -6
  18. package/dist/backend/sqlite/local.js +4 -4
  19. package/dist/{chunk-UPXDVI3T.js → chunk-3SK4SVTW.js} +3 -3
  20. package/dist/{chunk-UPXDVI3T.js.map → chunk-3SK4SVTW.js.map} +1 -1
  21. package/dist/{chunk-NU23DUSJ.cjs → chunk-3YFDFOYB.cjs} +7 -7
  22. package/dist/{chunk-NU23DUSJ.cjs.map → chunk-3YFDFOYB.cjs.map} +1 -1
  23. package/dist/{chunk-NWYCOFEZ.cjs → chunk-5ELKD2FQ.cjs} +4 -4
  24. package/dist/chunk-5ELKD2FQ.cjs.map +1 -0
  25. package/dist/{chunk-2SL7OGPR.cjs → chunk-6SRLCSAV.cjs} +478 -338
  26. package/dist/chunk-6SRLCSAV.cjs.map +1 -0
  27. package/dist/{chunk-A2FGSWMQ.js → chunk-CBK2IVI2.js} +167 -27
  28. package/dist/chunk-CBK2IVI2.js.map +1 -0
  29. package/dist/{chunk-TE5ZA4VX.js → chunk-DOKUXLFH.js} +14 -10
  30. package/dist/chunk-DOKUXLFH.js.map +1 -0
  31. package/dist/{chunk-KCLZHYPU.cjs → chunk-E2Q7SP2K.cjs} +52 -52
  32. package/dist/{chunk-KCLZHYPU.cjs.map → chunk-E2Q7SP2K.cjs.map} +1 -1
  33. package/dist/{chunk-YLINFV7Z.cjs → chunk-GKQU44SQ.cjs} +67 -63
  34. package/dist/chunk-GKQU44SQ.cjs.map +1 -0
  35. package/dist/{chunk-O5H62ZWJ.cjs → chunk-HP6LWBLB.cjs} +14 -2
  36. package/dist/chunk-HP6LWBLB.cjs.map +1 -0
  37. package/dist/{chunk-7VLCN3JB.cjs → chunk-HTQOBY75.cjs} +59 -59
  38. package/dist/{chunk-7VLCN3JB.cjs.map → chunk-HTQOBY75.cjs.map} +1 -1
  39. package/dist/{chunk-RQPRCEIO.js → chunk-IFDXG2YJ.js} +3 -3
  40. package/dist/chunk-IFDXG2YJ.js.map +1 -0
  41. package/dist/{chunk-YJDSPA5E.js → chunk-IFRPHG7O.js} +4 -4
  42. package/dist/{chunk-YJDSPA5E.js.map → chunk-IFRPHG7O.js.map} +1 -1
  43. package/dist/{chunk-LZ3TVJY4.cjs → chunk-JD2YC62H.cjs} +17 -17
  44. package/dist/{chunk-LZ3TVJY4.cjs.map → chunk-JD2YC62H.cjs.map} +1 -1
  45. package/dist/{chunk-XD6X7O5R.js → chunk-KAFXPB2L.js} +4 -4
  46. package/dist/{chunk-XD6X7O5R.js.map → chunk-KAFXPB2L.js.map} +1 -1
  47. package/dist/{chunk-ZHX4KEM7.cjs → chunk-KIZSHRUI.cjs} +7 -7
  48. package/dist/{chunk-ZHX4KEM7.cjs.map → chunk-KIZSHRUI.cjs.map} +1 -1
  49. package/dist/{chunk-G32AO634.js → chunk-KXFUQNF2.js} +3 -3
  50. package/dist/{chunk-G32AO634.js.map → chunk-KXFUQNF2.js.map} +1 -1
  51. package/dist/{chunk-E6YZRKMM.js → chunk-NQBYTLPW.js} +4 -4
  52. package/dist/{chunk-E6YZRKMM.js.map → chunk-NQBYTLPW.js.map} +1 -1
  53. package/dist/{chunk-VBH7ZXSZ.js → chunk-SU7VQOJ3.js} +3 -3
  54. package/dist/{chunk-VBH7ZXSZ.js.map → chunk-SU7VQOJ3.js.map} +1 -1
  55. package/dist/{chunk-KFLXWVUJ.js → chunk-UUIBACKJ.js} +14 -3
  56. package/dist/chunk-UUIBACKJ.js.map +1 -0
  57. package/dist/{chunk-CQC6VBAF.cjs → chunk-VXAFOF6Z.cjs} +5 -5
  58. package/dist/{chunk-CQC6VBAF.cjs.map → chunk-VXAFOF6Z.cjs.map} +1 -1
  59. package/dist/{chunk-XFY73JWD.cjs → chunk-Y6UA55YS.cjs} +5 -5
  60. package/dist/{chunk-XFY73JWD.cjs.map → chunk-Y6UA55YS.cjs.map} +1 -1
  61. package/dist/{chunk-6G5CQ6JX.js → chunk-YPUNPG2T.js} +4 -4
  62. package/dist/{chunk-6G5CQ6JX.js.map → chunk-YPUNPG2T.js.map} +1 -1
  63. package/dist/graph-merge/index.cjs +30 -32
  64. package/dist/graph-merge/index.cjs.map +1 -1
  65. package/dist/graph-merge/index.d.cts +10 -5
  66. package/dist/graph-merge/index.d.ts +10 -5
  67. package/dist/graph-merge/index.js +9 -11
  68. package/dist/graph-merge/index.js.map +1 -1
  69. package/dist/index.cjs +68 -68
  70. package/dist/index.d.cts +2 -2
  71. package/dist/index.d.ts +2 -2
  72. package/dist/index.js +5 -5
  73. package/dist/interchange/index.cjs +23 -23
  74. package/dist/interchange/index.d.cts +1 -1
  75. package/dist/interchange/index.d.ts +1 -1
  76. package/dist/interchange/index.js +4 -4
  77. package/dist/profiler/index.d.cts +1 -1
  78. package/dist/profiler/index.d.ts +1 -1
  79. package/dist/provenance/index.cjs +11 -11
  80. package/dist/provenance/index.d.cts +1 -1
  81. package/dist/provenance/index.d.ts +1 -1
  82. package/dist/provenance/index.js +2 -2
  83. package/dist/schema/index.cjs +22 -22
  84. package/dist/schema/index.js +3 -3
  85. package/dist/{store-view-BoHqdHjB.d.cts → store-view-BJd6Vwpt.d.cts} +39 -17
  86. package/dist/{store-view-Ctq-3OHy.d.ts → store-view-CLIhwMMX.d.ts} +39 -17
  87. package/package.json +1 -1
  88. package/dist/chunk-2SL7OGPR.cjs.map +0 -1
  89. package/dist/chunk-A2FGSWMQ.js.map +0 -1
  90. package/dist/chunk-KFLXWVUJ.js.map +0 -1
  91. package/dist/chunk-NWYCOFEZ.cjs.map +0 -1
  92. package/dist/chunk-O5H62ZWJ.cjs.map +0 -1
  93. package/dist/chunk-RQPRCEIO.js.map +0 -1
  94. package/dist/chunk-TE5ZA4VX.js.map +0 -1
  95. package/dist/chunk-YLINFV7Z.cjs.map +0 -1
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkNWYCOFEZ_cjs = require('./chunk-NWYCOFEZ.cjs');
3
+ var chunk5ELKD2FQ_cjs = require('./chunk-5ELKD2FQ.cjs');
4
4
  var chunkGNPGGLAE_cjs = require('./chunk-GNPGGLAE.cjs');
5
5
  var chunkX4PVHAZ6_cjs = require('./chunk-X4PVHAZ6.cjs');
6
6
  var chunkACSVZPK7_cjs = require('./chunk-ACSVZPK7.cjs');
@@ -64,10 +64,10 @@ function rowToEdgeMeta(row) {
64
64
  function runInWriteTransaction(ctx, backend, fn) {
65
65
  const ownsWriteLock = "transaction" in backend && backend.capabilities.transactions;
66
66
  return chunkGNPGGLAE_cjs.runOptionallyInTransaction(backend, async (target) => {
67
- const lock = ctx.historyEnabled || ctx.revisionTrackingEnabled ? await chunkNWYCOFEZ_cjs.lockRecordedGraphWrite(target, ctx.graphId) : chunkNWYCOFEZ_cjs.uncapturedGraphWriteLock();
67
+ const lock = ctx.historyEnabled || ctx.revisionTrackingEnabled ? await chunk5ELKD2FQ_cjs.lockRecordedGraphWrite(target, ctx.graphId) : chunk5ELKD2FQ_cjs.uncapturedGraphWriteLock();
68
68
  const result = await fn(target, lock);
69
69
  if (ctx.revisionTrackingEnabled && !ctx.historyEnabled) {
70
- await chunkNWYCOFEZ_cjs.advanceRevisionClock(
70
+ await chunk5ELKD2FQ_cjs.advanceRevisionClock(
71
71
  target,
72
72
  ctx.revisionSchema,
73
73
  ctx.graphId,
@@ -90,7 +90,7 @@ async function checkDisjointnessConstraint(ctx, kind, id) {
90
90
  for (const disjointKind of disjointKinds) {
91
91
  const existing = await ctx.backend.getNode(ctx.graphId, disjointKind, id);
92
92
  if (existing && !existing.deleted_at) {
93
- const error = chunkNWYCOFEZ_cjs.checkDisjointness(id, kind, [disjointKind], ctx.registry);
93
+ const error = chunk5ELKD2FQ_cjs.checkDisjointness(id, kind, [disjointKind], ctx.registry);
94
94
  if (error) throw error;
95
95
  }
96
96
  }
@@ -107,7 +107,7 @@ async function checkCardinalityConstraint(ctx, edgeKind, cardinality, fromKind,
107
107
  fromKind,
108
108
  fromId
109
109
  });
110
- const error = chunkNWYCOFEZ_cjs.checkCardinality(
110
+ const error = chunk5ELKD2FQ_cjs.checkCardinality(
111
111
  edgeKind,
112
112
  fromKind,
113
113
  fromId,
@@ -127,7 +127,7 @@ async function checkCardinalityConstraint(ctx, edgeKind, cardinality, fromKind,
127
127
  toKind,
128
128
  toId
129
129
  });
130
- const error = chunkNWYCOFEZ_cjs.checkUniqueEdge(
130
+ const error = chunk5ELKD2FQ_cjs.checkUniqueEdge(
131
131
  edgeKind,
132
132
  fromKind,
133
133
  fromId,
@@ -149,7 +149,7 @@ async function checkCardinalityConstraint(ctx, edgeKind, cardinality, fromKind,
149
149
  fromId,
150
150
  activeOnly: true
151
151
  });
152
- const error = chunkNWYCOFEZ_cjs.checkCardinality(
152
+ const error = chunk5ELKD2FQ_cjs.checkCardinality(
153
153
  edgeKind,
154
154
  fromKind,
155
155
  fromId,
@@ -279,8 +279,8 @@ function createNodeBatchValidationBackend(graphId, registry, backend) {
279
279
  }
280
280
  function registerPendingUniqueEntries(kind, id, props, constraints) {
281
281
  for (const constraint of constraints) {
282
- if (!chunkNWYCOFEZ_cjs.checkWherePredicate(constraint, props)) continue;
283
- const key = chunkNWYCOFEZ_cjs.computeUniqueKey(
282
+ if (!chunk5ELKD2FQ_cjs.checkWherePredicate(constraint, props)) continue;
283
+ const key = chunk5ELKD2FQ_cjs.computeUniqueKey(
284
284
  props,
285
285
  constraint.fields,
286
286
  constraint.collation
@@ -293,7 +293,7 @@ function createNodeBatchValidationBackend(graphId, registry, backend) {
293
293
  );
294
294
  pendingUniqueOwners.set(concreteEntryKey, id);
295
295
  if (constraint.scope !== "kind") {
296
- const kindsToCheck = chunkNWYCOFEZ_cjs.getKindsForUniquenessCheck(
296
+ const kindsToCheck = chunk5ELKD2FQ_cjs.getKindsForUniquenessCheck(
297
297
  kind,
298
298
  constraint.scope,
299
299
  registry
@@ -312,12 +312,12 @@ function createNodeBatchValidationBackend(graphId, registry, backend) {
312
312
  }
313
313
  function registerAppliedNodeUpdate(kind, id, oldProps, newProps, constraints) {
314
314
  for (const constraint of constraints) {
315
- const oldApplies = chunkNWYCOFEZ_cjs.checkWherePredicate(constraint, oldProps);
316
- const newApplies = chunkNWYCOFEZ_cjs.checkWherePredicate(constraint, newProps);
317
- const oldKey = oldApplies ? chunkNWYCOFEZ_cjs.computeUniqueKey(oldProps, constraint.fields, constraint.collation) : void 0;
318
- const newKey = newApplies ? chunkNWYCOFEZ_cjs.computeUniqueKey(newProps, constraint.fields, constraint.collation) : void 0;
315
+ const oldApplies = chunk5ELKD2FQ_cjs.checkWherePredicate(constraint, oldProps);
316
+ const newApplies = chunk5ELKD2FQ_cjs.checkWherePredicate(constraint, newProps);
317
+ const oldKey = oldApplies ? chunk5ELKD2FQ_cjs.computeUniqueKey(oldProps, constraint.fields, constraint.collation) : void 0;
318
+ const newKey = newApplies ? chunk5ELKD2FQ_cjs.computeUniqueKey(newProps, constraint.fields, constraint.collation) : void 0;
319
319
  if (oldKey === newKey) continue;
320
- const kindsToCheck = chunkNWYCOFEZ_cjs.getKindsForUniquenessCheck(
320
+ const kindsToCheck = chunk5ELKD2FQ_cjs.getKindsForUniquenessCheck(
321
321
  kind,
322
322
  constraint.scope,
323
323
  registry
@@ -400,8 +400,8 @@ async function finishNodeCreatePreparation(ctx, draft, backend) {
400
400
  backend
401
401
  };
402
402
  await checkDisjointnessConstraint(constraintContext, kind, id);
403
- await chunkNWYCOFEZ_cjs.checkUniquenessConstraints(
404
- chunkNWYCOFEZ_cjs.createUniquenessContext(ctx.graphId, ctx.registry, backend),
403
+ await chunk5ELKD2FQ_cjs.checkUniquenessConstraints(
404
+ chunk5ELKD2FQ_cjs.createUniquenessContext(ctx.graphId, ctx.registry, backend),
405
405
  kind,
406
406
  id,
407
407
  validatedProps,
@@ -431,8 +431,8 @@ async function validateAndPrepareNodeCreate(ctx, input, id, backend, options) {
431
431
  );
432
432
  }
433
433
  async function finalizeNodeCreateBatch(ctx, preparedCreates, backend, lock) {
434
- await chunkNWYCOFEZ_cjs.applyNodeInsertSideEffectsBatch(
435
- chunkNWYCOFEZ_cjs.createNodeWriteContext(ctx.graphId, ctx.registry, lock),
434
+ await chunk5ELKD2FQ_cjs.applyNodeInsertSideEffectsBatch(
435
+ chunk5ELKD2FQ_cjs.createNodeWriteContext(ctx.graphId, ctx.registry, lock),
436
436
  preparedCreates.map((prepared) => ({
437
437
  kind: prepared.kind,
438
438
  id: prepared.id,
@@ -444,8 +444,8 @@ async function finalizeNodeCreateBatch(ctx, preparedCreates, backend, lock) {
444
444
  );
445
445
  }
446
446
  async function finalizeNodeCreate(ctx, prepared, backend, lock) {
447
- await chunkNWYCOFEZ_cjs.applyNodeInsertSideEffects(
448
- chunkNWYCOFEZ_cjs.createNodeWriteContext(ctx.graphId, ctx.registry, lock),
447
+ await chunk5ELKD2FQ_cjs.applyNodeInsertSideEffects(
448
+ chunk5ELKD2FQ_cjs.createNodeWriteContext(ctx.graphId, ctx.registry, lock),
449
449
  {
450
450
  kind: prepared.kind,
451
451
  id: prepared.id,
@@ -500,7 +500,7 @@ async function performNodeUpdate(ctx, input, backend, lock, options) {
500
500
  );
501
501
  const nodeKind = registration.type;
502
502
  const validTo = chunkDDCYVIVV_cjs.validateOptionalCanonicalIsoDate(input.validTo, "validTo");
503
- const writeContext = chunkNWYCOFEZ_cjs.createNodeWriteContext(ctx.graphId, ctx.registry, lock);
503
+ const writeContext = chunk5ELKD2FQ_cjs.createNodeWriteContext(ctx.graphId, ctx.registry, lock);
504
504
  const shared = {
505
505
  schema: nodeKind.schema,
506
506
  validatedProps,
@@ -508,7 +508,7 @@ async function performNodeUpdate(ctx, input, backend, lock, options) {
508
508
  ...validTo !== void 0 && { validTo }
509
509
  };
510
510
  if (options?.clearDeleted) {
511
- const row2 = await chunkNWYCOFEZ_cjs.applyNodeUpdate(
511
+ const row2 = await chunk5ELKD2FQ_cjs.applyNodeUpdate(
512
512
  writeContext,
513
513
  { ...shared, existing, clearDeleted: true },
514
514
  backend
@@ -516,7 +516,7 @@ async function performNodeUpdate(ctx, input, backend, lock, options) {
516
516
  return rowToNode(row2);
517
517
  }
518
518
  if (!chunkGNPGGLAE_cjs.isLiveNodeRow(existing)) throw new chunkSAFZ6JTI_cjs.NodeNotFoundError(kind, id);
519
- const row = await chunkNWYCOFEZ_cjs.applyNodeUpdate(
519
+ const row = await chunk5ELKD2FQ_cjs.applyNodeUpdate(
520
520
  writeContext,
521
521
  { ...shared, existing },
522
522
  backend
@@ -544,13 +544,13 @@ async function primeBatchValidationCaches(ctx, drafts, backend, seams) {
544
544
  const groups = /* @__PURE__ */ new Map();
545
545
  for (const draft of drafts) {
546
546
  for (const constraint of draft.uniqueConstraints) {
547
- if (!chunkNWYCOFEZ_cjs.checkWherePredicate(constraint, draft.validatedProps)) continue;
548
- const key = chunkNWYCOFEZ_cjs.computeUniqueKey(
547
+ if (!chunk5ELKD2FQ_cjs.checkWherePredicate(constraint, draft.validatedProps)) continue;
548
+ const key = chunk5ELKD2FQ_cjs.computeUniqueKey(
549
549
  draft.validatedProps,
550
550
  constraint.fields,
551
551
  constraint.collation
552
552
  );
553
- const kindsToCheck = chunkNWYCOFEZ_cjs.getKindsForUniquenessCheck(
553
+ const kindsToCheck = chunk5ELKD2FQ_cjs.getKindsForUniquenessCheck(
554
554
  draft.kind,
555
555
  constraint.scope,
556
556
  ctx.registry
@@ -596,7 +596,7 @@ async function prepareBatchCreates(ctx, inputs, backend, options) {
596
596
  seedUniqueRow
597
597
  } = createNodeBatchValidationBackend(ctx.graphId, ctx.registry, backend);
598
598
  const drafts = inputs.map(
599
- (input) => draftNodeCreate(ctx, input, input.id ?? chunkNWYCOFEZ_cjs.generateId(), options)
599
+ (input) => draftNodeCreate(ctx, input, input.id ?? chunk5ELKD2FQ_cjs.generateId(), options)
600
600
  );
601
601
  await primeBatchValidationCaches(ctx, drafts, backend, {
602
602
  seedNodeRow,
@@ -672,7 +672,7 @@ async function batchCheckUniqueAcrossKinds(backend, graphId, constraintName, uni
672
672
  }
673
673
  async function executeNodeCreateInternal(ctx, input, backend, options) {
674
674
  const kind = input.kind;
675
- const id = input.id ?? chunkNWYCOFEZ_cjs.generateId();
675
+ const id = input.id ?? chunk5ELKD2FQ_cjs.generateId();
676
676
  const opContext = ctx.createOperationContext("create", "node", kind, id);
677
677
  const shouldReturnRow = options?.returnRow ?? true;
678
678
  return runHookedWriteOperation(
@@ -691,8 +691,8 @@ async function executeNodeCreateInternal(ctx, input, backend, options) {
691
691
  if (shouldReturnRow) {
692
692
  row = await target.insertNode(prepared.insertParams);
693
693
  } else {
694
- await chunkNWYCOFEZ_cjs.runInsertNoReturn(
695
- chunkNWYCOFEZ_cjs.nodeInsertDispatch(target),
694
+ await chunk5ELKD2FQ_cjs.runInsertNoReturn(
695
+ chunk5ELKD2FQ_cjs.nodeInsertDispatch(target),
696
696
  prepared.insertParams
697
697
  );
698
698
  }
@@ -723,7 +723,7 @@ async function executeNodeCreateNoReturnBatch(ctx, inputs, backend) {
723
723
  inputs,
724
724
  target
725
725
  );
726
- await chunkNWYCOFEZ_cjs.runInsertBatch(chunkNWYCOFEZ_cjs.nodeInsertDispatch(target), batchInsertParams);
726
+ await chunk5ELKD2FQ_cjs.runInsertBatch(chunk5ELKD2FQ_cjs.nodeInsertDispatch(target), batchInsertParams);
727
727
  await finalizeNodeCreateBatch(ctx, preparedCreates, target, lock);
728
728
  });
729
729
  }
@@ -736,8 +736,8 @@ async function executeNodeCreateBatch(ctx, inputs, backend, options) {
736
736
  target,
737
737
  options
738
738
  );
739
- const rows = await chunkNWYCOFEZ_cjs.runInsertBatchReturning(
740
- chunkNWYCOFEZ_cjs.nodeInsertDispatch(target),
739
+ const rows = await chunk5ELKD2FQ_cjs.runInsertBatchReturning(
740
+ chunk5ELKD2FQ_cjs.nodeInsertDispatch(target),
741
741
  batchInsertParams
742
742
  );
743
743
  await finalizeNodeCreateBatch(ctx, preparedCreates, target, lock);
@@ -777,8 +777,8 @@ async function executeNodeDelete(ctx, kind, id, backend) {
777
777
  const registration = getNodeRegistration(ctx.graph, kind);
778
778
  const preflight = await target.getNode(ctx.graphId, kind, id);
779
779
  if (!preflight || !chunkGNPGGLAE_cjs.isLiveNodeRow(preflight)) return;
780
- await chunkNWYCOFEZ_cjs.applyNodeSoftDelete(
781
- chunkNWYCOFEZ_cjs.createNodeWriteContext(ctx.graphId, ctx.registry, lock),
780
+ await chunk5ELKD2FQ_cjs.applyNodeSoftDelete(
781
+ chunk5ELKD2FQ_cjs.createNodeWriteContext(ctx.graphId, ctx.registry, lock),
782
782
  {
783
783
  existing: preflight,
784
784
  schema: registration.type.schema,
@@ -800,8 +800,8 @@ async function executeNodeHardDelete(ctx, kind, id, backend) {
800
800
  backend,
801
801
  async (target, lock) => {
802
802
  const registration = getNodeRegistration(ctx.graph, kind);
803
- await chunkNWYCOFEZ_cjs.applyNodeHardDelete(
804
- chunkNWYCOFEZ_cjs.createNodeWriteContext(ctx.graphId, ctx.registry, lock),
803
+ await chunk5ELKD2FQ_cjs.applyNodeHardDelete(
804
+ chunk5ELKD2FQ_cjs.createNodeWriteContext(ctx.graphId, ctx.registry, lock),
805
805
  {
806
806
  kind,
807
807
  id,
@@ -822,7 +822,7 @@ async function executeNodeGetOrCreateByConstraint(ctx, kind, constraintName, pro
822
822
  operation: "create"
823
823
  });
824
824
  const constraint = resolveConstraint(ctx.graph, kind, constraintName);
825
- if (!chunkNWYCOFEZ_cjs.checkWherePredicate(constraint, validatedProps)) {
825
+ if (!chunk5ELKD2FQ_cjs.checkWherePredicate(constraint, validatedProps)) {
826
826
  const node = await executeNodeCreate(
827
827
  ctx,
828
828
  { kind, props: validatedProps },
@@ -831,12 +831,12 @@ async function executeNodeGetOrCreateByConstraint(ctx, kind, constraintName, pro
831
831
  );
832
832
  return { node, action: "created" };
833
833
  }
834
- const key = chunkNWYCOFEZ_cjs.computeUniqueKey(
834
+ const key = chunk5ELKD2FQ_cjs.computeUniqueKey(
835
835
  validatedProps,
836
836
  constraint.fields,
837
837
  constraint.collation
838
838
  );
839
- const kindsToCheck = chunkNWYCOFEZ_cjs.getKindsForUniquenessCheck(
839
+ const kindsToCheck = chunk5ELKD2FQ_cjs.getKindsForUniquenessCheck(
840
840
  kind,
841
841
  constraint.scope,
842
842
  ctx.registry
@@ -905,13 +905,13 @@ async function executeNodeFindByConstraint(ctx, kind, constraintName, props, bac
905
905
  operation: "create"
906
906
  });
907
907
  const constraint = resolveConstraint(ctx.graph, kind, constraintName);
908
- if (!chunkNWYCOFEZ_cjs.checkWherePredicate(constraint, validatedProps)) return void 0;
909
- const key = chunkNWYCOFEZ_cjs.computeUniqueKey(
908
+ if (!chunk5ELKD2FQ_cjs.checkWherePredicate(constraint, validatedProps)) return void 0;
909
+ const key = chunk5ELKD2FQ_cjs.computeUniqueKey(
910
910
  validatedProps,
911
911
  constraint.fields,
912
912
  constraint.collation
913
913
  );
914
- const kindsToCheck = chunkNWYCOFEZ_cjs.getKindsForUniquenessCheck(
914
+ const kindsToCheck = chunk5ELKD2FQ_cjs.getKindsForUniquenessCheck(
915
915
  kind,
916
916
  constraint.scope,
917
917
  ctx.registry
@@ -941,8 +941,8 @@ function validateAndComputeKeys(nodeKind, kind, constraint, items) {
941
941
  kind,
942
942
  operation: "create"
943
943
  });
944
- const applies = chunkNWYCOFEZ_cjs.checkWherePredicate(constraint, validatedProps);
945
- const key = applies ? chunkNWYCOFEZ_cjs.computeUniqueKey(
944
+ const applies = chunk5ELKD2FQ_cjs.checkWherePredicate(constraint, validatedProps);
945
+ const key = applies ? chunk5ELKD2FQ_cjs.computeUniqueKey(
946
946
  validatedProps,
947
947
  constraint.fields,
948
948
  constraint.collation
@@ -965,7 +965,7 @@ async function executeNodeBulkFindByConstraint(ctx, kind, constraintName, items,
965
965
  const constraint = resolveConstraint(ctx.graph, kind, constraintName);
966
966
  const validated = validateAndComputeKeys(nodeKind, kind, constraint, items);
967
967
  const uniqueKeys = collectUniqueKeys(validated);
968
- const kindsToCheck = chunkNWYCOFEZ_cjs.getKindsForUniquenessCheck(
968
+ const kindsToCheck = chunk5ELKD2FQ_cjs.getKindsForUniquenessCheck(
969
969
  kind,
970
970
  constraint.scope,
971
971
  ctx.registry
@@ -1151,7 +1151,7 @@ async function executeNodeBulkFindByIndex(ctx, kind, indexName, items, backend,
1151
1151
  }
1152
1152
  groupToInputs[existing]?.push(inputIndex);
1153
1153
  }
1154
- const schema = backend.tableNames ? chunkNWYCOFEZ_cjs.createSqlSchema(backend.tableNames) : chunkNWYCOFEZ_cjs.DEFAULT_SQL_SCHEMA;
1154
+ const schema = backend.tableNames ? chunk5ELKD2FQ_cjs.createSqlSchema(backend.tableNames) : chunk5ELKD2FQ_cjs.DEFAULT_SQL_SCHEMA;
1155
1155
  const compileContext = {
1156
1156
  dialect: backend.dialect,
1157
1157
  propsColumn: chunkX6RDQ5NB_cjs.sql.raw(`"props"`),
@@ -1224,7 +1224,7 @@ function capMatchesPerGroup(matches, limitPerInput) {
1224
1224
  return capped;
1225
1225
  }
1226
1226
  async function hydrateNodesById(backend, graphId, kind, ids) {
1227
- const rowsById = await chunkNWYCOFEZ_cjs.getNodeRowsByIds(backend, graphId, kind, ids);
1227
+ const rowsById = await chunk5ELKD2FQ_cjs.getNodeRowsByIds(backend, graphId, kind, ids);
1228
1228
  const nodesById = /* @__PURE__ */ new Map();
1229
1229
  for (const [id, row] of rowsById) {
1230
1230
  if (row.deleted_at !== void 0) continue;
@@ -1240,7 +1240,7 @@ async function executeNodeBulkGetOrCreateByConstraint(ctx, kind, constraintName,
1240
1240
  const constraint = resolveConstraint(ctx.graph, kind, constraintName);
1241
1241
  const validated = validateAndComputeKeys(nodeKind, kind, constraint, items);
1242
1242
  const uniqueKeys = collectUniqueKeys(validated);
1243
- const kindsToCheck = chunkNWYCOFEZ_cjs.getKindsForUniquenessCheck(
1243
+ const kindsToCheck = chunk5ELKD2FQ_cjs.getKindsForUniquenessCheck(
1244
1244
  kind,
1245
1245
  constraint.scope,
1246
1246
  ctx.registry
@@ -1362,5 +1362,5 @@ exports.rowToNode = rowToNode;
1362
1362
  exports.rowToNodeMeta = rowToNodeMeta;
1363
1363
  exports.runHookedWriteOperation = runHookedWriteOperation;
1364
1364
  exports.runInWriteTransaction = runInWriteTransaction;
1365
- //# sourceMappingURL=chunk-KCLZHYPU.cjs.map
1366
- //# sourceMappingURL=chunk-KCLZHYPU.cjs.map
1365
+ //# sourceMappingURL=chunk-E2Q7SP2K.cjs.map
1366
+ //# sourceMappingURL=chunk-E2Q7SP2K.cjs.map