@nicia-ai/typegraph 0.29.0 → 0.30.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 (142) hide show
  1. package/dist/backend/postgres/index.cjs +19 -19
  2. package/dist/backend/postgres/index.d.cts +5 -5
  3. package/dist/backend/postgres/index.d.ts +5 -5
  4. package/dist/backend/postgres/index.js +9 -9
  5. package/dist/backend/postgres/pglite.cjs +14 -14
  6. package/dist/backend/postgres/pglite.d.cts +2 -2
  7. package/dist/backend/postgres/pglite.d.ts +2 -2
  8. package/dist/backend/postgres/pglite.js +9 -9
  9. package/dist/backend/sqlite/index.cjs +17 -17
  10. package/dist/backend/sqlite/index.d.cts +11 -6
  11. package/dist/backend/sqlite/index.d.ts +11 -6
  12. package/dist/backend/sqlite/index.js +8 -8
  13. package/dist/backend/sqlite/libsql.cjs +13 -13
  14. package/dist/backend/sqlite/libsql.d.cts +2 -2
  15. package/dist/backend/sqlite/libsql.d.ts +2 -2
  16. package/dist/backend/sqlite/libsql.js +9 -9
  17. package/dist/backend/sqlite/local.cjs +16 -15
  18. package/dist/backend/sqlite/local.cjs.map +1 -1
  19. package/dist/backend/sqlite/local.d.cts +8 -2
  20. package/dist/backend/sqlite/local.d.ts +8 -2
  21. package/dist/backend/sqlite/local.js +11 -10
  22. package/dist/backend/sqlite/local.js.map +1 -1
  23. package/dist/{chunk-UP4QAJND.cjs → chunk-26HWIIVS.cjs} +65 -65
  24. package/dist/{chunk-UP4QAJND.cjs.map → chunk-26HWIIVS.cjs.map} +1 -1
  25. package/dist/{chunk-GPUNAJFH.js → chunk-2QA5EHEN.js} +3 -3
  26. package/dist/{chunk-GPUNAJFH.js.map → chunk-2QA5EHEN.js.map} +1 -1
  27. package/dist/{chunk-CUZGBWFT.js → chunk-3IRMLJEK.js} +3 -3
  28. package/dist/{chunk-CUZGBWFT.js.map → chunk-3IRMLJEK.js.map} +1 -1
  29. package/dist/{chunk-MRMD7S7E.js → chunk-3JLRHQ67.js} +7 -7
  30. package/dist/{chunk-MRMD7S7E.js.map → chunk-3JLRHQ67.js.map} +1 -1
  31. package/dist/{chunk-UPBXUOW7.cjs → chunk-4BXHVEFB.cjs} +15 -15
  32. package/dist/{chunk-UPBXUOW7.cjs.map → chunk-4BXHVEFB.cjs.map} +1 -1
  33. package/dist/{chunk-RU5BBUU2.cjs → chunk-4LBO6KIF.cjs} +70 -67
  34. package/dist/chunk-4LBO6KIF.cjs.map +1 -0
  35. package/dist/{chunk-HKN622O4.js → chunk-633N7DSE.js} +9 -5
  36. package/dist/chunk-633N7DSE.js.map +1 -0
  37. package/dist/{chunk-R2LA6MKR.cjs → chunk-7JGLPAFV.cjs} +8 -8
  38. package/dist/{chunk-R2LA6MKR.cjs.map → chunk-7JGLPAFV.cjs.map} +1 -1
  39. package/dist/{chunk-7KLVFWXR.js → chunk-AI3RNREM.js} +30 -4
  40. package/dist/chunk-AI3RNREM.js.map +1 -0
  41. package/dist/{chunk-SFNUHFON.js → chunk-ENDUY2CD.js} +4 -4
  42. package/dist/{chunk-SFNUHFON.js.map → chunk-ENDUY2CD.js.map} +1 -1
  43. package/dist/{chunk-7V335GHG.cjs → chunk-FLRCVI2G.cjs} +12 -2
  44. package/dist/chunk-FLRCVI2G.cjs.map +1 -0
  45. package/dist/{chunk-IE2TPFBT.js → chunk-FVIGJTS7.js} +3 -3
  46. package/dist/{chunk-IE2TPFBT.js.map → chunk-FVIGJTS7.js.map} +1 -1
  47. package/dist/{chunk-Q5ASTPM4.cjs → chunk-FWBVPATK.cjs} +19 -19
  48. package/dist/{chunk-Q5ASTPM4.cjs.map → chunk-FWBVPATK.cjs.map} +1 -1
  49. package/dist/{chunk-KGAJ5HFO.cjs → chunk-IE6GN7L3.cjs} +17 -17
  50. package/dist/{chunk-KGAJ5HFO.cjs.map → chunk-IE6GN7L3.cjs.map} +1 -1
  51. package/dist/{chunk-A4H6QMV4.js → chunk-IUIJJYPI.js} +14 -11
  52. package/dist/chunk-IUIJJYPI.js.map +1 -0
  53. package/dist/{chunk-BMDF2S7S.js → chunk-IX7RE7CG.js} +3 -3
  54. package/dist/{chunk-BMDF2S7S.js.map → chunk-IX7RE7CG.js.map} +1 -1
  55. package/dist/{chunk-G6P3OVDY.cjs → chunk-JIEJCTDS.cjs} +18 -2
  56. package/dist/chunk-JIEJCTDS.cjs.map +1 -0
  57. package/dist/{chunk-XTQHSOIC.cjs → chunk-K4N35E7B.cjs} +86 -86
  58. package/dist/{chunk-XTQHSOIC.cjs.map → chunk-K4N35E7B.cjs.map} +1 -1
  59. package/dist/{chunk-NZ5PMBTG.js → chunk-K5P5OZXS.js} +12 -3
  60. package/dist/chunk-K5P5OZXS.js.map +1 -0
  61. package/dist/{chunk-Y52UNT66.js → chunk-K5VREXMZ.js} +7 -7
  62. package/dist/{chunk-Y52UNT66.js.map → chunk-K5VREXMZ.js.map} +1 -1
  63. package/dist/chunk-LUHU4T2F.cjs +12 -0
  64. package/dist/{chunk-Q3ZZLU3O.cjs.map → chunk-LUHU4T2F.cjs.map} +1 -1
  65. package/dist/{chunk-Z36W5WUM.js → chunk-MAQJYNJR.js} +3 -3
  66. package/dist/{chunk-Z36W5WUM.js.map → chunk-MAQJYNJR.js.map} +1 -1
  67. package/dist/{chunk-N3VVQDMA.js → chunk-MXE2U3EX.js} +3 -3
  68. package/dist/{chunk-N3VVQDMA.js.map → chunk-MXE2U3EX.js.map} +1 -1
  69. package/dist/{chunk-3DTLDGIM.js → chunk-N2OEOGBB.js} +6 -6
  70. package/dist/{chunk-3DTLDGIM.js.map → chunk-N2OEOGBB.js.map} +1 -1
  71. package/dist/{chunk-OGUH56BB.js → chunk-R4JOBEJU.js} +4 -4
  72. package/dist/{chunk-OGUH56BB.js.map → chunk-R4JOBEJU.js.map} +1 -1
  73. package/dist/{chunk-HM6XMR3E.cjs → chunk-SGPXKJ4A.cjs} +18 -18
  74. package/dist/{chunk-HM6XMR3E.cjs.map → chunk-SGPXKJ4A.cjs.map} +1 -1
  75. package/dist/{chunk-MB363HT5.js → chunk-TQOYM4LN.js} +18 -3
  76. package/dist/chunk-TQOYM4LN.js.map +1 -0
  77. package/dist/{chunk-C2RWFIYP.cjs → chunk-UESTHN47.cjs} +34 -6
  78. package/dist/chunk-UESTHN47.cjs.map +1 -0
  79. package/dist/{chunk-4K6IHUW6.cjs → chunk-VFX3LC76.cjs} +14 -14
  80. package/dist/{chunk-4K6IHUW6.cjs.map → chunk-VFX3LC76.cjs.map} +1 -1
  81. package/dist/{chunk-F2Q76CQ4.cjs → chunk-WEMZM7J7.cjs} +11 -7
  82. package/dist/chunk-WEMZM7J7.cjs.map +1 -0
  83. package/dist/{chunk-ZYQEXGYC.cjs → chunk-WFCECD6Q.cjs} +84 -84
  84. package/dist/{chunk-ZYQEXGYC.cjs.map → chunk-WFCECD6Q.cjs.map} +1 -1
  85. package/dist/{chunk-VGU26WIU.cjs → chunk-YQGLVWB2.cjs} +4 -4
  86. package/dist/{chunk-VGU26WIU.cjs.map → chunk-YQGLVWB2.cjs.map} +1 -1
  87. package/dist/{ddl-D3o-RmsV.d.cts → ddl-BSFlbGQF.d.cts} +3 -3
  88. package/dist/{ddl-BwH00BB6.d.ts → ddl-EdkIiFVU.d.ts} +3 -3
  89. package/dist/graph-extension/index.cjs +19 -19
  90. package/dist/graph-extension/index.d.cts +1 -1
  91. package/dist/graph-extension/index.d.ts +1 -1
  92. package/dist/graph-extension/index.js +4 -4
  93. package/dist/{index-CapHwi1a.d.ts → index-DzeIiMO3.d.ts} +9 -1
  94. package/dist/{index-jPPexxM5.d.cts → index-Ln_KHTGA.d.cts} +9 -1
  95. package/dist/index.cjs +780 -515
  96. package/dist/index.cjs.map +1 -1
  97. package/dist/index.d.cts +8 -8
  98. package/dist/index.d.ts +8 -8
  99. package/dist/index.js +314 -53
  100. package/dist/index.js.map +1 -1
  101. package/dist/indexes/index.cjs +18 -18
  102. package/dist/indexes/index.d.cts +4 -4
  103. package/dist/indexes/index.d.ts +4 -4
  104. package/dist/indexes/index.js +4 -4
  105. package/dist/interchange/index.cjs +7 -7
  106. package/dist/interchange/index.d.cts +3 -3
  107. package/dist/interchange/index.d.ts +3 -3
  108. package/dist/interchange/index.js +2 -2
  109. package/dist/{manager-BUugwCYz.d.ts → manager-BbdyNhkv.d.ts} +1 -1
  110. package/dist/{manager-DpIpn1HQ.d.cts → manager-wTDgjoXG.d.cts} +1 -1
  111. package/dist/{postgres-CQL9UIn2.d.cts → postgres-CK2ByP1q.d.cts} +1 -1
  112. package/dist/{postgres-CcRLaxz0.d.ts → postgres-ymXYC6Rr.d.ts} +1 -1
  113. package/dist/profiler/index.cjs +9 -9
  114. package/dist/profiler/index.d.cts +5 -5
  115. package/dist/profiler/index.d.ts +5 -5
  116. package/dist/profiler/index.js +2 -2
  117. package/dist/schema/index.cjs +31 -31
  118. package/dist/schema/index.d.cts +5 -5
  119. package/dist/schema/index.d.ts +5 -5
  120. package/dist/schema/index.js +8 -8
  121. package/dist/{sqlite-Rj3xu4It.d.cts → sqlite-DxH1lrwD.d.cts} +1 -1
  122. package/dist/{sqlite-CZDFUfHS.d.ts → sqlite-R8YGOqVQ.d.ts} +1 -1
  123. package/dist/{store-B43FpOVX.d.cts → store--z1Tmk7U.d.cts} +43 -3
  124. package/dist/{store-De0Y33wP.d.ts → store-CNKM334w.d.ts} +43 -3
  125. package/dist/{types-CmAT-Z47.d.ts → types-BBiDqJCU.d.ts} +2 -0
  126. package/dist/{types-B5GSeE3t.d.ts → types-CMvxx2kd.d.ts} +1 -1
  127. package/dist/{types-Bwlp_yvu.d.cts → types-D5B6Be5c.d.cts} +1 -1
  128. package/dist/{types-DXCSyxac.d.cts → types-dL-clxO3.d.cts} +2 -0
  129. package/dist/{where-CP4qGIHd.d.ts → where-CAo6wsBZ.d.ts} +1 -1
  130. package/dist/{where-2dsyYt3d.d.cts → where-bJjuOCeV.d.cts} +1 -1
  131. package/package.json +1 -1
  132. package/dist/chunk-7KLVFWXR.js.map +0 -1
  133. package/dist/chunk-7V335GHG.cjs.map +0 -1
  134. package/dist/chunk-A4H6QMV4.js.map +0 -1
  135. package/dist/chunk-C2RWFIYP.cjs.map +0 -1
  136. package/dist/chunk-F2Q76CQ4.cjs.map +0 -1
  137. package/dist/chunk-G6P3OVDY.cjs.map +0 -1
  138. package/dist/chunk-HKN622O4.js.map +0 -1
  139. package/dist/chunk-MB363HT5.js.map +0 -1
  140. package/dist/chunk-NZ5PMBTG.js.map +0 -1
  141. package/dist/chunk-Q3ZZLU3O.cjs +0 -12
  142. package/dist/chunk-RU5BBUU2.cjs.map +0 -1
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var chunkF2Q76CQ4_cjs = require('./chunk-F2Q76CQ4.cjs');
3
+ var chunkWEMZM7J7_cjs = require('./chunk-WEMZM7J7.cjs');
4
4
  var chunkRP7YITHX_cjs = require('./chunk-RP7YITHX.cjs');
5
- var chunkC2RWFIYP_cjs = require('./chunk-C2RWFIYP.cjs');
6
- var chunkUPBXUOW7_cjs = require('./chunk-UPBXUOW7.cjs');
7
- var chunkG6P3OVDY_cjs = require('./chunk-G6P3OVDY.cjs');
5
+ var chunkUESTHN47_cjs = require('./chunk-UESTHN47.cjs');
6
+ var chunk4BXHVEFB_cjs = require('./chunk-4BXHVEFB.cjs');
7
+ var chunkJIEJCTDS_cjs = require('./chunk-JIEJCTDS.cjs');
8
8
  var drizzleOrm = require('drizzle-orm');
9
9
  var pgCore = require('drizzle-orm/pg-core');
10
10
  var sqliteCore = require('drizzle-orm/sqlite-core');
@@ -56,7 +56,7 @@ function createPostgresTables(names = {}, options = {}) {
56
56
  ),
57
57
  pgCore.index(`${n.nodes}_deleted_idx`).on(t.graphId, t.deletedAt),
58
58
  pgCore.index(`${n.nodes}_valid_idx`).on(t.graphId, t.validFrom, t.validTo),
59
- ...chunkC2RWFIYP_cjs.buildPostgresNodeIndexBuilders(t, indexes)
59
+ ...chunkUESTHN47_cjs.buildPostgresNodeIndexBuilders(t, indexes)
60
60
  ]
61
61
  );
62
62
  const edges2 = pgCore.pgTable(
@@ -115,7 +115,7 @@ function createPostgresTables(names = {}, options = {}) {
115
115
  t.fromId,
116
116
  t.validTo
117
117
  ),
118
- ...chunkC2RWFIYP_cjs.buildPostgresEdgeIndexBuilders(t, indexes)
118
+ ...chunkUESTHN47_cjs.buildPostgresEdgeIndexBuilders(t, indexes)
119
119
  ]
120
120
  );
121
121
  const uniques2 = pgCore.pgTable(
@@ -386,13 +386,13 @@ function isSqliteTable(value) {
386
386
  function runtimeStrategyContributions(fulltextStrategy, fulltextTableName) {
387
387
  return fulltextStrategy.ownedTables(fulltextTableName).filter((contribution) => contribution.runtimeEnsure);
388
388
  }
389
- function sqliteContributions(tables3 = chunkF2Q76CQ4_cjs.tables, fulltextStrategy = chunkC2RWFIYP_cjs.fts5Strategy) {
389
+ function sqliteContributions(tables3 = chunkWEMZM7J7_cjs.tables, fulltextStrategy = chunkUESTHN47_cjs.fts5Strategy) {
390
390
  const contributions = [];
391
391
  for (const [key, table] of Object.entries(tables3)) {
392
392
  if (!isSqliteTable(table)) continue;
393
393
  contributions.push({
394
394
  logicalName: key,
395
- owner: chunkC2RWFIYP_cjs.BASE_CONTRIBUTION_OWNER,
395
+ owner: chunkUESTHN47_cjs.BASE_CONTRIBUTION_OWNER,
396
396
  tableName: sqliteCore.getTableConfig(table).name,
397
397
  createDdl: [
398
398
  generateSqliteCreateTableSQL(table),
@@ -408,12 +408,12 @@ function sqliteContributions(tables3 = chunkF2Q76CQ4_cjs.tables, fulltextStrateg
408
408
  }
409
409
  return contributions;
410
410
  }
411
- function generateSqliteDDL(tables3 = chunkF2Q76CQ4_cjs.tables, fulltextStrategy = chunkC2RWFIYP_cjs.fts5Strategy) {
411
+ function generateSqliteDDL(tables3 = chunkWEMZM7J7_cjs.tables, fulltextStrategy = chunkUESTHN47_cjs.fts5Strategy) {
412
412
  return sqliteContributions(tables3, fulltextStrategy).flatMap(
413
413
  (contribution) => [...contribution.createDdl]
414
414
  );
415
415
  }
416
- function generateSqliteMigrationSQL(tables3 = chunkF2Q76CQ4_cjs.tables, fulltextStrategy = chunkC2RWFIYP_cjs.fts5Strategy) {
416
+ function generateSqliteMigrationSQL(tables3 = chunkWEMZM7J7_cjs.tables, fulltextStrategy = chunkUESTHN47_cjs.fts5Strategy) {
417
417
  return generateSqliteDDL(tables3, fulltextStrategy).join("\n\n");
418
418
  }
419
419
  function getPgColumnType(column) {
@@ -495,14 +495,14 @@ function generatePgCreateIndexSQL(table) {
495
495
  function isPgTable(value) {
496
496
  return drizzleOrm.is(value, pgCore.PgTable);
497
497
  }
498
- function postgresContributions(tables3 = tables2, fulltextStrategy = chunkC2RWFIYP_cjs.tsvectorStrategy) {
498
+ function postgresContributions(tables3 = tables2, fulltextStrategy = chunkUESTHN47_cjs.tsvectorStrategy) {
499
499
  const contributions = [];
500
500
  for (const [key, table] of Object.entries(tables3)) {
501
501
  if (!isPgTable(table)) continue;
502
502
  if (table === tables3.fulltext) continue;
503
503
  contributions.push({
504
504
  logicalName: key,
505
- owner: chunkC2RWFIYP_cjs.BASE_CONTRIBUTION_OWNER,
505
+ owner: chunkUESTHN47_cjs.BASE_CONTRIBUTION_OWNER,
506
506
  tableName: pgCore.getTableConfig(table).name,
507
507
  createDdl: [
508
508
  generatePgCreateTableSQL(table),
@@ -518,12 +518,12 @@ function postgresContributions(tables3 = tables2, fulltextStrategy = chunkC2RWFI
518
518
  }
519
519
  return contributions;
520
520
  }
521
- function generatePostgresDDL(tables3 = tables2, fulltextStrategy = chunkC2RWFIYP_cjs.tsvectorStrategy) {
521
+ function generatePostgresDDL(tables3 = tables2, fulltextStrategy = chunkUESTHN47_cjs.tsvectorStrategy) {
522
522
  return postgresContributions(tables3, fulltextStrategy).flatMap(
523
523
  (contribution) => [...contribution.createDdl]
524
524
  );
525
525
  }
526
- function generatePostgresMigrationSQL(tables3 = tables2, fulltextStrategy = chunkC2RWFIYP_cjs.tsvectorStrategy) {
526
+ function generatePostgresMigrationSQL(tables3 = tables2, fulltextStrategy = chunkUESTHN47_cjs.tsvectorStrategy) {
527
527
  const extensionSql = "-- Enable pgvector extension for vector similarity search\nCREATE EXTENSION IF NOT EXISTS vector;";
528
528
  const ddlSql = generatePostgresDDL(tables3, fulltextStrategy).join("\n\n");
529
529
  return `${extensionSql}
@@ -596,7 +596,7 @@ function mapVectorWriteError(error, params) {
596
596
  const mismatch = chunkRP7YITHX_cjs.parseDimensionMismatch(error);
597
597
  if (mismatch === void 0) return error;
598
598
  const attempted = mismatch.actual ?? "a different number of";
599
- return new chunkG6P3OVDY_cjs.EmbeddingDimensionChangedError(
599
+ return new chunkJIEJCTDS_cjs.EmbeddingDimensionChangedError(
600
600
  `Embedding "${params.nodeKind}.${params.fieldPath}" was written with ${attempted} dimensions, but its per-field storage expects ${mismatch.expected}. The field's embedding dimension changed; existing vectors must be recreated and re-embedded.`,
601
601
  {
602
602
  kind: params.nodeKind,
@@ -611,7 +611,7 @@ function mapVectorWriteError(error, params) {
611
611
  // src/backend/drizzle/row-mappers.ts
612
612
  function requireTimestamp(value, field) {
613
613
  if (value === void 0) {
614
- throw new chunkG6P3OVDY_cjs.DatabaseOperationError(
614
+ throw new chunkJIEJCTDS_cjs.DatabaseOperationError(
615
615
  `Expected non-null ${field} timestamp`,
616
616
  { operation: "select", entity: "row" }
617
617
  );
@@ -620,7 +620,7 @@ function requireTimestamp(value, field) {
620
620
  }
621
621
  function asString(value, field) {
622
622
  if (typeof value !== "string") {
623
- throw new chunkG6P3OVDY_cjs.DatabaseOperationError(
623
+ throw new chunkJIEJCTDS_cjs.DatabaseOperationError(
624
624
  `Expected ${field} to be string, got ${typeof value}`,
625
625
  { operation: "select", entity: "row" }
626
626
  );
@@ -629,7 +629,7 @@ function asString(value, field) {
629
629
  }
630
630
  function asNumber(value, field) {
631
631
  if (typeof value !== "number") {
632
- throw new chunkG6P3OVDY_cjs.DatabaseOperationError(
632
+ throw new chunkJIEJCTDS_cjs.DatabaseOperationError(
633
633
  `Expected ${field} to be number, got ${typeof value}`,
634
634
  { operation: "select", entity: "row" }
635
635
  );
@@ -670,7 +670,7 @@ var SQLITE_ROW_MAPPER_CONFIG = {
670
670
  formatTimestamp: (value) => {
671
671
  if (value === null || value === void 0) return;
672
672
  if (typeof value !== "string") {
673
- throw new chunkG6P3OVDY_cjs.DatabaseOperationError(
673
+ throw new chunkJIEJCTDS_cjs.DatabaseOperationError(
674
674
  `Expected timestamp to be string, got ${typeof value}`,
675
675
  { operation: "select", entity: "row" }
676
676
  );
@@ -679,7 +679,7 @@ var SQLITE_ROW_MAPPER_CONFIG = {
679
679
  },
680
680
  normalizeJson: (value) => {
681
681
  if (typeof value !== "string") {
682
- throw new chunkG6P3OVDY_cjs.DatabaseOperationError(
682
+ throw new chunkJIEJCTDS_cjs.DatabaseOperationError(
683
683
  `Expected JSON column to be string, got ${typeof value}`,
684
684
  { operation: "select", entity: "row" }
685
685
  );
@@ -802,7 +802,7 @@ async function computeContributionSignature(dialect, identity, createDdl) {
802
802
  tableName: identity.tableName,
803
803
  createDdl
804
804
  };
805
- return chunkUPBXUOW7_cjs.sha256Hex(JSON.stringify(hashable, chunkRP7YITHX_cjs.sortedReplacer), 16);
805
+ return chunk4BXHVEFB_cjs.sha256Hex(JSON.stringify(hashable, chunkRP7YITHX_cjs.sortedReplacer), 16);
806
806
  }
807
807
  function evaluateContributionState(row, signature) {
808
808
  if (row === void 0) return "missing";
@@ -965,13 +965,13 @@ function createContributionMaterializer(deps) {
965
965
  for (const contribution of runtimeContributions()) {
966
966
  const read = await readContributionState(graphId, contribution);
967
967
  if (read.kind === "missing-table") {
968
- throw new chunkG6P3OVDY_cjs.StoreNotInitializedError(graphId, "missing", {
968
+ throw new chunkJIEJCTDS_cjs.StoreNotInitializedError(graphId, "missing", {
969
969
  cause: read.error,
970
970
  details: { logicalName: contribution.logicalName }
971
971
  });
972
972
  }
973
973
  if (read.state !== "initialized") {
974
- throw new chunkG6P3OVDY_cjs.StoreNotInitializedError(graphId, read.state, {
974
+ throw new chunkJIEJCTDS_cjs.StoreNotInitializedError(graphId, read.state, {
975
975
  details: { logicalName: contribution.logicalName }
976
976
  });
977
977
  }
@@ -1082,7 +1082,7 @@ function buildKindRemovalOnConflictSet(removedAtColumn, paramsRemovedAt) {
1082
1082
  function assertAdoptedDialect(externalTx, brand, backend) {
1083
1083
  if (drizzleOrm.is(externalTx, brand)) return;
1084
1084
  const label = backend === "postgres" ? "Postgres" : "SQLite";
1085
- throw new chunkG6P3OVDY_cjs.ConfigurationError(
1085
+ throw new chunkJIEJCTDS_cjs.ConfigurationError(
1086
1086
  `adoptTransaction received a handle that is not a ${label} Drizzle transaction. Pass the \`tx\` from a ${label} \`db.transaction(...)\` opened on this backend's connection.`,
1087
1087
  { backend, capability: "adoptTransaction" }
1088
1088
  );
@@ -1100,7 +1100,7 @@ function chunkArray(values, size) {
1100
1100
  function verifyExpectedActiveVersion(graphId, expected, actualActiveVersion) {
1101
1101
  const expectedVersion = expected.kind === "active" ? expected.version : 0;
1102
1102
  if (actualActiveVersion !== expectedVersion) {
1103
- throw new chunkG6P3OVDY_cjs.StaleVersionError({
1103
+ throw new chunkJIEJCTDS_cjs.StaleVersionError({
1104
1104
  graphId,
1105
1105
  expected: expectedVersion,
1106
1106
  actual: actualActiveVersion
@@ -1121,7 +1121,7 @@ function createCommonOperationBackend(options) {
1121
1121
  const timestamp2 = nowIso2();
1122
1122
  const query = operationStrategy.buildInsertNode(params, timestamp2);
1123
1123
  const row = await execution.execGet(query);
1124
- if (!row) throw new chunkG6P3OVDY_cjs.DatabaseOperationError("Insert node failed: no row returned", { operation: "insert", entity: "node" });
1124
+ if (!row) throw new chunkJIEJCTDS_cjs.DatabaseOperationError("Insert node failed: no row returned", { operation: "insert", entity: "node" });
1125
1125
  return rowMappers.toNodeRow(row);
1126
1126
  },
1127
1127
  async insertNodeNoReturn(params) {
@@ -1171,7 +1171,7 @@ function createCommonOperationBackend(options) {
1171
1171
  const timestamp2 = nowIso2();
1172
1172
  const query = operationStrategy.buildUpdateNode(params, timestamp2);
1173
1173
  const row = await execution.execGet(query);
1174
- if (!row) throw new chunkG6P3OVDY_cjs.DatabaseOperationError("Update node failed: no row returned", { operation: "update", entity: "node" });
1174
+ if (!row) throw new chunkJIEJCTDS_cjs.DatabaseOperationError("Update node failed: no row returned", { operation: "update", entity: "node" });
1175
1175
  return rowMappers.toNodeRow(row);
1176
1176
  },
1177
1177
  async deleteNode(params) {
@@ -1215,7 +1215,7 @@ function createCommonOperationBackend(options) {
1215
1215
  const timestamp2 = nowIso2();
1216
1216
  const query = operationStrategy.buildInsertEdge(params, timestamp2);
1217
1217
  const row = await execution.execGet(query);
1218
- if (!row) throw new chunkG6P3OVDY_cjs.DatabaseOperationError("Insert edge failed: no row returned", { operation: "insert", entity: "edge" });
1218
+ if (!row) throw new chunkJIEJCTDS_cjs.DatabaseOperationError("Insert edge failed: no row returned", { operation: "insert", entity: "edge" });
1219
1219
  return rowMappers.toEdgeRow(row);
1220
1220
  },
1221
1221
  async insertEdgeNoReturn(params) {
@@ -1265,7 +1265,7 @@ function createCommonOperationBackend(options) {
1265
1265
  const timestamp2 = nowIso2();
1266
1266
  const query = operationStrategy.buildUpdateEdge(params, timestamp2);
1267
1267
  const row = await execution.execGet(query);
1268
- if (!row) throw new chunkG6P3OVDY_cjs.DatabaseOperationError("Update edge failed: no row returned", { operation: "update", entity: "edge" });
1268
+ if (!row) throw new chunkJIEJCTDS_cjs.DatabaseOperationError("Update edge failed: no row returned", { operation: "update", entity: "edge" });
1269
1269
  return rowMappers.toEdgeRow(row);
1270
1270
  },
1271
1271
  async deleteEdge(params) {
@@ -1316,7 +1316,7 @@ function createCommonOperationBackend(options) {
1316
1316
  const query = operationStrategy.buildInsertUnique(params);
1317
1317
  const result = await execution.execGet(query);
1318
1318
  if (result && result.node_id !== params.nodeId) {
1319
- throw new chunkG6P3OVDY_cjs.UniquenessError({
1319
+ throw new chunkJIEJCTDS_cjs.UniquenessError({
1320
1320
  constraintName: params.constraintName,
1321
1321
  kind: params.nodeKind,
1322
1322
  existingId: result.node_id,
@@ -1366,7 +1366,7 @@ function createCommonOperationBackend(options) {
1366
1366
  if (existingRaw !== void 0) {
1367
1367
  const existing = rowMappers.toSchemaVersionRow(existingRaw);
1368
1368
  if (existing.schema_hash !== params.schemaHash) {
1369
- throw new chunkG6P3OVDY_cjs.SchemaContentConflictError({
1369
+ throw new chunkJIEJCTDS_cjs.SchemaContentConflictError({
1370
1370
  graphId: params.graphId,
1371
1371
  version: params.version,
1372
1372
  existingHash: existing.schema_hash,
@@ -1414,7 +1414,7 @@ function createCommonOperationBackend(options) {
1414
1414
  );
1415
1415
  const insertedRaw = await execution.execGet(insertQuery);
1416
1416
  if (!insertedRaw) {
1417
- throw new chunkG6P3OVDY_cjs.DatabaseOperationError(
1417
+ throw new chunkJIEJCTDS_cjs.DatabaseOperationError(
1418
1418
  "Insert schema failed: no row returned",
1419
1419
  { operation: "insert", entity: "schema" }
1420
1420
  );
@@ -1435,7 +1435,7 @@ function createCommonOperationBackend(options) {
1435
1435
  )
1436
1436
  );
1437
1437
  if (!targetRaw) {
1438
- throw new chunkG6P3OVDY_cjs.MigrationError(
1438
+ throw new chunkJIEJCTDS_cjs.MigrationError(
1439
1439
  `Cannot activate version ${params.version}: version does not exist for graph "${params.graphId}".`,
1440
1440
  {
1441
1441
  graphId: params.graphId,
@@ -1460,7 +1460,7 @@ function createCommonOperationBackend(options) {
1460
1460
  };
1461
1461
  }
1462
1462
  function buildClearGraph(tables3, graphId) {
1463
- const fulltext2 = chunkC2RWFIYP_cjs.quotedTableName(tables3.fulltextTableName);
1463
+ const fulltext2 = chunkUESTHN47_cjs.quotedTableName(tables3.fulltextTableName);
1464
1464
  return [
1465
1465
  drizzleOrm.sql`DELETE FROM ${fulltext2} WHERE "graph_id" = ${graphId}`,
1466
1466
  drizzleOrm.sql`DELETE FROM ${tables3.uniques} WHERE ${tables3.uniques.graphId} = ${graphId}`,
@@ -1609,13 +1609,13 @@ function buildCountEdgesByKind(tables3, params) {
1609
1609
  function buildInsertEdge(tables3, params, timestamp2) {
1610
1610
  const { edges: edges2 } = tables3;
1611
1611
  const propsJson = JSON.stringify(params.props);
1612
- const columns = chunkC2RWFIYP_cjs.edgeColumnList(edges2);
1612
+ const columns = chunkUESTHN47_cjs.edgeColumnList(edges2);
1613
1613
  return drizzleOrm.sql`
1614
1614
  INSERT INTO ${edges2} (${columns})
1615
1615
  VALUES (
1616
1616
  ${params.graphId}, ${params.id}, ${params.kind},
1617
1617
  ${params.fromKind}, ${params.fromId}, ${params.toKind}, ${params.toId},
1618
- ${propsJson}, ${chunkC2RWFIYP_cjs.sqlNull(params.validFrom)}, ${chunkC2RWFIYP_cjs.sqlNull(params.validTo)},
1618
+ ${propsJson}, ${chunkUESTHN47_cjs.sqlNull(params.validFrom)}, ${chunkUESTHN47_cjs.sqlNull(params.validTo)},
1619
1619
  ${timestamp2}, ${timestamp2}
1620
1620
  )
1621
1621
  RETURNING *
@@ -1624,23 +1624,23 @@ function buildInsertEdge(tables3, params, timestamp2) {
1624
1624
  function buildInsertEdgeNoReturn(tables3, params, timestamp2) {
1625
1625
  const { edges: edges2 } = tables3;
1626
1626
  const propsJson = JSON.stringify(params.props);
1627
- const columns = chunkC2RWFIYP_cjs.edgeColumnList(edges2);
1627
+ const columns = chunkUESTHN47_cjs.edgeColumnList(edges2);
1628
1628
  return drizzleOrm.sql`
1629
1629
  INSERT INTO ${edges2} (${columns})
1630
1630
  VALUES (
1631
1631
  ${params.graphId}, ${params.id}, ${params.kind},
1632
1632
  ${params.fromKind}, ${params.fromId}, ${params.toKind}, ${params.toId},
1633
- ${propsJson}, ${chunkC2RWFIYP_cjs.sqlNull(params.validFrom)}, ${chunkC2RWFIYP_cjs.sqlNull(params.validTo)},
1633
+ ${propsJson}, ${chunkUESTHN47_cjs.sqlNull(params.validFrom)}, ${chunkUESTHN47_cjs.sqlNull(params.validTo)},
1634
1634
  ${timestamp2}, ${timestamp2}
1635
1635
  )
1636
1636
  `;
1637
1637
  }
1638
1638
  function buildInsertEdgesBatch(tables3, params, timestamp2) {
1639
1639
  const { edges: edges2 } = tables3;
1640
- const columns = chunkC2RWFIYP_cjs.edgeColumnList(edges2);
1640
+ const columns = chunkUESTHN47_cjs.edgeColumnList(edges2);
1641
1641
  const values = params.map((edgeParams) => {
1642
1642
  const propsJson = JSON.stringify(edgeParams.props);
1643
- return drizzleOrm.sql`(${edgeParams.graphId}, ${edgeParams.id}, ${edgeParams.kind}, ${edgeParams.fromKind}, ${edgeParams.fromId}, ${edgeParams.toKind}, ${edgeParams.toId}, ${propsJson}, ${chunkC2RWFIYP_cjs.sqlNull(edgeParams.validFrom)}, ${chunkC2RWFIYP_cjs.sqlNull(edgeParams.validTo)}, ${timestamp2}, ${timestamp2})`;
1643
+ return drizzleOrm.sql`(${edgeParams.graphId}, ${edgeParams.id}, ${edgeParams.kind}, ${edgeParams.fromKind}, ${edgeParams.fromId}, ${edgeParams.toKind}, ${edgeParams.toId}, ${propsJson}, ${chunkUESTHN47_cjs.sqlNull(edgeParams.validFrom)}, ${chunkUESTHN47_cjs.sqlNull(edgeParams.validTo)}, ${timestamp2}, ${timestamp2})`;
1644
1644
  });
1645
1645
  return drizzleOrm.sql`
1646
1646
  INSERT INTO ${edges2} (${columns})
@@ -1649,10 +1649,10 @@ function buildInsertEdgesBatch(tables3, params, timestamp2) {
1649
1649
  }
1650
1650
  function buildInsertEdgesBatchReturning(tables3, params, timestamp2) {
1651
1651
  const { edges: edges2 } = tables3;
1652
- const columns = chunkC2RWFIYP_cjs.edgeColumnList(edges2);
1652
+ const columns = chunkUESTHN47_cjs.edgeColumnList(edges2);
1653
1653
  const values = params.map((edgeParams) => {
1654
1654
  const propsJson = JSON.stringify(edgeParams.props);
1655
- return drizzleOrm.sql`(${edgeParams.graphId}, ${edgeParams.id}, ${edgeParams.kind}, ${edgeParams.fromKind}, ${edgeParams.fromId}, ${edgeParams.toKind}, ${edgeParams.toId}, ${propsJson}, ${chunkC2RWFIYP_cjs.sqlNull(edgeParams.validFrom)}, ${chunkC2RWFIYP_cjs.sqlNull(edgeParams.validTo)}, ${timestamp2}, ${timestamp2})`;
1655
+ return drizzleOrm.sql`(${edgeParams.graphId}, ${edgeParams.id}, ${edgeParams.kind}, ${edgeParams.fromKind}, ${edgeParams.fromId}, ${edgeParams.toKind}, ${edgeParams.toId}, ${propsJson}, ${chunkUESTHN47_cjs.sqlNull(edgeParams.validFrom)}, ${chunkUESTHN47_cjs.sqlNull(edgeParams.validTo)}, ${timestamp2}, ${timestamp2})`;
1656
1656
  });
1657
1657
  return drizzleOrm.sql`
1658
1658
  INSERT INTO ${edges2} (${columns})
@@ -1684,14 +1684,14 @@ function buildUpdateEdge(tables3, params, timestamp2) {
1684
1684
  const { edges: edges2 } = tables3;
1685
1685
  const propsJson = JSON.stringify(params.props);
1686
1686
  const setParts = [
1687
- drizzleOrm.sql`${chunkC2RWFIYP_cjs.quotedColumn(edges2.props)} = ${propsJson}`,
1688
- drizzleOrm.sql`${chunkC2RWFIYP_cjs.quotedColumn(edges2.updatedAt)} = ${timestamp2}`
1687
+ drizzleOrm.sql`${chunkUESTHN47_cjs.quotedColumn(edges2.props)} = ${propsJson}`,
1688
+ drizzleOrm.sql`${chunkUESTHN47_cjs.quotedColumn(edges2.updatedAt)} = ${timestamp2}`
1689
1689
  ];
1690
1690
  if (params.validTo !== void 0) {
1691
- setParts.push(drizzleOrm.sql`${chunkC2RWFIYP_cjs.quotedColumn(edges2.validTo)} = ${params.validTo}`);
1691
+ setParts.push(drizzleOrm.sql`${chunkUESTHN47_cjs.quotedColumn(edges2.validTo)} = ${params.validTo}`);
1692
1692
  }
1693
1693
  if (params.clearDeleted) {
1694
- setParts.push(drizzleOrm.sql`${chunkC2RWFIYP_cjs.quotedColumn(edges2.deletedAt)} = NULL`);
1694
+ setParts.push(drizzleOrm.sql`${chunkUESTHN47_cjs.quotedColumn(edges2.deletedAt)} = NULL`);
1695
1695
  }
1696
1696
  const setClause = drizzleOrm.sql.join(setParts, drizzleOrm.sql`, `);
1697
1697
  if (params.clearDeleted) {
@@ -1716,7 +1716,7 @@ function buildDeleteEdge(tables3, params, timestamp2) {
1716
1716
  const { edges: edges2 } = tables3;
1717
1717
  return drizzleOrm.sql`
1718
1718
  UPDATE ${edges2}
1719
- SET ${chunkC2RWFIYP_cjs.quotedColumn(edges2.deletedAt)} = ${timestamp2}
1719
+ SET ${chunkUESTHN47_cjs.quotedColumn(edges2.deletedAt)} = ${timestamp2}
1720
1720
  WHERE ${edges2.graphId} = ${params.graphId}
1721
1721
  AND ${edges2.id} = ${params.id}
1722
1722
  AND ${edges2.deletedAt} IS NULL
@@ -1803,7 +1803,7 @@ function resolveMode(mode) {
1803
1803
  function buildFulltextSearch(tableName, params, strategy) {
1804
1804
  assertValidSearchParams(params);
1805
1805
  const mode = resolveMode(params.mode);
1806
- const table = chunkC2RWFIYP_cjs.quotedTableName(tableName);
1806
+ const table = chunkUESTHN47_cjs.quotedTableName(tableName);
1807
1807
  const matchCondition = strategy.matchCondition(
1808
1808
  tableName,
1809
1809
  params.query,
@@ -1854,12 +1854,12 @@ function assertValidSearchParams(params) {
1854
1854
  function buildInsertNode(tables3, params, timestamp2) {
1855
1855
  const { nodes: nodes2 } = tables3;
1856
1856
  const propsJson = JSON.stringify(params.props);
1857
- const columns = chunkC2RWFIYP_cjs.nodeColumnList(nodes2);
1857
+ const columns = chunkUESTHN47_cjs.nodeColumnList(nodes2);
1858
1858
  return drizzleOrm.sql`
1859
1859
  INSERT INTO ${nodes2} (${columns})
1860
1860
  VALUES (
1861
1861
  ${params.graphId}, ${params.kind}, ${params.id}, ${propsJson},
1862
- 1, ${chunkC2RWFIYP_cjs.sqlNull(params.validFrom)}, ${chunkC2RWFIYP_cjs.sqlNull(params.validTo)},
1862
+ 1, ${chunkUESTHN47_cjs.sqlNull(params.validFrom)}, ${chunkUESTHN47_cjs.sqlNull(params.validTo)},
1863
1863
  ${timestamp2}, ${timestamp2}
1864
1864
  )
1865
1865
  RETURNING *
@@ -1868,22 +1868,22 @@ function buildInsertNode(tables3, params, timestamp2) {
1868
1868
  function buildInsertNodeNoReturn(tables3, params, timestamp2) {
1869
1869
  const { nodes: nodes2 } = tables3;
1870
1870
  const propsJson = JSON.stringify(params.props);
1871
- const columns = chunkC2RWFIYP_cjs.nodeColumnList(nodes2);
1871
+ const columns = chunkUESTHN47_cjs.nodeColumnList(nodes2);
1872
1872
  return drizzleOrm.sql`
1873
1873
  INSERT INTO ${nodes2} (${columns})
1874
1874
  VALUES (
1875
1875
  ${params.graphId}, ${params.kind}, ${params.id}, ${propsJson},
1876
- 1, ${chunkC2RWFIYP_cjs.sqlNull(params.validFrom)}, ${chunkC2RWFIYP_cjs.sqlNull(params.validTo)},
1876
+ 1, ${chunkUESTHN47_cjs.sqlNull(params.validFrom)}, ${chunkUESTHN47_cjs.sqlNull(params.validTo)},
1877
1877
  ${timestamp2}, ${timestamp2}
1878
1878
  )
1879
1879
  `;
1880
1880
  }
1881
1881
  function buildInsertNodesBatch(tables3, params, timestamp2) {
1882
1882
  const { nodes: nodes2 } = tables3;
1883
- const columns = chunkC2RWFIYP_cjs.nodeColumnList(nodes2);
1883
+ const columns = chunkUESTHN47_cjs.nodeColumnList(nodes2);
1884
1884
  const values = params.map((nodeParams) => {
1885
1885
  const propsJson = JSON.stringify(nodeParams.props);
1886
- return drizzleOrm.sql`(${nodeParams.graphId}, ${nodeParams.kind}, ${nodeParams.id}, ${propsJson}, 1, ${chunkC2RWFIYP_cjs.sqlNull(nodeParams.validFrom)}, ${chunkC2RWFIYP_cjs.sqlNull(nodeParams.validTo)}, ${timestamp2}, ${timestamp2})`;
1886
+ return drizzleOrm.sql`(${nodeParams.graphId}, ${nodeParams.kind}, ${nodeParams.id}, ${propsJson}, 1, ${chunkUESTHN47_cjs.sqlNull(nodeParams.validFrom)}, ${chunkUESTHN47_cjs.sqlNull(nodeParams.validTo)}, ${timestamp2}, ${timestamp2})`;
1887
1887
  });
1888
1888
  return drizzleOrm.sql`
1889
1889
  INSERT INTO ${nodes2} (${columns})
@@ -1892,10 +1892,10 @@ function buildInsertNodesBatch(tables3, params, timestamp2) {
1892
1892
  }
1893
1893
  function buildInsertNodesBatchReturning(tables3, params, timestamp2) {
1894
1894
  const { nodes: nodes2 } = tables3;
1895
- const columns = chunkC2RWFIYP_cjs.nodeColumnList(nodes2);
1895
+ const columns = chunkUESTHN47_cjs.nodeColumnList(nodes2);
1896
1896
  const values = params.map((nodeParams) => {
1897
1897
  const propsJson = JSON.stringify(nodeParams.props);
1898
- return drizzleOrm.sql`(${nodeParams.graphId}, ${nodeParams.kind}, ${nodeParams.id}, ${propsJson}, 1, ${chunkC2RWFIYP_cjs.sqlNull(nodeParams.validFrom)}, ${chunkC2RWFIYP_cjs.sqlNull(nodeParams.validTo)}, ${timestamp2}, ${timestamp2})`;
1898
+ return drizzleOrm.sql`(${nodeParams.graphId}, ${nodeParams.kind}, ${nodeParams.id}, ${propsJson}, 1, ${chunkUESTHN47_cjs.sqlNull(nodeParams.validFrom)}, ${chunkUESTHN47_cjs.sqlNull(nodeParams.validTo)}, ${timestamp2}, ${timestamp2})`;
1899
1899
  });
1900
1900
  return drizzleOrm.sql`
1901
1901
  INSERT INTO ${nodes2} (${columns})
@@ -1929,19 +1929,19 @@ function buildUpdateNode(tables3, params, timestamp2) {
1929
1929
  const { nodes: nodes2 } = tables3;
1930
1930
  const propsJson = JSON.stringify(params.props);
1931
1931
  const setParts = [
1932
- drizzleOrm.sql`${chunkC2RWFIYP_cjs.quotedColumn(nodes2.props)} = ${propsJson}`,
1933
- drizzleOrm.sql`${chunkC2RWFIYP_cjs.quotedColumn(nodes2.updatedAt)} = ${timestamp2}`
1932
+ drizzleOrm.sql`${chunkUESTHN47_cjs.quotedColumn(nodes2.props)} = ${propsJson}`,
1933
+ drizzleOrm.sql`${chunkUESTHN47_cjs.quotedColumn(nodes2.updatedAt)} = ${timestamp2}`
1934
1934
  ];
1935
1935
  if (params.incrementVersion) {
1936
1936
  setParts.push(
1937
- drizzleOrm.sql`${chunkC2RWFIYP_cjs.quotedColumn(nodes2.version)} = ${chunkC2RWFIYP_cjs.quotedColumn(nodes2.version)} + 1`
1937
+ drizzleOrm.sql`${chunkUESTHN47_cjs.quotedColumn(nodes2.version)} = ${chunkUESTHN47_cjs.quotedColumn(nodes2.version)} + 1`
1938
1938
  );
1939
1939
  }
1940
1940
  if (params.validTo !== void 0) {
1941
- setParts.push(drizzleOrm.sql`${chunkC2RWFIYP_cjs.quotedColumn(nodes2.validTo)} = ${params.validTo}`);
1941
+ setParts.push(drizzleOrm.sql`${chunkUESTHN47_cjs.quotedColumn(nodes2.validTo)} = ${params.validTo}`);
1942
1942
  }
1943
1943
  if (params.clearDeleted) {
1944
- setParts.push(drizzleOrm.sql`${chunkC2RWFIYP_cjs.quotedColumn(nodes2.deletedAt)} = NULL`);
1944
+ setParts.push(drizzleOrm.sql`${chunkUESTHN47_cjs.quotedColumn(nodes2.deletedAt)} = NULL`);
1945
1945
  }
1946
1946
  const setClause = drizzleOrm.sql.join(setParts, drizzleOrm.sql`, `);
1947
1947
  if (params.clearDeleted) {
@@ -1968,7 +1968,7 @@ function buildDeleteNode(tables3, params, timestamp2) {
1968
1968
  const { nodes: nodes2 } = tables3;
1969
1969
  return drizzleOrm.sql`
1970
1970
  UPDATE ${nodes2}
1971
- SET ${chunkC2RWFIYP_cjs.quotedColumn(nodes2.deletedAt)} = ${timestamp2}
1971
+ SET ${chunkUESTHN47_cjs.quotedColumn(nodes2.deletedAt)} = ${timestamp2}
1972
1972
  WHERE ${nodes2.graphId} = ${params.graphId}
1973
1973
  AND ${nodes2.kind} = ${params.kind}
1974
1974
  AND ${nodes2.id} = ${params.id}
@@ -2035,12 +2035,12 @@ function buildSetActiveSchema(tables3, graphId, version, dialect = "sqlite") {
2035
2035
  const strategy = SCHEMA_DIALECT_STRATEGIES[dialect];
2036
2036
  const deactivateAll = drizzleOrm.sql`
2037
2037
  UPDATE ${schemaVersions2}
2038
- SET ${chunkC2RWFIYP_cjs.quotedColumn(schemaVersions2.isActive)} = ${strategy.booleanLiteral(false)}
2038
+ SET ${chunkUESTHN47_cjs.quotedColumn(schemaVersions2.isActive)} = ${strategy.booleanLiteral(false)}
2039
2039
  WHERE ${schemaVersions2.graphId} = ${graphId}
2040
2040
  `;
2041
2041
  const activateVersion = drizzleOrm.sql`
2042
2042
  UPDATE ${schemaVersions2}
2043
- SET ${chunkC2RWFIYP_cjs.quotedColumn(schemaVersions2.isActive)} = ${strategy.booleanLiteral(true)}
2043
+ SET ${chunkUESTHN47_cjs.quotedColumn(schemaVersions2.isActive)} = ${strategy.booleanLiteral(true)}
2044
2044
  WHERE ${schemaVersions2.graphId} = ${graphId}
2045
2045
  AND ${schemaVersions2.version} = ${version}
2046
2046
  `;
@@ -2058,22 +2058,22 @@ function buildInsertUniqueSqlite(tables3, params) {
2058
2058
  )
2059
2059
  ON CONFLICT (${conflictColumns})
2060
2060
  DO UPDATE SET
2061
- ${chunkC2RWFIYP_cjs.quotedColumn(uniques2.nodeId)} = CASE
2062
- WHEN ${chunkC2RWFIYP_cjs.quotedColumn(uniques2.nodeId)} = ${params.nodeId} THEN ${params.nodeId}
2063
- WHEN ${chunkC2RWFIYP_cjs.quotedColumn(uniques2.deletedAt)} IS NOT NULL THEN ${params.nodeId}
2064
- ELSE ${chunkC2RWFIYP_cjs.quotedColumn(uniques2.nodeId)}
2061
+ ${chunkUESTHN47_cjs.quotedColumn(uniques2.nodeId)} = CASE
2062
+ WHEN ${chunkUESTHN47_cjs.quotedColumn(uniques2.nodeId)} = ${params.nodeId} THEN ${params.nodeId}
2063
+ WHEN ${chunkUESTHN47_cjs.quotedColumn(uniques2.deletedAt)} IS NOT NULL THEN ${params.nodeId}
2064
+ ELSE ${chunkUESTHN47_cjs.quotedColumn(uniques2.nodeId)}
2065
2065
  END,
2066
- ${chunkC2RWFIYP_cjs.quotedColumn(uniques2.concreteKind)} = CASE
2067
- WHEN ${chunkC2RWFIYP_cjs.quotedColumn(uniques2.nodeId)} = ${params.nodeId} THEN ${params.concreteKind}
2068
- WHEN ${chunkC2RWFIYP_cjs.quotedColumn(uniques2.deletedAt)} IS NOT NULL THEN ${params.concreteKind}
2069
- ELSE ${chunkC2RWFIYP_cjs.quotedColumn(uniques2.concreteKind)}
2066
+ ${chunkUESTHN47_cjs.quotedColumn(uniques2.concreteKind)} = CASE
2067
+ WHEN ${chunkUESTHN47_cjs.quotedColumn(uniques2.nodeId)} = ${params.nodeId} THEN ${params.concreteKind}
2068
+ WHEN ${chunkUESTHN47_cjs.quotedColumn(uniques2.deletedAt)} IS NOT NULL THEN ${params.concreteKind}
2069
+ ELSE ${chunkUESTHN47_cjs.quotedColumn(uniques2.concreteKind)}
2070
2070
  END,
2071
- ${chunkC2RWFIYP_cjs.quotedColumn(uniques2.deletedAt)} = CASE
2072
- WHEN ${chunkC2RWFIYP_cjs.quotedColumn(uniques2.nodeId)} = ${params.nodeId} THEN NULL
2073
- WHEN ${chunkC2RWFIYP_cjs.quotedColumn(uniques2.deletedAt)} IS NOT NULL THEN NULL
2074
- ELSE ${chunkC2RWFIYP_cjs.quotedColumn(uniques2.deletedAt)}
2071
+ ${chunkUESTHN47_cjs.quotedColumn(uniques2.deletedAt)} = CASE
2072
+ WHEN ${chunkUESTHN47_cjs.quotedColumn(uniques2.nodeId)} = ${params.nodeId} THEN NULL
2073
+ WHEN ${chunkUESTHN47_cjs.quotedColumn(uniques2.deletedAt)} IS NOT NULL THEN NULL
2074
+ ELSE ${chunkUESTHN47_cjs.quotedColumn(uniques2.deletedAt)}
2075
2075
  END
2076
- RETURNING ${chunkC2RWFIYP_cjs.quotedColumn(uniques2.nodeId)} as node_id
2076
+ RETURNING ${chunkUESTHN47_cjs.quotedColumn(uniques2.nodeId)} as node_id
2077
2077
  `;
2078
2078
  }
2079
2079
  function buildInsertUniquePostgres(tables3, params) {
@@ -2090,22 +2090,22 @@ function buildInsertUniquePostgres(tables3, params) {
2090
2090
  )
2091
2091
  ON CONFLICT (${conflictColumns})
2092
2092
  DO UPDATE SET
2093
- ${chunkC2RWFIYP_cjs.quotedColumn(uniques2.nodeId)} = CASE
2093
+ ${chunkUESTHN47_cjs.quotedColumn(uniques2.nodeId)} = CASE
2094
2094
  WHEN ${existingColumn(uniques2.nodeId)} = ${params.nodeId} THEN ${params.nodeId}
2095
2095
  WHEN ${existingColumn(uniques2.deletedAt)} IS NOT NULL THEN ${params.nodeId}
2096
2096
  ELSE ${existingColumn(uniques2.nodeId)}
2097
2097
  END,
2098
- ${chunkC2RWFIYP_cjs.quotedColumn(uniques2.concreteKind)} = CASE
2098
+ ${chunkUESTHN47_cjs.quotedColumn(uniques2.concreteKind)} = CASE
2099
2099
  WHEN ${existingColumn(uniques2.nodeId)} = ${params.nodeId} THEN ${params.concreteKind}
2100
2100
  WHEN ${existingColumn(uniques2.deletedAt)} IS NOT NULL THEN ${params.concreteKind}
2101
2101
  ELSE ${existingColumn(uniques2.concreteKind)}
2102
2102
  END,
2103
- ${chunkC2RWFIYP_cjs.quotedColumn(uniques2.deletedAt)} = CASE
2103
+ ${chunkUESTHN47_cjs.quotedColumn(uniques2.deletedAt)} = CASE
2104
2104
  WHEN ${existingColumn(uniques2.nodeId)} = ${params.nodeId} THEN NULL
2105
2105
  WHEN ${existingColumn(uniques2.deletedAt)} IS NOT NULL THEN NULL
2106
2106
  ELSE ${existingColumn(uniques2.deletedAt)}
2107
2107
  END
2108
- RETURNING ${chunkC2RWFIYP_cjs.quotedColumn(uniques2.nodeId)} as node_id
2108
+ RETURNING ${chunkUESTHN47_cjs.quotedColumn(uniques2.nodeId)} as node_id
2109
2109
  `;
2110
2110
  }
2111
2111
  var UNIQUE_INSERT_BUILDERS = {
@@ -2120,7 +2120,7 @@ function buildDeleteUnique(tables3, params, timestamp2) {
2120
2120
  const { uniques: uniques2 } = tables3;
2121
2121
  return drizzleOrm.sql`
2122
2122
  UPDATE ${uniques2}
2123
- SET ${chunkC2RWFIYP_cjs.quotedColumn(uniques2.deletedAt)} = ${timestamp2}
2123
+ SET ${chunkUESTHN47_cjs.quotedColumn(uniques2.deletedAt)} = ${timestamp2}
2124
2124
  WHERE ${uniques2.graphId} = ${params.graphId}
2125
2125
  AND ${uniques2.nodeKind} = ${params.nodeKind}
2126
2126
  AND ${uniques2.constraintName} = ${params.constraintName}
@@ -2346,5 +2346,5 @@ exports.uniques = uniques;
2346
2346
  exports.vectorSlotFromCreateIndexParams = vectorSlotFromCreateIndexParams;
2347
2347
  exports.vectorSlotFromDropIndexParams = vectorSlotFromDropIndexParams;
2348
2348
  exports.vectorSlotFromParams = vectorSlotFromParams;
2349
- //# sourceMappingURL=chunk-ZYQEXGYC.cjs.map
2350
- //# sourceMappingURL=chunk-ZYQEXGYC.cjs.map
2349
+ //# sourceMappingURL=chunk-WFCECD6Q.cjs.map
2350
+ //# sourceMappingURL=chunk-WFCECD6Q.cjs.map