@nicia-ai/typegraph 0.65.0 → 0.66.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.
Files changed (196) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/dist/{atomic-mutation-program-BznZQ06C.d.ts → atomic-mutation-program-BhP75Qn0.d.ts} +1 -1
  3. package/dist/{atomic-mutation-program-Bfu5z-je.d.cts → atomic-mutation-program-DMdmc4s0.d.cts} +1 -1
  4. package/dist/backend/drizzle/engine/index.cjs +13 -13
  5. package/dist/backend/drizzle/engine/index.d.cts +9 -9
  6. package/dist/backend/drizzle/engine/index.d.ts +9 -9
  7. package/dist/backend/drizzle/engine/index.js +8 -8
  8. package/dist/backend/drizzle/indexes.d.cts +1 -1
  9. package/dist/backend/drizzle/indexes.d.ts +1 -1
  10. package/dist/backend/index.cjs +91 -91
  11. package/dist/backend/index.d.cts +7 -7
  12. package/dist/backend/index.d.ts +7 -7
  13. package/dist/backend/index.js +8 -8
  14. package/dist/backend/postgres/index.cjs +23 -23
  15. package/dist/backend/postgres/index.d.cts +8 -8
  16. package/dist/backend/postgres/index.d.ts +8 -8
  17. package/dist/backend/postgres/index.js +8 -8
  18. package/dist/backend/postgres/pglite-store.cjs +1 -1
  19. package/dist/backend/postgres/pglite-store.d.cts +6 -6
  20. package/dist/backend/postgres/pglite-store.d.ts +6 -6
  21. package/dist/backend/postgres/pglite-store.js +1 -1
  22. package/dist/backend/postgres/pglite.cjs +10 -10
  23. package/dist/backend/postgres/pglite.d.cts +3 -3
  24. package/dist/backend/postgres/pglite.d.ts +3 -3
  25. package/dist/backend/postgres/pglite.js +9 -9
  26. package/dist/backend/sqlite/index.cjs +21 -21
  27. package/dist/backend/sqlite/index.d.cts +7 -7
  28. package/dist/backend/sqlite/index.d.ts +7 -7
  29. package/dist/backend/sqlite/index.js +8 -8
  30. package/dist/backend/sqlite/libsql.cjs +14 -14
  31. package/dist/backend/sqlite/libsql.d.cts +3 -3
  32. package/dist/backend/sqlite/libsql.d.ts +3 -3
  33. package/dist/backend/sqlite/libsql.js +8 -8
  34. package/dist/backend/sqlite/local-store.cjs +1 -1
  35. package/dist/backend/sqlite/local-store.d.cts +6 -6
  36. package/dist/backend/sqlite/local-store.d.ts +6 -6
  37. package/dist/backend/sqlite/local-store.js +1 -1
  38. package/dist/backend/sqlite/local.cjs +10 -10
  39. package/dist/backend/sqlite/local.d.cts +3 -3
  40. package/dist/backend/sqlite/local.d.ts +3 -3
  41. package/dist/backend/sqlite/local.js +9 -9
  42. package/dist/{chunk-PFXNQFFY.js → chunk-2DJKHZQ4.js} +75 -8
  43. package/dist/chunk-2DJKHZQ4.js.map +1 -0
  44. package/dist/{chunk-337ONI2I.js → chunk-3SUZXB5X.js} +146 -80
  45. package/dist/chunk-3SUZXB5X.js.map +1 -0
  46. package/dist/{chunk-4VTCIEK3.js → chunk-4TQOIBWH.js} +3 -3
  47. package/dist/{chunk-4VTCIEK3.js.map → chunk-4TQOIBWH.js.map} +1 -1
  48. package/dist/{chunk-JRWKRBI5.cjs → chunk-5JOCIMQ3.cjs} +6 -6
  49. package/dist/{chunk-JRWKRBI5.cjs.map → chunk-5JOCIMQ3.cjs.map} +1 -1
  50. package/dist/{chunk-BWQA3POT.cjs → chunk-6B3LQUYG.cjs} +206 -138
  51. package/dist/chunk-6B3LQUYG.cjs.map +1 -0
  52. package/dist/{chunk-RQPCUHIH.js → chunk-6ECNYQDW.js} +3 -3
  53. package/dist/{chunk-RQPCUHIH.js.map → chunk-6ECNYQDW.js.map} +1 -1
  54. package/dist/{chunk-OLB75LRQ.js → chunk-6GKKAQMW.js} +5 -5
  55. package/dist/{chunk-OLB75LRQ.js.map → chunk-6GKKAQMW.js.map} +1 -1
  56. package/dist/{chunk-OC5ROP7V.cjs → chunk-6JRVV2SS.cjs} +8 -2
  57. package/dist/chunk-6JRVV2SS.cjs.map +1 -0
  58. package/dist/{chunk-DSX3P4S5.cjs → chunk-76OB5RSH.cjs} +6 -6
  59. package/dist/{chunk-DSX3P4S5.cjs.map → chunk-76OB5RSH.cjs.map} +1 -1
  60. package/dist/{chunk-DHRLOQLQ.cjs → chunk-7LQTDGV5.cjs} +11 -11
  61. package/dist/{chunk-DHRLOQLQ.cjs.map → chunk-7LQTDGV5.cjs.map} +1 -1
  62. package/dist/{chunk-Q25QYSOH.js → chunk-7YJHUY4T.js} +9 -9
  63. package/dist/{chunk-Q25QYSOH.js.map → chunk-7YJHUY4T.js.map} +1 -1
  64. package/dist/{chunk-JERQGJKG.cjs → chunk-ANMCKLZQ.cjs} +18 -18
  65. package/dist/{chunk-JERQGJKG.cjs.map → chunk-ANMCKLZQ.cjs.map} +1 -1
  66. package/dist/{chunk-BBOMNH44.js → chunk-BABP4D5B.js} +3 -3
  67. package/dist/{chunk-BBOMNH44.js.map → chunk-BABP4D5B.js.map} +1 -1
  68. package/dist/{chunk-EVGZ2TRQ.js → chunk-BE75G3M5.js} +3 -3
  69. package/dist/{chunk-EVGZ2TRQ.js.map → chunk-BE75G3M5.js.map} +1 -1
  70. package/dist/{chunk-FXGZT3WO.cjs → chunk-BX42F7IJ.cjs} +41 -41
  71. package/dist/{chunk-FXGZT3WO.cjs.map → chunk-BX42F7IJ.cjs.map} +1 -1
  72. package/dist/{chunk-G6T23JU7.js → chunk-CDKNGCE7.js} +3 -3
  73. package/dist/{chunk-G6T23JU7.js.map → chunk-CDKNGCE7.js.map} +1 -1
  74. package/dist/{chunk-BNTJ5YFO.cjs → chunk-EACDHXJL.cjs} +4 -4
  75. package/dist/{chunk-BNTJ5YFO.cjs.map → chunk-EACDHXJL.cjs.map} +1 -1
  76. package/dist/{chunk-SNDJUTMB.cjs → chunk-EBQX7MYL.cjs} +72 -72
  77. package/dist/{chunk-SNDJUTMB.cjs.map → chunk-EBQX7MYL.cjs.map} +1 -1
  78. package/dist/{chunk-GKSAEUX6.js → chunk-FXOFJ4FS.js} +7 -7
  79. package/dist/{chunk-GKSAEUX6.js.map → chunk-FXOFJ4FS.js.map} +1 -1
  80. package/dist/{chunk-ZOWRACZQ.cjs → chunk-G7OKJDMG.cjs} +5 -5
  81. package/dist/{chunk-ZOWRACZQ.cjs.map → chunk-G7OKJDMG.cjs.map} +1 -1
  82. package/dist/{chunk-MKJPBSID.cjs → chunk-I7SBZJI2.cjs} +4 -4
  83. package/dist/{chunk-MKJPBSID.cjs.map → chunk-I7SBZJI2.cjs.map} +1 -1
  84. package/dist/{chunk-H346QK3V.cjs → chunk-K7YACILO.cjs} +9 -9
  85. package/dist/{chunk-H346QK3V.cjs.map → chunk-K7YACILO.cjs.map} +1 -1
  86. package/dist/{chunk-3KWF25MF.cjs → chunk-MN325MG4.cjs} +313 -246
  87. package/dist/chunk-MN325MG4.cjs.map +1 -0
  88. package/dist/{chunk-KDNRACRG.cjs → chunk-MRUOOAIQ.cjs} +4 -4
  89. package/dist/{chunk-KDNRACRG.cjs.map → chunk-MRUOOAIQ.cjs.map} +1 -1
  90. package/dist/{chunk-HTSJTWUT.js → chunk-OF63ZHSD.js} +4 -4
  91. package/dist/{chunk-HTSJTWUT.js.map → chunk-OF63ZHSD.js.map} +1 -1
  92. package/dist/{chunk-NGA3THGU.cjs → chunk-QR7W37HG.cjs} +14 -14
  93. package/dist/{chunk-NGA3THGU.cjs.map → chunk-QR7W37HG.cjs.map} +1 -1
  94. package/dist/{chunk-QFEO4M5W.js → chunk-RTPMG6LQ.js} +11 -11
  95. package/dist/{chunk-QFEO4M5W.js.map → chunk-RTPMG6LQ.js.map} +1 -1
  96. package/dist/{chunk-PFD4NUYV.js → chunk-SSDHR2C2.js} +3 -3
  97. package/dist/{chunk-PFD4NUYV.js.map → chunk-SSDHR2C2.js.map} +1 -1
  98. package/dist/{chunk-THK3SCQA.js → chunk-SYXTWPX6.js} +5 -5
  99. package/dist/{chunk-THK3SCQA.js.map → chunk-SYXTWPX6.js.map} +1 -1
  100. package/dist/{chunk-XSLQYGNR.cjs → chunk-T3VU3YRQ.cjs} +69 -69
  101. package/dist/{chunk-XSLQYGNR.cjs.map → chunk-T3VU3YRQ.cjs.map} +1 -1
  102. package/dist/{chunk-MIBWA6HX.js → chunk-TR7QTODF.js} +213 -33
  103. package/dist/chunk-TR7QTODF.js.map +1 -0
  104. package/dist/{chunk-AD3NLSV5.js → chunk-TU22BFMP.js} +8 -2
  105. package/dist/chunk-TU22BFMP.js.map +1 -0
  106. package/dist/{chunk-WTMSUIRO.js → chunk-UFKYMQJ5.js} +3 -3
  107. package/dist/{chunk-WTMSUIRO.js.map → chunk-UFKYMQJ5.js.map} +1 -1
  108. package/dist/{chunk-35LDKSMM.cjs → chunk-VNJMM2QQ.cjs} +30 -30
  109. package/dist/{chunk-35LDKSMM.cjs.map → chunk-VNJMM2QQ.cjs.map} +1 -1
  110. package/dist/{chunk-53ZEBIMD.js → chunk-WB55URNM.js} +6 -6
  111. package/dist/{chunk-53ZEBIMD.js.map → chunk-WB55URNM.js.map} +1 -1
  112. package/dist/{chunk-L2GBVYRU.cjs → chunk-WWSYGZED.cjs} +11 -11
  113. package/dist/{chunk-L2GBVYRU.cjs.map → chunk-WWSYGZED.cjs.map} +1 -1
  114. package/dist/{chunk-D2JPOFRZ.cjs → chunk-WY3IFEKV.cjs} +191 -191
  115. package/dist/{chunk-D2JPOFRZ.cjs.map → chunk-WY3IFEKV.cjs.map} +1 -1
  116. package/dist/{chunk-3RSFLZ7A.cjs → chunk-Y4X6ODVY.cjs} +943 -763
  117. package/dist/chunk-Y4X6ODVY.cjs.map +1 -0
  118. package/dist/{chunk-VZRXXABW.js → chunk-YHMXF7OZ.js} +5 -5
  119. package/dist/{chunk-VZRXXABW.js.map → chunk-YHMXF7OZ.js.map} +1 -1
  120. package/dist/{chunk-VROJKWZ7.js → chunk-ZONDBN6H.js} +5 -5
  121. package/dist/{chunk-VROJKWZ7.js.map → chunk-ZONDBN6H.js.map} +1 -1
  122. package/dist/core/index.d.cts +3 -3
  123. package/dist/core/index.d.ts +3 -3
  124. package/dist/{ddl-DvW9aobX.d.ts → ddl-2q7xLM1X.d.ts} +3 -3
  125. package/dist/{ddl-BjuXbPfw.d.cts → ddl-D_09BfbN.d.cts} +3 -3
  126. package/dist/graph-extension/index.d.cts +2 -2
  127. package/dist/graph-extension/index.d.ts +2 -2
  128. package/dist/graph-merge/index.cjs +156 -156
  129. package/dist/graph-merge/index.d.cts +7 -7
  130. package/dist/graph-merge/index.d.ts +7 -7
  131. package/dist/graph-merge/index.js +14 -14
  132. package/dist/{graph-templates-1vMqlPsu.d.cts → graph-templates-B5Q7oYAA.d.cts} +2 -2
  133. package/dist/{graph-templates-Y52w16dH.d.ts → graph-templates-D9N-Z9kw.d.ts} +2 -2
  134. package/dist/index.cjs +99 -99
  135. package/dist/index.d.cts +10 -10
  136. package/dist/index.d.ts +10 -10
  137. package/dist/index.js +18 -18
  138. package/dist/indexes/index.d.cts +4 -4
  139. package/dist/indexes/index.d.ts +4 -4
  140. package/dist/{ingestion-import-target-CCKeXZbW.d.ts → ingestion-import-target-B8EU6ug2.d.ts} +1 -1
  141. package/dist/{ingestion-import-target-774QRgkF.d.cts → ingestion-import-target-C5sHNFJF.d.cts} +1 -1
  142. package/dist/interchange/index.cjs +34 -34
  143. package/dist/interchange/index.d.cts +7 -7
  144. package/dist/interchange/index.d.ts +7 -7
  145. package/dist/interchange/index.js +11 -11
  146. package/dist/{local-store-impl-DFKS7QTV.js → local-store-impl-ERPNYOCL.js} +18 -18
  147. package/dist/{local-store-impl-DFKS7QTV.js.map → local-store-impl-ERPNYOCL.js.map} +1 -1
  148. package/dist/{local-store-impl-3E4VLFCI.cjs → local-store-impl-OUINMCYI.cjs} +22 -22
  149. package/dist/{local-store-impl-3E4VLFCI.cjs.map → local-store-impl-OUINMCYI.cjs.map} +1 -1
  150. package/dist/{pglite-store-impl-N63GGBU2.js → pglite-store-impl-DUJBQZS5.js} +18 -18
  151. package/dist/{pglite-store-impl-N63GGBU2.js.map → pglite-store-impl-DUJBQZS5.js.map} +1 -1
  152. package/dist/{pglite-store-impl-T75O3LVQ.cjs → pglite-store-impl-Z3SOOP75.cjs} +22 -22
  153. package/dist/{pglite-store-impl-T75O3LVQ.cjs.map → pglite-store-impl-Z3SOOP75.cjs.map} +1 -1
  154. package/dist/{postgres-C9gitL71.d.ts → postgres-BbTYW3b_.d.ts} +3 -3
  155. package/dist/{postgres-BONrXHb4.d.cts → postgres-DOBXcZVg.d.cts} +1 -1
  156. package/dist/{postgres-DAFRdnTr.d.ts → postgres-DhZixg92.d.ts} +1 -1
  157. package/dist/{postgres-2FYdVYCm.d.cts → postgres-Dp3MpyJt.d.cts} +3 -3
  158. package/dist/{profile-CAD65CqS.d.ts → profile-Ch5SSewK.d.ts} +8 -8
  159. package/dist/{profile-Bmcg07Ki.d.cts → profile-DppApFgt.d.cts} +8 -8
  160. package/dist/profiler/index.d.cts +8 -8
  161. package/dist/profiler/index.d.ts +8 -8
  162. package/dist/provenance/index.cjs +22 -22
  163. package/dist/provenance/index.d.cts +6 -6
  164. package/dist/provenance/index.d.ts +6 -6
  165. package/dist/provenance/index.js +6 -6
  166. package/dist/{repair-validity-windows-CinP91t7.d.cts → repair-validity-windows-CpP_GpIx.d.cts} +1 -1
  167. package/dist/{repair-validity-windows-BJz4nffP.d.ts → repair-validity-windows-lfe275bY.d.ts} +1 -1
  168. package/dist/{resolve-DgOSlXx_.d.ts → resolve-CoYqHqno.d.cts} +7 -2
  169. package/dist/{resolve-DQXSEN_A.d.cts → resolve-DV0Iposp.d.ts} +7 -2
  170. package/dist/schema/index.cjs +37 -37
  171. package/dist/schema/index.d.cts +7 -7
  172. package/dist/schema/index.d.ts +7 -7
  173. package/dist/schema/index.js +7 -7
  174. package/dist/{searchable-DMdCwkXO.d.cts → searchable-C7Xt6g45.d.cts} +1 -1
  175. package/dist/{searchable-BPRF0Bah.d.ts → searchable-KKXrPet3.d.ts} +1 -1
  176. package/dist/{sqlite-DgbYa-1Y.d.cts → sqlite-BkQM9ZeI.d.cts} +1 -1
  177. package/dist/{sqlite-Co_uIpfs.d.cts → sqlite-BpRtjC36.d.cts} +3 -3
  178. package/dist/{sqlite-DcDAAYow.d.ts → sqlite-CH0Zq0Qv.d.ts} +3 -3
  179. package/dist/{sqlite-UlG5prJQ.d.ts → sqlite-CcCSeXGg.d.ts} +1 -1
  180. package/dist/{store-HxoFyQMu.d.cts → store-3nfPQK5j.d.cts} +30 -7
  181. package/dist/{store-C9T1c9Az.d.ts → store-C8ZPl7OW.d.ts} +30 -7
  182. package/dist/{types-CRCyg1fJ.d.cts → types-BynPp5kU.d.cts} +18 -2
  183. package/dist/{types-CRCyg1fJ.d.ts → types-BynPp5kU.d.ts} +18 -2
  184. package/dist/{types-Dg_prBqC.d.ts → types-C9YwrkSe.d.ts} +1 -1
  185. package/dist/{types-B5AUesS1.d.cts → types-JG-4CG6P.d.cts} +1 -1
  186. package/dist/{where-gRyc3jj_.d.cts → where-D1gBDqQ_.d.cts} +1 -1
  187. package/dist/{where-D-NDKMPw.d.ts → where-D2GqMFp-.d.ts} +1 -1
  188. package/package.json +1 -1
  189. package/dist/chunk-337ONI2I.js.map +0 -1
  190. package/dist/chunk-3KWF25MF.cjs.map +0 -1
  191. package/dist/chunk-3RSFLZ7A.cjs.map +0 -1
  192. package/dist/chunk-AD3NLSV5.js.map +0 -1
  193. package/dist/chunk-BWQA3POT.cjs.map +0 -1
  194. package/dist/chunk-MIBWA6HX.js.map +0 -1
  195. package/dist/chunk-OC5ROP7V.cjs.map +0 -1
  196. package/dist/chunk-PFXNQFFY.js.map +0 -1
@@ -2,13 +2,13 @@
2
2
 
3
3
  var chunkDCYIUKIM_cjs = require('./chunk-DCYIUKIM.cjs');
4
4
  var chunkFZKXBPTS_cjs = require('./chunk-FZKXBPTS.cjs');
5
- var chunkDSX3P4S5_cjs = require('./chunk-DSX3P4S5.cjs');
6
- var chunkMKJPBSID_cjs = require('./chunk-MKJPBSID.cjs');
7
- var chunkZOWRACZQ_cjs = require('./chunk-ZOWRACZQ.cjs');
8
- var chunkKDNRACRG_cjs = require('./chunk-KDNRACRG.cjs');
5
+ var chunk76OB5RSH_cjs = require('./chunk-76OB5RSH.cjs');
6
+ var chunkI7SBZJI2_cjs = require('./chunk-I7SBZJI2.cjs');
7
+ var chunkG7OKJDMG_cjs = require('./chunk-G7OKJDMG.cjs');
8
+ var chunkMRUOOAIQ_cjs = require('./chunk-MRUOOAIQ.cjs');
9
9
  var chunk6YKISECL_cjs = require('./chunk-6YKISECL.cjs');
10
- var chunkJRWKRBI5_cjs = require('./chunk-JRWKRBI5.cjs');
11
- var chunkOC5ROP7V_cjs = require('./chunk-OC5ROP7V.cjs');
10
+ var chunk5JOCIMQ3_cjs = require('./chunk-5JOCIMQ3.cjs');
11
+ var chunk6JRVV2SS_cjs = require('./chunk-6JRVV2SS.cjs');
12
12
  var chunk5ICDVLI3_cjs = require('./chunk-5ICDVLI3.cjs');
13
13
  var chunkL4L4AV6F_cjs = require('./chunk-L4L4AV6F.cjs');
14
14
  var chunkMDSN3W3Z_cjs = require('./chunk-MDSN3W3Z.cjs');
@@ -78,6 +78,7 @@ var ENTITY_WRITE_MEMBERS = [
78
78
  "insertNodesBatch",
79
79
  "insertNodesBatchReturning",
80
80
  "updateNode",
81
+ "upsertHeterogeneousNodes",
81
82
  "updateResolvedNodesBatch",
82
83
  "compareAndSetNode",
83
84
  "updateNodeSet",
@@ -204,7 +205,7 @@ var PENDING_FOREVER = new Promise(noop);
204
205
  function pendingForever() {
205
206
  return PENDING_FOREVER;
206
207
  }
207
- var queueTaskContextLoader = chunkJRWKRBI5_cjs.createAsyncContextLoader();
208
+ var queueTaskContextLoader = chunk5JOCIMQ3_cjs.createAsyncContextLoader();
208
209
  function rejectReentrantQueueSubmission(subject) {
209
210
  return Promise.reject(
210
211
  new chunk7XYPLAPL_cjs.ConfigurationError(
@@ -1793,7 +1794,7 @@ var SQLITE_CONTRIBUTION_MAT_TIMESTAMPS = {
1793
1794
  encode: (value) => value
1794
1795
  };
1795
1796
  var POSTGRES_CONTRIBUTION_MAT_TIMESTAMPS = {
1796
- decode: chunkDSX3P4S5_cjs.formatPostgresTimestamp,
1797
+ decode: chunk76OB5RSH_cjs.formatPostgresTimestamp,
1797
1798
  encode: (value) => new Date(value)
1798
1799
  };
1799
1800
  function mapContributionMaterializationRow(row, decode) {
@@ -1843,7 +1844,7 @@ function contributionSignatureInput(dialect, identity, createDdl) {
1843
1844
  tableName: identity.tableName,
1844
1845
  createDdl
1845
1846
  };
1846
- return JSON.stringify(hashable, chunkJRWKRBI5_cjs.sortedReplacer);
1847
+ return JSON.stringify(hashable, chunk5JOCIMQ3_cjs.sortedReplacer);
1847
1848
  }
1848
1849
  function evaluateContributionState(row, signature) {
1849
1850
  if (row === void 0) return "missing";
@@ -1905,7 +1906,7 @@ function markerGraphId(graphId, contribution) {
1905
1906
  }
1906
1907
  function missingTableErrorNames(error, tableName) {
1907
1908
  const quotedTableName2 = `"${tableName.replaceAll('"', '""')}"`;
1908
- for (const link of chunkOC5ROP7V_cjs.errorChain(error)) {
1909
+ for (const link of chunk6JRVV2SS_cjs.errorChain(error)) {
1909
1910
  const message = errorMessage(link);
1910
1911
  if (typeof message !== "string") continue;
1911
1912
  const sqliteMatch = /\bno such table:\s*([^\s;:]+)/i.exec(message);
@@ -2010,7 +2011,7 @@ function gateFulltextMethods(source, assert, refuseUnavailable) {
2010
2011
  return gated;
2011
2012
  }
2012
2013
  function gateFulltext(tx, assert, refuseUnavailable) {
2013
- return chunkOC5ROP7V_cjs.deriveTransactionSessionBackend(
2014
+ return chunk6JRVV2SS_cjs.deriveTransactionSessionBackend(
2014
2015
  tx,
2015
2016
  gateFulltextMethods(tx, assert, refuseUnavailable)
2016
2017
  );
@@ -2144,13 +2145,13 @@ function createContributionMaterializer(deps) {
2144
2145
  if (deps.recordFailedAttempts !== false) await deps.recordMarker({
2145
2146
  ...identity,
2146
2147
  signature: existing.signature,
2147
- attemptedAt: chunkDSX3P4S5_cjs.nowIso(),
2148
+ attemptedAt: chunk76OB5RSH_cjs.nowIso(),
2148
2149
  materializedAt: void 0,
2149
2150
  error: error.message
2150
2151
  });
2151
2152
  throw error;
2152
2153
  }
2153
- const attemptedAt = chunkDSX3P4S5_cjs.nowIso();
2154
+ const attemptedAt = chunk76OB5RSH_cjs.nowIso();
2154
2155
  try {
2155
2156
  for (const statement of contribution.createDdl) {
2156
2157
  await deps.execDdl(statement);
@@ -2188,7 +2189,7 @@ function createContributionMaterializer(deps) {
2188
2189
  )
2189
2190
  };
2190
2191
  } catch (error) {
2191
- if (!chunkOC5ROP7V_cjs.isMissingTableError(error)) throw error;
2192
+ if (!chunk6JRVV2SS_cjs.isMissingTableError(error)) throw error;
2192
2193
  return { kind: "missing-table", error };
2193
2194
  }
2194
2195
  }
@@ -2263,7 +2264,7 @@ function createContributionMaterializer(deps) {
2263
2264
  const physicalRows = indexMarkerRows(
2264
2265
  await getMarkerRowsForGraph(graphId, true)
2265
2266
  );
2266
- const attemptedAt = chunkDSX3P4S5_cjs.nowIso();
2267
+ const attemptedAt = chunk76OB5RSH_cjs.nowIso();
2267
2268
  for (const contribution of deploymentContributions) {
2268
2269
  const physicalKey = contributionKey(
2269
2270
  chunk4YMHXGA6_cjs.DEPLOYMENT_CONTRIBUTION_GRAPH_ID,
@@ -2398,7 +2399,7 @@ function createContributionMaterializer(deps) {
2398
2399
  }
2399
2400
  async function refuseUnavailableFulltext(graphId, error) {
2400
2401
  await Promise.resolve();
2401
- if (!chunkOC5ROP7V_cjs.isMissingTableError(error)) throw error;
2402
+ if (!chunk6JRVV2SS_cjs.isMissingTableError(error)) throw error;
2402
2403
  const missingContribution = runtimeContributions().find(
2403
2404
  (contribution) => contribution.logicalName === "fulltext" && missingTableErrorNames(error, contribution.tableName)
2404
2405
  );
@@ -2413,7 +2414,7 @@ function createContributionMaterializer(deps) {
2413
2414
  }
2414
2415
  async function refuseUnavailableNodeInsertProjections(graphId, projections, error) {
2415
2416
  await Promise.resolve();
2416
- if (!chunkOC5ROP7V_cjs.isMissingTableError(error)) throw error;
2417
+ if (!chunk6JRVV2SS_cjs.isMissingTableError(error)) throw error;
2417
2418
  const vectorContributions = groupVectorContributions(projections.vectorSlots).get(graphId) ?? [];
2418
2419
  const missingContribution = [
2419
2420
  ...projections.fulltext ? runtimeContributions() : [],
@@ -2705,8 +2706,8 @@ function createContributionMaterializer(deps) {
2705
2706
  };
2706
2707
  }
2707
2708
  async function lockContributionDdl(tx) {
2708
- const plan = chunkOC5ROP7V_cjs.resolveWriteFencePlan(deps.fenceTarget);
2709
- const fence = chunkOC5ROP7V_cjs.requireWriteFence(plan, "contribution DDL", "keyed");
2709
+ const plan = chunk6JRVV2SS_cjs.resolveWriteFencePlan(deps.fenceTarget);
2710
+ const fence = chunk6JRVV2SS_cjs.requireWriteFence(plan, "contribution DDL", "keyed");
2710
2711
  switch (fence.kind) {
2711
2712
  case "lock":
2712
2713
  case "row": {
@@ -2724,8 +2725,8 @@ function createContributionMaterializer(deps) {
2724
2725
  }
2725
2726
  }
2726
2727
  async function lockSharedFulltextTable(tx, tableName) {
2727
- const plan = chunkOC5ROP7V_cjs.resolveWriteFencePlan(deps.fenceTarget);
2728
- const fence = chunkOC5ROP7V_cjs.requireWriteFence(
2728
+ const plan = chunk6JRVV2SS_cjs.resolveWriteFencePlan(deps.fenceTarget);
2729
+ const fence = chunk6JRVV2SS_cjs.requireWriteFence(
2729
2730
  plan,
2730
2731
  "shared fulltext table lock",
2731
2732
  "drain"
@@ -2738,7 +2739,7 @@ function createContributionMaterializer(deps) {
2738
2739
  }
2739
2740
  await tx.executeStatement(
2740
2741
  chunkXPSPDFKO_cjs.asCompiledStatementSql(
2741
- chunkOC5ROP7V_cjs.requireFenceLockTables(fence, "lockSharedFulltextTable")(
2742
+ chunk6JRVV2SS_cjs.requireFenceLockTables(fence, "lockSharedFulltextTable")(
2742
2743
  [tableName],
2743
2744
  "access-exclusive"
2744
2745
  )
@@ -2865,7 +2866,7 @@ function createContributionMaterializer(deps) {
2865
2866
  }
2866
2867
  const stats = await repopulate(tx);
2867
2868
  for (const { contribution, signature } of stamps2) {
2868
- const now = chunkDSX3P4S5_cjs.nowIso();
2869
+ const now = chunk76OB5RSH_cjs.nowIso();
2869
2870
  await record({
2870
2871
  ...identityOf(graphId, contribution),
2871
2872
  signature,
@@ -2892,10 +2893,10 @@ function createContributionMaterializer(deps) {
2892
2893
  });
2893
2894
  return { rebuilt: rebuilt2, stamps: stamps2 };
2894
2895
  };
2895
- const { rebuilt, stamps } = chunkJRWKRBI5_cjs.isOptimisticRetryTier(deps.fenceTarget) ? await chunkJRWKRBI5_cjs.runRetriedUnit(
2896
+ const { rebuilt, stamps } = chunk5JOCIMQ3_cjs.isOptimisticRetryTier(deps.fenceTarget) ? await chunk5JOCIMQ3_cjs.runRetriedUnit(
2896
2897
  {
2897
2898
  operation: "rebuildContribution",
2898
- attempts: chunkJRWKRBI5_cjs.OPTIMISTIC_RETRY_ATTEMPTS,
2899
+ attempts: chunk5JOCIMQ3_cjs.OPTIMISTIC_RETRY_ATTEMPTS,
2899
2900
  target: deps.fenceTarget
2900
2901
  },
2901
2902
  attempt
@@ -3093,7 +3094,7 @@ function finalizeEngineCapabilities(declared, deps) {
3093
3094
  fulltext: declaredFulltext,
3094
3095
  ...declaredWithoutStrategyCapabilities
3095
3096
  } = declared;
3096
- const atomicBatch = chunkKDNRACRG_cjs.createAtomicSqlProgramExecutor(deps.execution) === void 0 ? "none" : "root";
3097
+ const atomicBatch = chunkMRUOOAIQ_cjs.createAtomicSqlProgramExecutor(deps.execution) === void 0 ? "none" : "root";
3097
3098
  return assertBundledCapabilityDeclarations({
3098
3099
  ...declaredWithoutStrategyCapabilities,
3099
3100
  execution: {
@@ -3107,7 +3108,7 @@ function finalizeEngineCapabilities(declared, deps) {
3107
3108
  // `row`/`commit-time` fence both proceed and the loser's COMMIT fails,
3108
3109
  // so on that fence the interactive transaction alone is not enough and
3109
3110
  // every store-owned unit must be a retried one.
3110
- unitOfWork: chunkOC5ROP7V_cjs.deriveUnitOfWork({
3111
+ unitOfWork: chunk6JRVV2SS_cjs.deriveUnitOfWork({
3111
3112
  interactiveTransactions: declared.execution.interactiveTransactions,
3112
3113
  atomicBatch,
3113
3114
  fenceConflict: deps.writeFenceConflict
@@ -3146,15 +3147,15 @@ function finalizeEngineCapabilities(declared, deps) {
3146
3147
  // src/backend/drizzle/engine/marks.ts
3147
3148
  function applyEngineMarks(backend, deps) {
3148
3149
  if (deps.isFirstParty) {
3149
- chunkOC5ROP7V_cjs.markFirstPartyFactory(backend);
3150
+ chunk6JRVV2SS_cjs.markFirstPartyFactory(backend);
3150
3151
  }
3151
- chunkOC5ROP7V_cjs.markSchemaFencedInsertEligibleUnderFence(backend, deps.fencePlan);
3152
+ chunk6JRVV2SS_cjs.markSchemaFencedInsertEligibleUnderFence(backend, deps.fencePlan);
3152
3153
  if (deps.autocommit.singleStatementDurable) {
3153
- chunkMKJPBSID_cjs.markBundledRootAutocommitEligible(backend);
3154
+ chunkI7SBZJI2_cjs.markBundledRootAutocommitEligible(backend);
3154
3155
  }
3155
- if (chunkOC5ROP7V_cjs.supportsRootAtomicBatch(deps.capabilities)) {
3156
- chunkKDNRACRG_cjs.registerAtomicSqlProgram(backend, deps.execution);
3157
- chunkKDNRACRG_cjs.registerAtomicMutationPrograms(backend, deps.atomicMutationPrograms);
3156
+ if (chunk6JRVV2SS_cjs.supportsRootAtomicBatch(deps.capabilities)) {
3157
+ chunkMRUOOAIQ_cjs.registerAtomicSqlProgram(backend, deps.execution);
3158
+ chunkMRUOOAIQ_cjs.registerAtomicMutationPrograms(backend, deps.atomicMutationPrograms);
3158
3159
  }
3159
3160
  }
3160
3161
 
@@ -4027,7 +4028,7 @@ function buildContendedUniqueRowAudit(tables3, graphId, constraintNames) {
4027
4028
  function buildContendedEdgeRowAudit(tables3, graphId, cardinality, edgeKinds) {
4028
4029
  const { edges: edges3 } = tables3;
4029
4030
  const relation = drizzleOrm.getTableName(edges3);
4030
- const spec = chunkZOWRACZQ_cjs.EDGE_CARDINALITY_SPECS[cardinality];
4031
+ const spec = chunkG7OKJDMG_cjs.EDGE_CARDINALITY_SPECS[cardinality];
4031
4032
  const activeOnly = spec.holderLiveness === "liveAndActive" ? drizzleOrm.sql` AND ${qualified(relation, edges3.validTo)} IS NULL` : drizzleOrm.sql.empty();
4032
4033
  const peerActiveOnly = spec.holderLiveness === "liveAndActive" ? drizzleOrm.sql` AND ${qualified(PEER, edges3.validTo)} IS NULL` : drizzleOrm.sql.empty();
4033
4034
  const peerToEndpoints = spec.keyShape === "fromAndTo" ? drizzleOrm.sql`
@@ -4145,7 +4146,7 @@ function proposedRelationCte(tables3, entries) {
4145
4146
  ).join(", ")
4146
4147
  );
4147
4148
  const rows = entries.map((entry) => {
4148
- const target = chunkZOWRACZQ_cjs.edgeCardinalityClaimTarget(entry);
4149
+ const target = chunkG7OKJDMG_cjs.edgeCardinalityClaimTarget(entry);
4149
4150
  const values = {
4150
4151
  graphId: entry.graphId,
4151
4152
  axis: target.axis,
@@ -4184,7 +4185,7 @@ function specOf(entries) {
4184
4185
  if (first === void 0) {
4185
4186
  throw new TypeError("A cardinality group is never empty.");
4186
4187
  }
4187
- return chunkZOWRACZQ_cjs.EDGE_CARDINALITY_SPECS[first.cardinality];
4188
+ return chunkG7OKJDMG_cjs.EDGE_CARDINALITY_SPECS[first.cardinality];
4188
4189
  }
4189
4190
  function competingLiveEdgePredicate(tables3, values, spec) {
4190
4191
  const { edges: edges3 } = tables3;
@@ -4356,7 +4357,7 @@ function buildLockEdgeClaims(tables3, entries, timestamp2) {
4356
4357
  );
4357
4358
  const valueRows = drizzleOrm.sql.join(
4358
4359
  entries.map((entry) => {
4359
- const target = chunkZOWRACZQ_cjs.edgeCardinalityClaimTarget(entry);
4360
+ const target = chunkG7OKJDMG_cjs.edgeCardinalityClaimTarget(entry);
4360
4361
  return drizzleOrm.sql`(${entry.graphId}, ${target.axis}, ${target.key}, ${entry.edgeId}, ${timestamp2})`;
4361
4362
  }),
4362
4363
  drizzleOrm.sql`, `
@@ -4375,7 +4376,7 @@ function buildLockEdgeClaims(tables3, entries, timestamp2) {
4375
4376
  function buildLockEdgeClaimGuarded(tables3, params, timestamp2) {
4376
4377
  const { edgeClaims: edgeClaims3, edges: edges3 } = tables3;
4377
4378
  const claimsName = drizzleOrm.getTableName(edgeClaims3);
4378
- const target = chunkZOWRACZQ_cjs.edgeCardinalityClaimTarget(params);
4379
+ const target = chunkG7OKJDMG_cjs.edgeCardinalityClaimTarget(params);
4379
4380
  return drizzleOrm.sql`
4380
4381
  INSERT INTO ${edgeClaims3} (
4381
4382
  ${drizzleOrm.sql.identifier(edgeClaims3.graphId.name)},
@@ -4396,7 +4397,7 @@ function buildLockEdgeClaimGuarded(tables3, params, timestamp2) {
4396
4397
  ${quotedColumn(edgeClaims3.edgeId)} AS holder_edge_id,
4397
4398
  EXISTS (
4398
4399
  SELECT 1 FROM ${edges3}
4399
- WHERE ${competingLiveEdgePredicate(tables3, boundClaimValues(params), chunkZOWRACZQ_cjs.EDGE_CARDINALITY_SPECS[params.cardinality])}
4400
+ WHERE ${competingLiveEdgePredicate(tables3, boundClaimValues(params), chunkG7OKJDMG_cjs.EDGE_CARDINALITY_SPECS[params.cardinality])}
4400
4401
  ) AS has_incumbent
4401
4402
  `;
4402
4403
  }
@@ -4406,7 +4407,7 @@ function buildInsertEdgeIfEndpointsLiveWithCardinalityClaim(tables3, params, cla
4406
4407
  const nodeTable = quotedTableName(drizzleOrm.getTableName(nodes3));
4407
4408
  const propsJson = JSON.stringify(params.props);
4408
4409
  const columns = edgeColumnList(edges3);
4409
- const target = chunkZOWRACZQ_cjs.edgeCardinalityClaimTarget(claim);
4410
+ const target = chunkG7OKJDMG_cjs.edgeCardinalityClaimTarget(claim);
4410
4411
  const from = (column) => qualifiedAlias("from_node", column);
4411
4412
  const to = (column) => qualifiedAlias("to_node", column);
4412
4413
  return drizzleOrm.sql`
@@ -4428,7 +4429,7 @@ function buildInsertEdgeIfEndpointsLiveWithCardinalityClaim(tables3, params, cla
4428
4429
  FROM live_endpoints
4429
4430
  WHERE NOT EXISTS (
4430
4431
  SELECT 1 FROM ${edges3}
4431
- WHERE ${competingLiveEdgePredicate(tables3, boundClaimValues(claim), chunkZOWRACZQ_cjs.EDGE_CARDINALITY_SPECS[claim.cardinality])}
4432
+ WHERE ${competingLiveEdgePredicate(tables3, boundClaimValues(claim), chunkG7OKJDMG_cjs.EDGE_CARDINALITY_SPECS[claim.cardinality])}
4432
4433
  )
4433
4434
  ),
4434
4435
  claim AS (
@@ -4473,8 +4474,8 @@ function buildInsertEdgeIfEndpointsLiveWithCardinalityClaim(tables3, params, cla
4473
4474
  function buildTakeOverEdgeClaim(tables3, params, timestamp2) {
4474
4475
  const { edgeClaims: edgeClaims3, edges: edges3 } = tables3;
4475
4476
  const claimsName = drizzleOrm.getTableName(edgeClaims3);
4476
- const spec = chunkZOWRACZQ_cjs.EDGE_CARDINALITY_SPECS[params.cardinality];
4477
- const target = chunkZOWRACZQ_cjs.edgeCardinalityClaimTarget(params);
4477
+ const spec = chunkG7OKJDMG_cjs.EDGE_CARDINALITY_SPECS[params.cardinality];
4478
+ const target = chunkG7OKJDMG_cjs.edgeCardinalityClaimTarget(params);
4478
4479
  return drizzleOrm.sql`
4479
4480
  UPDATE ${edgeClaims3}
4480
4481
  SET ${quotedColumn(edgeClaims3.edgeId)} = ${params.edgeId},
@@ -4493,7 +4494,7 @@ function buildTakeOverEdgeClaim(tables3, params, timestamp2) {
4493
4494
  function buildTakeOverEdgeClaimGuarded(tables3, params, timestamp2) {
4494
4495
  const { edgeClaims: edgeClaims3, edges: edges3 } = tables3;
4495
4496
  const claimsName = drizzleOrm.getTableName(edgeClaims3);
4496
- const target = chunkZOWRACZQ_cjs.edgeCardinalityClaimTarget(params);
4497
+ const target = chunkG7OKJDMG_cjs.edgeCardinalityClaimTarget(params);
4497
4498
  return drizzleOrm.sql`
4498
4499
  UPDATE ${edgeClaims3}
4499
4500
  SET ${quotedColumn(edgeClaims3.edgeId)} = ${params.edgeId},
@@ -4504,7 +4505,7 @@ function buildTakeOverEdgeClaimGuarded(tables3, params, timestamp2) {
4504
4505
  AND ${qualified2(claimsName, edgeClaims3.edgeId)} <> ${params.edgeId}
4505
4506
  AND NOT EXISTS (
4506
4507
  SELECT 1 FROM ${edges3}
4507
- WHERE ${competingLiveEdgePredicate(tables3, boundClaimValues(params), chunkZOWRACZQ_cjs.EDGE_CARDINALITY_SPECS[params.cardinality])}
4508
+ WHERE ${competingLiveEdgePredicate(tables3, boundClaimValues(params), chunkG7OKJDMG_cjs.EDGE_CARDINALITY_SPECS[params.cardinality])}
4508
4509
  )
4509
4510
  RETURNING ${quotedColumn(edgeClaims3.edgeId)} as holder_edge_id
4510
4511
  `;
@@ -5221,7 +5222,7 @@ function buildAtomicEdgeResolvedUpdateBatch(tables3, entries, timestamp2, schema
5221
5222
  AND ${edges3.toKind} = ${existing.to_kind}
5222
5223
  AND ${edges3.toId} = ${existing.to_id}
5223
5224
  AND ${edges3.updatedAt} = ${existing.updated_at}
5224
- AND ${edges3.props} = ${castBoundValueForColumn(edges3.props, chunkOC5ROP7V_cjs.rowPropsToJsonText(existing.props))}
5225
+ AND ${edges3.props} = ${castBoundValueForColumn(edges3.props, chunk6JRVV2SS_cjs.rowPropsToJsonText(existing.props))}
5225
5226
  ${expectedValidFromPredicate(edges3.validFrom, existing.valid_from ?? EXPECTED_SQL_NULL)}
5226
5227
  ${expectedValidFromPredicate(edges3.validTo, existing.valid_to ?? EXPECTED_SQL_NULL)}
5227
5228
  )
@@ -5622,12 +5623,12 @@ function present(value) {
5622
5623
  function mapHybridSearchRow(row, toNodeRow3) {
5623
5624
  return {
5624
5625
  node: toNodeRow3(row),
5625
- fusedScore: chunkDSX3P4S5_cjs.coerceNumericScore(row["fused_score"]),
5626
+ fusedScore: chunk76OB5RSH_cjs.coerceNumericScore(row["fused_score"]),
5626
5627
  ...present(row["vector_rank"]) ? { vectorRank: Number(row["vector_rank"]) } : {},
5627
- ...present(row["vector_score"]) ? { vectorScore: chunkDSX3P4S5_cjs.coerceNumericScore(row["vector_score"]) } : {},
5628
+ ...present(row["vector_score"]) ? { vectorScore: chunk76OB5RSH_cjs.coerceNumericScore(row["vector_score"]) } : {},
5628
5629
  ...present(row["fulltext_rank"]) ? { fulltextRank: Number(row["fulltext_rank"]) } : {},
5629
5630
  ...present(row["fulltext_score"]) ? {
5630
- fulltextScore: chunkDSX3P4S5_cjs.coerceNumericScore(
5631
+ fulltextScore: chunk76OB5RSH_cjs.coerceNumericScore(
5631
5632
  row["fulltext_score"]
5632
5633
  )
5633
5634
  } : {},
@@ -6848,7 +6849,7 @@ function buildAtomicNodeProjectionStatements(creates, updates, timestamp2, diale
6848
6849
  }
6849
6850
  const statements = [];
6850
6851
  for (const group of fulltextGroups.values()) {
6851
- for (const rows of chunkJRWKRBI5_cjs.chunk(group.upserts, chunkSize)) {
6852
+ for (const rows of chunk5JOCIMQ3_cjs.chunk(group.upserts, chunkSize)) {
6852
6853
  statements.push(
6853
6854
  ...(fulltextStrategy?.buildBatchUpsert(
6854
6855
  fulltextTableName,
@@ -6857,7 +6858,7 @@ function buildAtomicNodeProjectionStatements(creates, updates, timestamp2, diale
6857
6858
  ) ?? []).map((statement) => chunkDCYIUKIM_cjs.toDrizzleSql(statement, dialect))
6858
6859
  );
6859
6860
  }
6860
- for (const nodeIds of chunkJRWKRBI5_cjs.chunk(group.deletes, chunkSize)) {
6861
+ for (const nodeIds of chunk5JOCIMQ3_cjs.chunk(group.deletes, chunkSize)) {
6861
6862
  statements.push(
6862
6863
  ...(fulltextStrategy?.buildBatchDelete(fulltextTableName, {
6863
6864
  graphId: group.graphId,
@@ -6868,7 +6869,7 @@ function buildAtomicNodeProjectionStatements(creates, updates, timestamp2, diale
6868
6869
  }
6869
6870
  }
6870
6871
  for (const group of embeddingGroups.values()) {
6871
- for (const rows of chunkJRWKRBI5_cjs.chunk(group.upserts, chunkSize)) {
6872
+ for (const rows of chunk5JOCIMQ3_cjs.chunk(group.upserts, chunkSize)) {
6872
6873
  const fragments = vectorStrategy?.buildUpsertBatch === void 0 ? rows.flatMap(
6873
6874
  (row) => vectorStrategy?.buildUpsert(
6874
6875
  group.slot,
@@ -6888,7 +6889,7 @@ function buildAtomicNodeProjectionStatements(creates, updates, timestamp2, diale
6888
6889
  ...fragments.map((statement) => chunkDCYIUKIM_cjs.toDrizzleSql(statement, dialect))
6889
6890
  );
6890
6891
  }
6891
- for (const nodeIds of chunkJRWKRBI5_cjs.chunk(group.deletes, chunkSize)) {
6892
+ for (const nodeIds of chunk5JOCIMQ3_cjs.chunk(group.deletes, chunkSize)) {
6892
6893
  statements.push(
6893
6894
  ...(vectorStrategy?.buildDeleteBatch(group.slot, {
6894
6895
  ...group.slot,
@@ -7650,7 +7651,7 @@ function createCommonOperationStrategy(tables3, dialect, fulltextStrategy, vecto
7650
7651
  tables3.nodes,
7651
7652
  params.graphId,
7652
7653
  params.nodeKind,
7653
- chunkDSX3P4S5_cjs.nowIso()
7654
+ chunk76OB5RSH_cjs.nowIso()
7654
7655
  )
7655
7656
  ),
7656
7657
  buildHybridSearch: (params, vectorSql, vectorScoreDescending) => {
@@ -7658,7 +7659,7 @@ function createCommonOperationStrategy(tables3, dialect, fulltextStrategy, vecto
7658
7659
  tables3.nodes,
7659
7660
  params.graphId,
7660
7661
  params.nodeKind,
7661
- chunkDSX3P4S5_cjs.nowIso()
7662
+ chunk76OB5RSH_cjs.nowIso()
7662
7663
  );
7663
7664
  const fulltextSql = buildFulltextSearch(
7664
7665
  fulltextTable,
@@ -7890,7 +7891,7 @@ function createCommonOperationStrategy(tables3, dialect, fulltextStrategy, vecto
7890
7891
  );
7891
7892
  },
7892
7893
  buildHardDeleteUniquesByConcreteKind(params) {
7893
- return chunkDSX3P4S5_cjs.buildHardDeleteUniquesByConcreteKind(
7894
+ return chunk76OB5RSH_cjs.buildHardDeleteUniquesByConcreteKind(
7894
7895
  drizzleOrm.getTableName(tables3.uniques),
7895
7896
  params
7896
7897
  );
@@ -8348,7 +8349,7 @@ var SQLITE_INDEX_MAT_TIMESTAMPS = {
8348
8349
  encode: (value) => value
8349
8350
  };
8350
8351
  var POSTGRES_INDEX_MAT_TIMESTAMPS = {
8351
- decode: chunkDSX3P4S5_cjs.formatPostgresTimestamp,
8352
+ decode: chunk76OB5RSH_cjs.formatPostgresTimestamp,
8352
8353
  encode: (value) => new Date(value)
8353
8354
  };
8354
8355
  function mapMaterializationRow(row, decode) {
@@ -8438,7 +8439,7 @@ var SQLITE_KIND_REMOVAL_TIMESTAMPS = {
8438
8439
  encode: (value) => value
8439
8440
  };
8440
8441
  var POSTGRES_KIND_REMOVAL_TIMESTAMPS = {
8441
- decode: chunkDSX3P4S5_cjs.formatPostgresTimestamp,
8442
+ decode: chunk76OB5RSH_cjs.formatPostgresTimestamp,
8442
8443
  encode: (value) => new Date(value)
8443
8444
  };
8444
8445
  function mapKindRemovalRow(row, decode) {
@@ -8603,7 +8604,7 @@ var ATOMIC_NODE_PROJECTION_FIXED_PARAM_COUNT = 4;
8603
8604
  var ATOMIC_NODE_PROJECTION_MAX_PARAM_COUNT_PER_ENTRY = 6;
8604
8605
  function chunkAtomicNodeEntriesByIdSource(entries, chunkSize) {
8605
8606
  return ["generated", "caller"].flatMap(
8606
- (idSource) => chunkJRWKRBI5_cjs.chunk(
8607
+ (idSource) => chunk5JOCIMQ3_cjs.chunk(
8607
8608
  entries.filter((entry) => entry.idSource === idSource),
8608
8609
  chunkSize
8609
8610
  )
@@ -8638,7 +8639,7 @@ function chunkAtomicNodeEntriesByClaimWork(entries, maxBindParameters) {
8638
8639
  (idSource) => chunkByWeight(
8639
8640
  entries.filter((entry) => entry.idSource === idSource),
8640
8641
  available,
8641
- (entry) => ATOMIC_NODE_INSERT_PARAM_COUNT + chunkKDNRACRG_cjs.atomicNodeClaimInputCost(entry.claims ?? [])
8642
+ (entry) => ATOMIC_NODE_INSERT_PARAM_COUNT + chunkMRUOOAIQ_cjs.atomicNodeClaimInputCost(entry.claims ?? [])
8642
8643
  )
8643
8644
  );
8644
8645
  }
@@ -8647,7 +8648,7 @@ function chunkAtomicNodeReplacementEntriesByClaimWork(entries, maxBindParameters
8647
8648
  return chunkByWeight(
8648
8649
  entries,
8649
8650
  available,
8650
- (entry) => ATOMIC_NODE_INSERT_PARAM_COUNT + chunkKDNRACRG_cjs.atomicNodeClaimInputCost(entry.claims ?? [])
8651
+ (entry) => ATOMIC_NODE_INSERT_PARAM_COUNT + chunkMRUOOAIQ_cjs.atomicNodeClaimInputCost(entry.claims ?? [])
8651
8652
  );
8652
8653
  }
8653
8654
  function atomicNodeReplacementSubmissionMaxEntries(maxBindParameters) {
@@ -8872,14 +8873,14 @@ async function withDuplicateKeyClassification(run, context) {
8872
8873
  try {
8873
8874
  return await run();
8874
8875
  } catch (error) {
8875
- if (chunkOC5ROP7V_cjs.isDuplicatePrimaryKeyError(error, context.relation)) {
8876
+ if (chunk6JRVV2SS_cjs.isDuplicatePrimaryKeyError(error, context.relation)) {
8876
8877
  throw duplicateKeyOperationError(
8877
8878
  context.entity,
8878
8879
  context.attempted,
8879
8880
  error
8880
8881
  );
8881
8882
  }
8882
- if (context.matchIdentities !== void 0 && chunkOC5ROP7V_cjs.isDuplicateUniqueIndexError(error, {
8883
+ if (context.matchIdentities !== void 0 && chunk6JRVV2SS_cjs.isDuplicateUniqueIndexError(error, {
8883
8884
  table: context.relation.table,
8884
8885
  indexName: edgeMatchIdentityUniqueIndexName(context.relation.table),
8885
8886
  sqliteColumns: [
@@ -8901,8 +8902,8 @@ async function withAtomicEdgeEndpointRefusalClassification(run, constraint) {
8901
8902
  try {
8902
8903
  return await run();
8903
8904
  } catch (error) {
8904
- if (chunkOC5ROP7V_cjs.isNotNullColumnViolation(error, constraint)) {
8905
- throw new chunkKDNRACRG_cjs.AtomicEdgeBatchEndpointRefusalError(error);
8905
+ if (chunk6JRVV2SS_cjs.isNotNullColumnViolation(error, constraint)) {
8906
+ throw new chunkMRUOOAIQ_cjs.AtomicEdgeBatchEndpointRefusalError(error);
8906
8907
  }
8907
8908
  throw error;
8908
8909
  }
@@ -8911,8 +8912,8 @@ async function withAtomicEdgeCardinalityRefusalClassification(run, constraint) {
8911
8912
  try {
8912
8913
  return await run();
8913
8914
  } catch (error) {
8914
- if (chunkOC5ROP7V_cjs.isNotNullColumnViolation(error, constraint)) {
8915
- throw new chunkKDNRACRG_cjs.AtomicEdgeBatchCardinalityRefusalError(error);
8915
+ if (chunk6JRVV2SS_cjs.isNotNullColumnViolation(error, constraint)) {
8916
+ throw new chunkMRUOOAIQ_cjs.AtomicEdgeBatchCardinalityRefusalError(error);
8916
8917
  }
8917
8918
  throw error;
8918
8919
  }
@@ -8921,8 +8922,8 @@ async function withAtomicEdgeDeleteIdentityRefusalClassification(run, constraint
8921
8922
  try {
8922
8923
  return await run();
8923
8924
  } catch (error) {
8924
- if (chunkOC5ROP7V_cjs.isNotNullColumnViolation(error, constraint)) {
8925
- throw new chunkKDNRACRG_cjs.AtomicEdgeDeleteIdentityRefusalError(error);
8925
+ if (chunk6JRVV2SS_cjs.isNotNullColumnViolation(error, constraint)) {
8926
+ throw new chunkMRUOOAIQ_cjs.AtomicEdgeDeleteIdentityRefusalError(error);
8926
8927
  }
8927
8928
  throw error;
8928
8929
  }
@@ -8931,8 +8932,8 @@ async function withAtomicNodeDeleteRestrictionClassification(run, constraint) {
8931
8932
  try {
8932
8933
  return await run();
8933
8934
  } catch (error) {
8934
- if (chunkOC5ROP7V_cjs.isNotNullColumnViolation(error, constraint)) {
8935
- throw new chunkKDNRACRG_cjs.AtomicNodeDeleteRestrictedRefusalError(error);
8935
+ if (chunk6JRVV2SS_cjs.isNotNullColumnViolation(error, constraint)) {
8936
+ throw new chunkMRUOOAIQ_cjs.AtomicNodeDeleteRestrictedRefusalError(error);
8936
8937
  }
8937
8938
  throw error;
8938
8939
  }
@@ -9157,7 +9158,7 @@ async function compileAtomicNodeProjectionEvidenceSlots(operationStrategy, execu
9157
9158
  { maximum: maxBindParameters }
9158
9159
  );
9159
9160
  }
9160
- return chunkJRWKRBI5_cjs.chunk(evidence, chunkSize).map((evidenceChunk) => {
9161
+ return chunk5JOCIMQ3_cjs.chunk(evidence, chunkSize).map((evidenceChunk) => {
9161
9162
  const compiled = execution.compile(
9162
9163
  operationStrategy.buildAssertAtomicNodeProjectionEvidence(
9163
9164
  timestamp2,
@@ -9180,13 +9181,13 @@ async function compileAtomicNodeProjectionEvidenceSlots(operationStrategy, execu
9180
9181
  function isAtomicMutationPostimageRefusal(error, operationStrategy, entity, hasPostimageAssertion) {
9181
9182
  const notNullConstraint = entity === "node" ? operationStrategy.atomicNodeRefusalConstraints.mutationPostimage : operationStrategy.atomicEdgeRefusalConstraints.mutationPostimage;
9182
9183
  const primaryKeyConstraint = entity === "node" ? operationStrategy.primaryKeyConstraints.nodes : operationStrategy.primaryKeyConstraints.edges;
9183
- return chunkOC5ROP7V_cjs.isNotNullColumnViolation(error, notNullConstraint) || hasPostimageAssertion && chunkOC5ROP7V_cjs.isDuplicatePrimaryKeyError(error, primaryKeyConstraint) || hasPostimageAssertion && error instanceof chunk7XYPLAPL_cjs.DatabaseOperationError && error.details.reason === "duplicate_key" && chunkOC5ROP7V_cjs.isDuplicatePrimaryKeyError(error.cause, primaryKeyConstraint);
9184
+ return chunk6JRVV2SS_cjs.isNotNullColumnViolation(error, notNullConstraint) || hasPostimageAssertion && chunk6JRVV2SS_cjs.isDuplicatePrimaryKeyError(error, primaryKeyConstraint) || hasPostimageAssertion && error instanceof chunk7XYPLAPL_cjs.DatabaseOperationError && error.details.reason === "duplicate_key" && chunk6JRVV2SS_cjs.isDuplicatePrimaryKeyError(error.cause, primaryKeyConstraint);
9184
9185
  }
9185
9186
  async function withAtomicEdgeDurableRefusalClassification(run, relation, constraint, attempted) {
9186
9187
  try {
9187
9188
  return await run();
9188
9189
  } catch (error) {
9189
- if (attempted !== void 0 && chunkOC5ROP7V_cjs.isNotNullColumnViolation(error, constraint)) {
9190
+ if (attempted !== void 0 && chunk6JRVV2SS_cjs.isNotNullColumnViolation(error, constraint)) {
9190
9191
  throw new chunk7XYPLAPL_cjs.EdgeMatchIdentityConflictError({ attempted }, { cause: error });
9191
9192
  }
9192
9193
  throw error;
@@ -9228,7 +9229,7 @@ async function withAtomicNodeBatchClassifications(run, entries, operationStrateg
9228
9229
  attempted
9229
9230
  });
9230
9231
  } catch (error) {
9231
- if (entries.some((entry) => entry.idSource === "caller") && chunkOC5ROP7V_cjs.isNotNullColumnViolation(
9232
+ if (entries.some((entry) => entry.idSource === "caller") && chunk6JRVV2SS_cjs.isNotNullColumnViolation(
9232
9233
  error,
9233
9234
  operationStrategy.atomicNodeRefusalConstraints.liveIdentity
9234
9235
  )) {
@@ -9264,8 +9265,8 @@ async function executeClassifiedAtomicEdgeBatch(atomicExecutor, program, relatio
9264
9265
  params
9265
9266
  );
9266
9267
  } catch (error) {
9267
- if (claims.length > 0 && chunkOC5ROP7V_cjs.isMissingTableError(error)) {
9268
- throw chunkZOWRACZQ_cjs.edgeClaimRelationMissing(chunkBXHAPCQG_cjs.requireDefined(params[0]).graphId, error);
9268
+ if (claims.length > 0 && chunk6JRVV2SS_cjs.isMissingTableError(error)) {
9269
+ throw chunkG7OKJDMG_cjs.edgeClaimRelationMissing(chunkBXHAPCQG_cjs.requireDefined(params[0]).graphId, error);
9269
9270
  }
9270
9271
  throw error;
9271
9272
  }
@@ -9283,7 +9284,7 @@ function attemptedEdgeMatchIdentities(params) {
9283
9284
  return attempted.length === 0 ? void 0 : attempted;
9284
9285
  }
9285
9286
  function throwDurableIdentityStorageUnavailable(error, params, identityName) {
9286
- if (!chunkOC5ROP7V_cjs.isEdgeMatchIdentityStorageUnavailableError(error)) throw error;
9287
+ if (!chunk6JRVV2SS_cjs.isEdgeMatchIdentityStorageUnavailableError(error)) throw error;
9287
9288
  throw new chunk7XYPLAPL_cjs.ConfigurationError(
9288
9289
  "Backend declares durable edge match identity support, but its storage has not been provisioned.",
9289
9290
  {
@@ -9300,7 +9301,7 @@ function throwDurableIdentityStorageUnavailable(error, params, identityName) {
9300
9301
  );
9301
9302
  }
9302
9303
  function throwEdgeInsertStorageUnavailable(error, params, durableIdentityName) {
9303
- if (!chunkOC5ROP7V_cjs.isEdgeMatchIdentityStorageUnavailableError(error)) throw error;
9304
+ if (!chunk6JRVV2SS_cjs.isEdgeMatchIdentityStorageUnavailableError(error)) throw error;
9304
9305
  const firstParams = chunkBXHAPCQG_cjs.requireDefined(params[0]);
9305
9306
  const durableParams = params.find((item) => item.matchIdentity !== void 0);
9306
9307
  const identityName = durableIdentityName ?? durableParams?.matchIdentity?.name;
@@ -9378,7 +9379,7 @@ function createCommonOperationBackend(options) {
9378
9379
  operationStrategy,
9379
9380
  rowMappers
9380
9381
  } = options;
9381
- const nowIso2 = options.nowIso ?? chunkDSX3P4S5_cjs.nowIso;
9382
+ const nowIso2 = options.nowIso ?? chunk76OB5RSH_cjs.nowIso;
9382
9383
  async function runAtomicNodeSidecarProgram(input) {
9383
9384
  if (!input.hasProjections && input.postimageRefusal === void 0) {
9384
9385
  return input.run();
@@ -9386,11 +9387,11 @@ function createCommonOperationBackend(options) {
9386
9387
  try {
9387
9388
  return await input.run();
9388
9389
  } catch (error) {
9389
- const projectionEvidenceRefusal = input.hasProjections && chunkOC5ROP7V_cjs.isNotNullColumnViolation(
9390
+ const projectionEvidenceRefusal = input.hasProjections && chunk6JRVV2SS_cjs.isNotNullColumnViolation(
9390
9391
  error,
9391
9392
  operationStrategy.atomicNodeRefusalConstraints.projectionEvidence
9392
9393
  );
9393
- if (input.hasProjections && (projectionEvidenceRefusal || chunkOC5ROP7V_cjs.isMissingTableError(error))) {
9394
+ if (input.hasProjections && (projectionEvidenceRefusal || chunk6JRVV2SS_cjs.isMissingTableError(error))) {
9394
9395
  await options.diagnoseAtomicNodeProjectionEvidence?.(
9395
9396
  input.creates,
9396
9397
  input.updates
@@ -9436,7 +9437,7 @@ function createCommonOperationBackend(options) {
9436
9437
  async function claimEdgeCardinalityEntries(entries) {
9437
9438
  if (entries.length === 0) return [];
9438
9439
  const targetKey = (entry) => {
9439
- const target = chunkZOWRACZQ_cjs.edgeCardinalityClaimTarget(entry);
9440
+ const target = chunkG7OKJDMG_cjs.edgeCardinalityClaimTarget(entry);
9440
9441
  return `${target.axis}\0${target.key}`;
9441
9442
  };
9442
9443
  const seen = /* @__PURE__ */ new Set();
@@ -9451,7 +9452,7 @@ function createCommonOperationBackend(options) {
9451
9452
  seen.add(key);
9452
9453
  }
9453
9454
  const outcomes = /* @__PURE__ */ new Map();
9454
- for (const chunk2 of chunkJRWKRBI5_cjs.chunk(entries, batchConfig.edgeInsertBatchSize)) {
9455
+ for (const chunk2 of chunk5JOCIMQ3_cjs.chunk(entries, batchConfig.edgeInsertBatchSize)) {
9455
9456
  const lockQuery = operationStrategy.buildLockEdgeClaims(chunk2, nowIso2());
9456
9457
  const rows = await execution.execAll(lockQuery);
9457
9458
  const holderByTarget = new Map(
@@ -9688,7 +9689,7 @@ function createCommonOperationBackend(options) {
9688
9689
  );
9689
9690
  };
9690
9691
  if (input.entries.some(
9691
- (entry) => !chunkKDNRACRG_cjs.supportsAtomicNodeClaims(claimSupport, entry.claims ?? [])
9692
+ (entry) => !chunkMRUOOAIQ_cjs.supportsAtomicNodeClaims(claimSupport, entry.claims ?? [])
9692
9693
  )) {
9693
9694
  throw new chunk7XYPLAPL_cjs.CompilerInvariantError(
9694
9695
  "Atomic node claim program exceeded its declared per-member budget.",
@@ -9707,7 +9708,7 @@ function createCommonOperationBackend(options) {
9707
9708
  input.entries,
9708
9709
  options.maxBindParameters
9709
9710
  );
9710
- const claimChunks = chunkJRWKRBI5_cjs.chunk(claimEntries, claimChunkSize);
9711
+ const claimChunks = chunk5JOCIMQ3_cjs.chunk(claimEntries, claimChunkSize);
9711
9712
  const claimSlots = claimChunks.map((chunk2) => ({
9712
9713
  statement: execution.compile(
9713
9714
  operationStrategy.buildAtomicNodeClaimUpsertWithSchemaFence(
@@ -10118,7 +10119,7 @@ function createCommonOperationBackend(options) {
10118
10119
  );
10119
10120
  }
10120
10121
  identities.add(identity);
10121
- if (!chunkKDNRACRG_cjs.supportsAtomicNodeClaims(claimSupport, entry.claims ?? [])) {
10122
+ if (!chunkMRUOOAIQ_cjs.supportsAtomicNodeClaims(claimSupport, entry.claims ?? [])) {
10122
10123
  throw new chunk7XYPLAPL_cjs.CompilerInvariantError(
10123
10124
  "Atomic node replacement exceeded its declared per-member claim budget.",
10124
10125
  { claimSupport }
@@ -10150,7 +10151,7 @@ function createCommonOperationBackend(options) {
10150
10151
  (options.maxBindParameters - 2) / ATOMIC_NODE_CLAIM_INPUT_PARAM_COUNT
10151
10152
  )
10152
10153
  );
10153
- const claimChunks = chunkJRWKRBI5_cjs.chunk(claimEntries, claimChunkSize);
10154
+ const claimChunks = chunk5JOCIMQ3_cjs.chunk(claimEntries, claimChunkSize);
10154
10155
  const claimSlots = claimChunks.map((chunk2) => ({
10155
10156
  statement: execution.compile(
10156
10157
  operationStrategy.buildAtomicNodeClaimUpsertWithSchemaFence(
@@ -10173,7 +10174,7 @@ function createCommonOperationBackend(options) {
10173
10174
  })
10174
10175
  }));
10175
10176
  const releaseChunkSize = Math.max(1, options.maxBindParameters - 5);
10176
- const releaseSlots = input.releaseClaims ? chunkJRWKRBI5_cjs.chunk(input.entries, releaseChunkSize).map((chunk2) => ({
10177
+ const releaseSlots = input.releaseClaims ? chunk5JOCIMQ3_cjs.chunk(input.entries, releaseChunkSize).map((chunk2) => ({
10177
10178
  statement: execution.compile(
10178
10179
  operationStrategy.buildAtomicNodeReplacementClaimReleaseWithSchemaFence(
10179
10180
  {
@@ -10361,7 +10362,7 @@ function createCommonOperationBackend(options) {
10361
10362
  assertMatchingFusedEdgeClaim(params, claim);
10362
10363
  }
10363
10364
  const timestamp2 = nowIso2();
10364
- const chunks = chunkJRWKRBI5_cjs.chunk(
10365
+ const chunks = chunk5JOCIMQ3_cjs.chunk(
10365
10366
  input.params,
10366
10367
  batchConfig.edgeSchemaFencedInsertBatchSize
10367
10368
  );
@@ -10372,7 +10373,7 @@ function createCommonOperationBackend(options) {
10372
10373
  )
10373
10374
  );
10374
10375
  function appendClaimSlots(slots2, claims, decode) {
10375
- for (const claimChunk of chunkJRWKRBI5_cjs.chunk(
10376
+ for (const claimChunk of chunk5JOCIMQ3_cjs.chunk(
10376
10377
  claims,
10377
10378
  atomicEdgeClaimBatchSize
10378
10379
  )) {
@@ -10652,11 +10653,11 @@ function createCommonOperationBackend(options) {
10652
10653
  []
10653
10654
  );
10654
10655
  } catch (error) {
10655
- if (chunkOC5ROP7V_cjs.isNotNullColumnViolation(
10656
+ if (chunk6JRVV2SS_cjs.isNotNullColumnViolation(
10656
10657
  error,
10657
10658
  operationStrategy.atomicEdgeRefusalConstraints.tombstoneConvergence
10658
10659
  )) {
10659
- throw new chunkKDNRACRG_cjs.AtomicEdgeConvergenceTombstoneRefusalError(error);
10660
+ throw new chunkMRUOOAIQ_cjs.AtomicEdgeConvergenceTombstoneRefusalError(error);
10660
10661
  }
10661
10662
  throw error;
10662
10663
  }
@@ -10685,7 +10686,7 @@ function createCommonOperationBackend(options) {
10685
10686
  );
10686
10687
  }
10687
10688
  const timestamp2 = nowIso2();
10688
- const deleteSlots = chunkJRWKRBI5_cjs.chunk(input.ids, chunkSize).map((ids) => ({
10689
+ const deleteSlots = chunk5JOCIMQ3_cjs.chunk(input.ids, chunkSize).map((ids) => ({
10689
10690
  statement: execution.compile(
10690
10691
  operationStrategy.buildAtomicNodeDeleteBatchWithSchemaFence(
10691
10692
  { ...input, ids },
@@ -10696,7 +10697,7 @@ function createCommonOperationBackend(options) {
10696
10697
  cardinality: "many",
10697
10698
  decode: (rows) => ({ kind: "affected", count: rows.length })
10698
10699
  }));
10699
- const claimReleaseSlots = chunkJRWKRBI5_cjs.chunk(input.ids, chunkSize).map(
10700
+ const claimReleaseSlots = chunk5JOCIMQ3_cjs.chunk(input.ids, chunkSize).map(
10700
10701
  (ids) => ({
10701
10702
  statement: execution.compile(
10702
10703
  operationStrategy.buildAtomicDeletedNodeClaimReleaseWithSchemaFence(
@@ -10764,7 +10765,7 @@ function createCommonOperationBackend(options) {
10764
10765
  input.schemaFence
10765
10766
  );
10766
10767
  const timestamp2 = nowIso2();
10767
- const updateChunks = chunkJRWKRBI5_cjs.chunk(input.entries, statementChunkSize);
10768
+ const updateChunks = chunk5JOCIMQ3_cjs.chunk(input.entries, statementChunkSize);
10768
10769
  const projectionSlots = compileAtomicNodeProjectionSlots(
10769
10770
  operationStrategy,
10770
10771
  execution,
@@ -10887,14 +10888,14 @@ function createCommonOperationBackend(options) {
10887
10888
  );
10888
10889
  const program = buildAtomicResolvedMutationSetProgram({
10889
10890
  entity: "node",
10890
- createChunks: chunkJRWKRBI5_cjs.chunk(
10891
+ createChunks: chunk5JOCIMQ3_cjs.chunk(
10891
10892
  input.creates,
10892
10893
  Math.min(
10893
10894
  batchConfig.nodeSchemaFencedInsertBatchSize,
10894
10895
  statementChunkSize
10895
10896
  )
10896
10897
  ),
10897
- updateChunks: chunkJRWKRBI5_cjs.chunk(input.updates, statementChunkSize),
10898
+ updateChunks: chunk5JOCIMQ3_cjs.chunk(input.updates, statementChunkSize),
10898
10899
  createIds: input.creates.map((entry) => entry.params.id),
10899
10900
  updateIds: input.updates.map((entry) => entry.id),
10900
10901
  compileCreate: (chunk2) => execution.compile(
@@ -10980,7 +10981,7 @@ function createCommonOperationBackend(options) {
10980
10981
  );
10981
10982
  }
10982
10983
  const timestamp2 = nowIso2();
10983
- const chunks = chunkJRWKRBI5_cjs.chunk(input.ids, chunkSize);
10984
+ const chunks = chunk5JOCIMQ3_cjs.chunk(input.ids, chunkSize);
10984
10985
  const deleteSlots = chunks.map((ids) => ({
10985
10986
  statement: execution.compile(
10986
10987
  operationStrategy.buildAtomicEdgeDeleteBatchWithSchemaFence(
@@ -11041,7 +11042,7 @@ function createCommonOperationBackend(options) {
11041
11042
  const program = buildAtomicResolvedMutationSetProgram({
11042
11043
  entity: "edge",
11043
11044
  createChunks: [],
11044
- updateChunks: chunkJRWKRBI5_cjs.chunk(input.entries, statementChunkSize),
11045
+ updateChunks: chunk5JOCIMQ3_cjs.chunk(input.entries, statementChunkSize),
11045
11046
  createIds: [],
11046
11047
  updateIds: input.entries.map((entry) => entry.existing.id),
11047
11048
  compileCreate: () => {
@@ -11121,14 +11122,14 @@ function createCommonOperationBackend(options) {
11121
11122
  }
11122
11123
  const program = buildAtomicResolvedMutationSetProgram({
11123
11124
  entity: "edge",
11124
- createChunks: chunkJRWKRBI5_cjs.chunk(
11125
+ createChunks: chunk5JOCIMQ3_cjs.chunk(
11125
11126
  input.creates,
11126
11127
  Math.min(
11127
11128
  batchConfig.edgeSchemaFencedInsertBatchSize,
11128
11129
  statementChunkSize
11129
11130
  )
11130
11131
  ),
11131
- updateChunks: chunkJRWKRBI5_cjs.chunk(input.updates, statementChunkSize),
11132
+ updateChunks: chunk5JOCIMQ3_cjs.chunk(input.updates, statementChunkSize),
11132
11133
  createIds: input.creates.map((entry) => entry.id),
11133
11134
  updateIds: input.updates.map((entry) => entry.existing.id),
11134
11135
  compileCreate: (chunk2) => execution.compile(
@@ -11245,7 +11246,7 @@ function createCommonOperationBackend(options) {
11245
11246
  )
11246
11247
  );
11247
11248
  if (row !== void 0) {
11248
- return chunkOC5ROP7V_cjs.normalizeGraphCommandIsolation(row["transaction_isolation"]);
11249
+ return chunk6JRVV2SS_cjs.normalizeGraphCommandIsolation(row["transaction_isolation"]);
11249
11250
  }
11250
11251
  const settledRow = await execution.execGet(
11251
11252
  operationStrategy.buildGetActiveSchema(params.graphId)
@@ -11288,7 +11289,7 @@ function createCommonOperationBackend(options) {
11288
11289
  dimensions: ["schemaFence", "claims"]
11289
11290
  };
11290
11291
  }
11291
- const rephasedPlan = options.nodeClaimInsertFusion === true ? void 0 : chunkMKJPBSID_cjs.rephaseNonTransactionalNodeClaimPlan(plan);
11292
+ const rephasedPlan = options.nodeClaimInsertFusion === true ? void 0 : chunkI7SBZJI2_cjs.rephaseNonTransactionalNodeClaimPlan(plan);
11292
11293
  if (plan.claims.length > 0 && options.nodeClaimInsertFusion !== true && rephasedPlan === void 0) {
11293
11294
  return { outcome: "unsupported", entity: "node", dimensions: ["claims"] };
11294
11295
  }
@@ -11592,7 +11593,7 @@ function createCommonOperationBackend(options) {
11592
11593
  }
11593
11594
  }
11594
11595
  async function executeCommand(command, context) {
11595
- chunkOC5ROP7V_cjs.assertGraphCommandExecutionContext(context);
11596
+ chunk6JRVV2SS_cjs.assertGraphCommandExecutionContext(context);
11596
11597
  if (context.session !== commandSession) {
11597
11598
  throw new chunk7XYPLAPL_cjs.CompilerInvariantError(
11598
11599
  "An authoritative graph command context does not match its bound command port.",
@@ -11600,7 +11601,7 @@ function createCommonOperationBackend(options) {
11600
11601
  );
11601
11602
  }
11602
11603
  if (context.coordination !== "none") {
11603
- chunkOC5ROP7V_cjs.assertGraphCommandCoordination(
11604
+ chunk6JRVV2SS_cjs.assertGraphCommandCoordination(
11604
11605
  commandsPort,
11605
11606
  command,
11606
11607
  context.coordination
@@ -11615,7 +11616,7 @@ function createCommonOperationBackend(options) {
11615
11616
  }
11616
11617
  case "edge.converge-create": {
11617
11618
  if (context.coordination !== "none") {
11618
- chunkOC5ROP7V_cjs.assertGraphCommandConvergenceIsolation(
11619
+ chunk6JRVV2SS_cjs.assertGraphCommandConvergenceIsolation(
11619
11620
  commandsPort,
11620
11621
  context.coordination
11621
11622
  );
@@ -11704,7 +11705,7 @@ function createCommonOperationBackend(options) {
11704
11705
  return;
11705
11706
  }
11706
11707
  const timestamp2 = nowIso2();
11707
- for (const chunk2 of chunkJRWKRBI5_cjs.chunk(params, batchConfig.nodeInsertBatchSize)) {
11708
+ for (const chunk2 of chunk5JOCIMQ3_cjs.chunk(params, batchConfig.nodeInsertBatchSize)) {
11708
11709
  const query = operationStrategy.buildInsertNodesBatch(chunk2, timestamp2);
11709
11710
  await withDuplicateKeyClassification(() => execution.execRun(query), {
11710
11711
  entity: "node",
@@ -11719,7 +11720,7 @@ function createCommonOperationBackend(options) {
11719
11720
  }
11720
11721
  const timestamp2 = nowIso2();
11721
11722
  const allRows = [];
11722
- for (const chunk2 of chunkJRWKRBI5_cjs.chunk(params, batchConfig.nodeInsertBatchSize)) {
11723
+ for (const chunk2 of chunk5JOCIMQ3_cjs.chunk(params, batchConfig.nodeInsertBatchSize)) {
11723
11724
  const query = operationStrategy.buildInsertNodesBatchReturning(
11724
11725
  chunk2,
11725
11726
  timestamp2
@@ -11744,7 +11745,7 @@ function createCommonOperationBackend(options) {
11744
11745
  async getNodes(graphId, kind, ids) {
11745
11746
  if (ids.length === 0) return [];
11746
11747
  const allRows = [];
11747
- for (const chunk2 of chunkJRWKRBI5_cjs.chunk(ids, batchConfig.getNodesChunkSize)) {
11748
+ for (const chunk2 of chunk5JOCIMQ3_cjs.chunk(ids, batchConfig.getNodesChunkSize)) {
11748
11749
  const query = operationStrategy.buildGetNodes(graphId, kind, chunk2);
11749
11750
  const rows = await execution.execAll(query);
11750
11751
  allRows.push(...rows.map((row) => rowMappers.toNodeRow(row)));
@@ -11769,7 +11770,7 @@ function createCommonOperationBackend(options) {
11769
11770
  async updateResolvedNodesBatch(params) {
11770
11771
  if (params.entries.length === 0) return [];
11771
11772
  const first = chunkBXHAPCQG_cjs.requireDefined(params.entries[0]);
11772
- if (!chunkMKJPBSID_cjs.resolvedNodeUpdateBatchFitsBindBudget(
11773
+ if (!chunkI7SBZJI2_cjs.resolvedNodeUpdateBatchFitsBindBudget(
11773
11774
  params.entries.length,
11774
11775
  maxBindParameters
11775
11776
  )) {
@@ -11912,7 +11913,7 @@ function createCommonOperationBackend(options) {
11912
11913
  return;
11913
11914
  }
11914
11915
  const timestamp2 = nowIso2();
11915
- for (const chunk2 of chunkJRWKRBI5_cjs.chunk(params, batchConfig.edgeInsertBatchSize)) {
11916
+ for (const chunk2 of chunk5JOCIMQ3_cjs.chunk(params, batchConfig.edgeInsertBatchSize)) {
11916
11917
  const query = operationStrategy.buildInsertEdgesBatch(chunk2, timestamp2);
11917
11918
  await withEdgeInsertClassification(
11918
11919
  () => withDuplicateKeyClassification(() => execution.execRun(query), {
@@ -11931,7 +11932,7 @@ function createCommonOperationBackend(options) {
11931
11932
  }
11932
11933
  const timestamp2 = nowIso2();
11933
11934
  const allRows = [];
11934
- for (const chunk2 of chunkJRWKRBI5_cjs.chunk(params, batchConfig.edgeInsertBatchSize)) {
11935
+ for (const chunk2 of chunk5JOCIMQ3_cjs.chunk(params, batchConfig.edgeInsertBatchSize)) {
11935
11936
  const query = operationStrategy.buildInsertEdgesBatchReturning(
11936
11937
  chunk2,
11937
11938
  timestamp2
@@ -11963,7 +11964,7 @@ function createCommonOperationBackend(options) {
11963
11964
  }
11964
11965
  const timestamp2 = nowIso2();
11965
11966
  const allRows = [];
11966
- for (const chunk2 of chunkJRWKRBI5_cjs.chunk(params, batchConfig.edgeInsertBatchSize)) {
11967
+ for (const chunk2 of chunk5JOCIMQ3_cjs.chunk(params, batchConfig.edgeInsertBatchSize)) {
11967
11968
  const query = operationStrategy.buildInsertEdgesDurableBatchReturning(
11968
11969
  chunk2,
11969
11970
  timestamp2
@@ -11992,7 +11993,7 @@ function createCommonOperationBackend(options) {
11992
11993
  async getEdges(graphId, ids) {
11993
11994
  if (ids.length === 0) return [];
11994
11995
  const allRows = [];
11995
- for (const chunk2 of chunkJRWKRBI5_cjs.chunk(ids, batchConfig.getEdgesChunkSize)) {
11996
+ for (const chunk2 of chunk5JOCIMQ3_cjs.chunk(ids, batchConfig.getEdgesChunkSize)) {
11996
11997
  const query = operationStrategy.buildGetEdges(graphId, chunk2);
11997
11998
  const rows = await execution.execAll(query);
11998
11999
  allRows.push(...rows.map((row) => rowMappers.toEdgeRow(row)));
@@ -12030,7 +12031,7 @@ function createCommonOperationBackend(options) {
12030
12031
  1,
12031
12032
  batchConfig.getEdgesChunkSize - 1 - (params.kind === void 0 ? 0 : 1)
12032
12033
  );
12033
- for (const chunk2 of chunkJRWKRBI5_cjs.chunk(params.ids, softDeleteChunkSize)) {
12034
+ for (const chunk2 of chunk5JOCIMQ3_cjs.chunk(params.ids, softDeleteChunkSize)) {
12034
12035
  const query = operationStrategy.buildDeleteEdgesBatch(
12035
12036
  {
12036
12037
  graphId: params.graphId,
@@ -12048,7 +12049,7 @@ function createCommonOperationBackend(options) {
12048
12049
  1,
12049
12050
  batchConfig.getEdgesChunkSize - (params.kind === void 0 ? 0 : 1)
12050
12051
  );
12051
- for (const chunk2 of chunkJRWKRBI5_cjs.chunk(params.ids, hardDeleteChunkSize)) {
12052
+ for (const chunk2 of chunk5JOCIMQ3_cjs.chunk(params.ids, hardDeleteChunkSize)) {
12052
12053
  const query = operationStrategy.buildHardDeleteEdgesBatch({
12053
12054
  graphId: params.graphId,
12054
12055
  ids: chunk2,
@@ -12090,7 +12091,7 @@ function createCommonOperationBackend(options) {
12090
12091
  async findEdgesByEndpointSet(params) {
12091
12092
  const ids = resolveEdgeEndpointIds(params);
12092
12093
  const edgeRows = [];
12093
- for (const idChunk of chunkJRWKRBI5_cjs.chunk(
12094
+ for (const idChunk of chunk5JOCIMQ3_cjs.chunk(
12094
12095
  ids,
12095
12096
  batchConfig.findEdgesEndpointChunkSize
12096
12097
  )) {
@@ -12107,7 +12108,7 @@ function createCommonOperationBackend(options) {
12107
12108
  const { edgeKinds, endpoints, endpointChunkSize } = resolveHeterogeneousEdgeRead(params, maxBindParameters);
12108
12109
  if (edgeKinds.length === 0 || endpoints.length === 0) return [];
12109
12110
  const edgeRows = [];
12110
- for (const endpointChunk of chunkJRWKRBI5_cjs.chunk(endpoints, endpointChunkSize)) {
12111
+ for (const endpointChunk of chunk5JOCIMQ3_cjs.chunk(endpoints, endpointChunkSize)) {
12111
12112
  const query = operationStrategy.buildFindEdgesByHeterogeneousEndpointSet(
12112
12113
  params,
12113
12114
  endpointChunk,
@@ -12168,7 +12169,7 @@ function createCommonOperationBackend(options) {
12168
12169
  }
12169
12170
  }
12170
12171
  const deduped = [...byTarget.values()];
12171
- for (const chunk2 of chunkJRWKRBI5_cjs.chunk(
12172
+ for (const chunk2 of chunk5JOCIMQ3_cjs.chunk(
12172
12173
  deduped,
12173
12174
  batchConfig.uniqueInsertBatchSize
12174
12175
  )) {
@@ -12202,7 +12203,7 @@ function createCommonOperationBackend(options) {
12202
12203
  },
12203
12204
  async hardDeleteUniquesByNodeIds(params) {
12204
12205
  const nodeIds = [...new Set(params.nodeIds)];
12205
- for (const chunk2 of chunkJRWKRBI5_cjs.chunk(
12206
+ for (const chunk2 of chunk5JOCIMQ3_cjs.chunk(
12206
12207
  nodeIds,
12207
12208
  batchConfig.uniqueDeleteChunkSize
12208
12209
  )) {
@@ -12227,7 +12228,7 @@ function createCommonOperationBackend(options) {
12227
12228
  },
12228
12229
  async purgeEdgeClaims(params) {
12229
12230
  const edgeIds = [...new Set(params.edgeIds)];
12230
- for (const chunk2 of chunkJRWKRBI5_cjs.chunk(edgeIds, batchConfig.getEdgesChunkSize)) {
12231
+ for (const chunk2 of chunk5JOCIMQ3_cjs.chunk(edgeIds, batchConfig.getEdgesChunkSize)) {
12231
12232
  const query = operationStrategy.buildPurgeEdgeClaims({
12232
12233
  ...params,
12233
12234
  edgeIds: chunk2
@@ -12294,7 +12295,7 @@ function createCommonOperationBackend(options) {
12294
12295
  async checkUniqueBatch(params) {
12295
12296
  if (params.keys.length === 0) return [];
12296
12297
  const allRows = [];
12297
- for (const chunk2 of chunkJRWKRBI5_cjs.chunk(
12298
+ for (const chunk2 of chunk5JOCIMQ3_cjs.chunk(
12298
12299
  params.keys,
12299
12300
  batchConfig.checkUniqueBatchChunkSize
12300
12301
  )) {
@@ -12576,14 +12577,14 @@ function buildCallerSerializedBackend(backend) {
12576
12577
  reentrancy: "require",
12577
12578
  subject: "caller-serialized"
12578
12579
  });
12579
- return chunkOC5ROP7V_cjs.deriveBackend(backend, buildQueuedWriteUnits(backend, queue));
12580
+ return chunk6JRVV2SS_cjs.deriveBackend(backend, buildQueuedWriteUnits(backend, queue));
12580
12581
  }
12581
12582
  function createSqlBackend(profile) {
12582
12583
  if (profile.declaredCapabilities.writeFence === void 0) {
12583
12584
  throw new chunk7XYPLAPL_cjs.ConfigurationError(
12584
12585
  `This engine profile declares no usable write fence: capabilities.writeFence is absent, so createSqlBackend cannot resolve a write-fence decision for it and refuses to mark it as fenced. Declare it on the capabilities the profile declares:
12585
12586
 
12586
- ${chunkOC5ROP7V_cjs.writeFenceDeclarationLine(profile.dialect, " ")}
12587
+ ${chunk6JRVV2SS_cjs.writeFenceDeclarationLine(profile.dialect, " ")}
12587
12588
 
12588
12589
  (that is the correct declaration for this profile's dialect).`,
12589
12590
  {
@@ -12607,15 +12608,15 @@ ${chunkOC5ROP7V_cjs.writeFenceDeclarationLine(profile.dialect, " ")}
12607
12608
  }
12608
12609
  );
12609
12610
  }
12610
- const isFirstParty = chunkOC5ROP7V_cjs.isFirstPartyProfile(profile);
12611
+ const isFirstParty = chunk6JRVV2SS_cjs.isFirstPartyProfile(profile);
12611
12612
  const declarationFenceTarget = {
12612
12613
  dialect: profile.dialect,
12613
12614
  capabilities: profile.declaredCapabilities,
12614
12615
  ...profile.fenceSql === void 0 ? {} : { fenceSql: profile.fenceSql },
12615
12616
  tableNames: profile.tableNames
12616
12617
  };
12617
- if (isFirstParty) chunkOC5ROP7V_cjs.markFirstPartyFactory(declarationFenceTarget);
12618
- const fencePlan = chunkOC5ROP7V_cjs.resolveWriteFencePlan(declarationFenceTarget);
12618
+ if (isFirstParty) chunk6JRVV2SS_cjs.markFirstPartyFactory(declarationFenceTarget);
12619
+ const fencePlan = chunk6JRVV2SS_cjs.resolveWriteFencePlan(declarationFenceTarget);
12619
12620
  const capabilities = finalizeEngineCapabilities(
12620
12621
  profile.declaredCapabilities,
12621
12622
  {
@@ -12637,7 +12638,7 @@ ${chunkOC5ROP7V_cjs.writeFenceDeclarationLine(profile.dialect, " ")}
12637
12638
  // or custom alike — the SAME `tableNames` the returned backend exposes.
12638
12639
  tableNames: profile.tableNames
12639
12640
  };
12640
- const fenceTarget = isFirstParty ? chunkOC5ROP7V_cjs.markFirstPartyFactory(fenceTargetBase) : fenceTargetBase;
12641
+ const fenceTarget = isFirstParty ? chunk6JRVV2SS_cjs.markFirstPartyFactory(fenceTargetBase) : fenceTargetBase;
12641
12642
  const { buildOperations, lateMembers } = resolveEngineAssembly(
12642
12643
  profile.assembly
12643
12644
  );
@@ -12755,13 +12756,13 @@ ${chunkOC5ROP7V_cjs.writeFenceDeclarationLine(profile.dialect, " ")}
12755
12756
  ...profile.provisioning.recordedTime === void 0 ? {} : { recordedTime: profile.provisioning.recordedTime },
12756
12757
  close: profile.close
12757
12758
  };
12758
- chunkOC5ROP7V_cjs.auditBackendResource(backend, profile.resourceAudit);
12759
+ chunk6JRVV2SS_cjs.auditBackendResource(backend, profile.resourceAudit);
12759
12760
  if (profile.execution.serializationFailure !== void 0) {
12760
- chunkOC5ROP7V_cjs.registerSerializationFailureClassifier(
12761
+ chunk6JRVV2SS_cjs.registerSerializationFailureClassifier(
12761
12762
  backend,
12762
12763
  profile.execution.serializationFailure
12763
12764
  );
12764
- chunkOC5ROP7V_cjs.registerSerializationFailureClassifier(
12765
+ chunk6JRVV2SS_cjs.registerSerializationFailureClassifier(
12765
12766
  fenceTarget,
12766
12767
  profile.execution.serializationFailure
12767
12768
  );
@@ -12875,7 +12876,7 @@ function createFulltextMembers(deps) {
12875
12876
  const { execAll, execRun } = execution;
12876
12877
  return {
12877
12878
  async upsertFulltext(params) {
12878
- const timestamp2 = chunkDSX3P4S5_cjs.nowIso();
12879
+ const timestamp2 = chunk76OB5RSH_cjs.nowIso();
12879
12880
  const statements = strategy.buildUpsertFulltext(params, timestamp2);
12880
12881
  for (const stmt of statements) {
12881
12882
  await execRun(stmt);
@@ -12889,8 +12890,8 @@ function createFulltextMembers(deps) {
12889
12890
  },
12890
12891
  async upsertFulltextBatch(params) {
12891
12892
  if (params.rows.length === 0) return;
12892
- const timestamp2 = chunkDSX3P4S5_cjs.nowIso();
12893
- for (const rows of chunkJRWKRBI5_cjs.chunk(
12893
+ const timestamp2 = chunk76OB5RSH_cjs.nowIso();
12894
+ for (const rows of chunk5JOCIMQ3_cjs.chunk(
12894
12895
  params.rows,
12895
12896
  batchConfig.fulltextUpsertBatchSize
12896
12897
  )) {
@@ -12905,7 +12906,7 @@ function createFulltextMembers(deps) {
12905
12906
  },
12906
12907
  async deleteFulltextBatch(params) {
12907
12908
  if (params.nodeIds.length === 0) return;
12908
- for (const nodeIds of chunkJRWKRBI5_cjs.chunk(
12909
+ for (const nodeIds of chunk5JOCIMQ3_cjs.chunk(
12909
12910
  params.nodeIds,
12910
12911
  batchConfig.fulltextDeleteChunkSize
12911
12912
  )) {
@@ -12923,7 +12924,7 @@ function createFulltextMembers(deps) {
12923
12924
  const rows = await execAll(query);
12924
12925
  return rows.map((row, index3) => ({
12925
12926
  nodeId: row.node_id,
12926
- score: chunkDSX3P4S5_cjs.coerceNumericScore(row.score),
12927
+ score: chunk76OB5RSH_cjs.coerceNumericScore(row.score),
12927
12928
  rank: index3 + 1,
12928
12929
  ...row.snippet === null ? {} : { snippet: row.snippet }
12929
12930
  }));
@@ -12961,7 +12962,7 @@ function vectorSlotFromDropIndexParams(params) {
12961
12962
  };
12962
12963
  }
12963
12964
  function mapVectorWriteError(error, params) {
12964
- const mismatch = chunkOC5ROP7V_cjs.parseDimensionMismatch(error);
12965
+ const mismatch = chunk6JRVV2SS_cjs.parseDimensionMismatch(error);
12965
12966
  if (mismatch === void 0) return error;
12966
12967
  const attempted = mismatch.actual ?? "a different number of";
12967
12968
  return new chunk7XYPLAPL_cjs.EmbeddingDimensionChangedError(
@@ -12987,7 +12988,7 @@ function createVectorMembers(deps) {
12987
12988
  const statements = vectorStrategy.buildUpsert(
12988
12989
  slot,
12989
12990
  params,
12990
- chunkDSX3P4S5_cjs.nowIso()
12991
+ chunk76OB5RSH_cjs.nowIso()
12991
12992
  );
12992
12993
  try {
12993
12994
  for (const statement of statements) {
@@ -13006,9 +13007,9 @@ function createVectorMembers(deps) {
13006
13007
  params.rows.map((row) => [row.nodeId, row])
13007
13008
  );
13008
13009
  const rows = [...rowsById.values()];
13009
- const timestamp2 = chunkDSX3P4S5_cjs.nowIso();
13010
+ const timestamp2 = chunk76OB5RSH_cjs.nowIso();
13010
13011
  try {
13011
- for (const chunk2 of chunkJRWKRBI5_cjs.chunk(
13012
+ for (const chunk2 of chunk5JOCIMQ3_cjs.chunk(
13012
13013
  rows,
13013
13014
  batchConfig.embeddingUpsertBatchSize
13014
13015
  )) {
@@ -13054,7 +13055,7 @@ function createVectorMembers(deps) {
13054
13055
  const { vectorStrategy, execution, batchConfig, contributionMaterializer } = deps;
13055
13056
  const slot = vectorSlotFromParams(params);
13056
13057
  await contributionMaterializer.assertVectorSlot(slot);
13057
- for (const nodeIds of chunkJRWKRBI5_cjs.chunk(
13058
+ for (const nodeIds of chunk5JOCIMQ3_cjs.chunk(
13058
13059
  [...new Set(params.nodeIds)],
13059
13060
  batchConfig.embeddingUpsertBatchSize
13060
13061
  )) {
@@ -13080,7 +13081,7 @@ function createVectorMembers(deps) {
13080
13081
  tableNames.nodes,
13081
13082
  params.graphId,
13082
13083
  params.nodeKind,
13083
- chunkDSX3P4S5_cjs.nowIso()
13084
+ chunk76OB5RSH_cjs.nowIso()
13084
13085
  )
13085
13086
  );
13086
13087
  let rows;
@@ -13131,7 +13132,7 @@ function createVectorMembers(deps) {
13131
13132
  try {
13132
13133
  await execution.execRun(dropStatement);
13133
13134
  } catch (error) {
13134
- if (!chunkOC5ROP7V_cjs.isMissingTableError(error)) throw error;
13135
+ if (!chunk6JRVV2SS_cjs.isMissingTableError(error)) throw error;
13135
13136
  }
13136
13137
  }
13137
13138
  };
@@ -13724,7 +13725,7 @@ function postgresInstantiateGraphTemplateStatement(params, plan) {
13724
13725
  const lockedCte = plan.kind === "row" ? chunkXPSPDFKO_cjs.sql.empty() : (
13725
13726
  // eslint-disable-next-line unicorn/template-indent -- this text is spliced verbatim into the statement below, whose own byte-identical shape is snapshot-asserted (tests/engine-profile-parity.test.ts); autofix would reindent it to this closure's nesting depth and change the captured statement text.
13726
13727
  chunkXPSPDFKO_cjs.sql`locked AS (
13727
- SELECT ${chunkJRWKRBI5_cjs.advisoryLockSingleExpression(params.graphId)}
13728
+ SELECT ${chunk5JOCIMQ3_cjs.advisoryLockSingleExpression(params.graphId)}
13728
13729
  ), `
13729
13730
  );
13730
13731
  const insertedFrom = plan.kind === "row" ? chunkXPSPDFKO_cjs.sql`template` : chunkXPSPDFKO_cjs.sql`template, locked`;
@@ -13818,8 +13819,8 @@ async function assertTrustedImportDatabaseEmpty(backend, tableNames) {
13818
13819
  }
13819
13820
  async function lockPostgresTrustedImportTables(backend, tableNames) {
13820
13821
  const executeStatement = requireStatementExecution(backend);
13821
- const plan = chunkOC5ROP7V_cjs.resolveWriteFencePlan(backend);
13822
- const fence = chunkOC5ROP7V_cjs.requireWriteFence(plan, "trusted import", "drain");
13822
+ const plan = chunk6JRVV2SS_cjs.resolveWriteFencePlan(backend);
13823
+ const fence = chunk6JRVV2SS_cjs.requireWriteFence(plan, "trusted import", "drain");
13823
13824
  switch (fence.kind) {
13824
13825
  case "lock":
13825
13826
  case "row": {
@@ -13828,7 +13829,7 @@ async function lockPostgresTrustedImportTables(backend, tableNames) {
13828
13829
  }
13829
13830
  await executeStatement(
13830
13831
  chunkXPSPDFKO_cjs.asCompiledStatementSql(
13831
- chunkOC5ROP7V_cjs.requireFenceLockTables(fence, "lockPostgresTrustedImportTables")(
13832
+ chunk6JRVV2SS_cjs.requireFenceLockTables(fence, "lockPostgresTrustedImportTables")(
13832
13833
  [tableNames.nodes, tableNames.edges],
13833
13834
  "access-exclusive"
13834
13835
  )
@@ -14135,7 +14136,7 @@ async function withConcurrentCreateRetry(run) {
14135
14136
  try {
14136
14137
  return await run();
14137
14138
  } catch (error) {
14138
- if (!chunkOC5ROP7V_cjs.isPostgresConcurrentDdlRaceError(error)) throw error;
14139
+ if (!chunk6JRVV2SS_cjs.isPostgresConcurrentDdlRaceError(error)) throw error;
14139
14140
  return await run();
14140
14141
  }
14141
14142
  }
@@ -14193,7 +14194,7 @@ function createPostgresCatalogProbes(db, executionAdapter, operationStrategy, tr
14193
14194
  SELECT c.relname AS name, i.indisvalid AS valid
14194
14195
  FROM pg_class c
14195
14196
  JOIN pg_index i ON i.indexrelid = c.oid
14196
- WHERE c.relname IN (${chunkJRWKRBI5_cjs.sqlValueList(names)})
14197
+ WHERE c.relname IN (${chunk5JOCIMQ3_cjs.sqlValueList(names)})
14197
14198
  AND pg_catalog.pg_table_is_visible(c.oid)
14198
14199
  `
14199
14200
  );
@@ -14216,7 +14217,7 @@ function createPostgresCatalogProbes(db, executionAdapter, operationStrategy, tr
14216
14217
  chunkXPSPDFKO_cjs.sql`
14217
14218
  SELECT c.relname AS name
14218
14219
  FROM pg_class c
14219
- WHERE c.relname IN (${chunkJRWKRBI5_cjs.sqlValueList(names)})
14220
+ WHERE c.relname IN (${chunk5JOCIMQ3_cjs.sqlValueList(names)})
14220
14221
  AND c.relkind IN ('r', 'p')
14221
14222
  AND pg_catalog.pg_table_is_visible(c.oid)
14222
14223
  `
@@ -14318,7 +14319,7 @@ async function runVectorIndexBuildWithSerialFallback(execute, tableName, indexSt
14318
14319
  try {
14319
14320
  await execute(indexStatement);
14320
14321
  } catch (error) {
14321
- if (!chunkOC5ROP7V_cjs.isInsufficientResourcesError(error)) throw error;
14322
+ if (!chunk6JRVV2SS_cjs.isInsufficientResourcesError(error)) throw error;
14322
14323
  if (dropStatement !== void 0) {
14323
14324
  try {
14324
14325
  await execute(dropStatement);
@@ -14373,18 +14374,18 @@ async function runSerialVectorIndexBuild(execute, tableName, indexStatement, par
14373
14374
  }
14374
14375
  if (buildFailure !== void 0) throw buildFailure.error;
14375
14376
  }
14376
- var toNodeRow = chunkDSX3P4S5_cjs.createNodeRowMapper(chunkDSX3P4S5_cjs.POSTGRES_ROW_MAPPER_CONFIG);
14377
- var toEdgeRow = chunkDSX3P4S5_cjs.createEdgeRowMapper(chunkDSX3P4S5_cjs.POSTGRES_ROW_MAPPER_CONFIG);
14378
- var toUniqueRow = chunkDSX3P4S5_cjs.createUniqueRowMapper(chunkDSX3P4S5_cjs.POSTGRES_ROW_MAPPER_CONFIG);
14379
- var toSchemaVersionRow = chunkDSX3P4S5_cjs.createSchemaVersionRowMapper(
14380
- chunkDSX3P4S5_cjs.POSTGRES_ROW_MAPPER_CONFIG
14377
+ var toNodeRow = chunk76OB5RSH_cjs.createNodeRowMapper(chunk76OB5RSH_cjs.POSTGRES_ROW_MAPPER_CONFIG);
14378
+ var toEdgeRow = chunk76OB5RSH_cjs.createEdgeRowMapper(chunk76OB5RSH_cjs.POSTGRES_ROW_MAPPER_CONFIG);
14379
+ var toUniqueRow = chunk76OB5RSH_cjs.createUniqueRowMapper(chunk76OB5RSH_cjs.POSTGRES_ROW_MAPPER_CONFIG);
14380
+ var toSchemaVersionRow = chunk76OB5RSH_cjs.createSchemaVersionRowMapper(
14381
+ chunk76OB5RSH_cjs.POSTGRES_ROW_MAPPER_CONFIG
14381
14382
  );
14382
14383
  function createPostgresBackend(db, options = {}) {
14383
14384
  return createSqlBackend(buildPostgresEngineProfile(db, options));
14384
14385
  }
14385
14386
  function buildPostgresEngineProfile(db, options = {}) {
14386
14387
  assertNoLegacyTransactionCapability(options.capabilities);
14387
- const resourceAudit = chunkOC5ROP7V_cjs.resolveDeclaredBackendResource(
14388
+ const resourceAudit = chunk6JRVV2SS_cjs.resolveDeclaredBackendResource(
14388
14389
  getSerializedPostgresClient(db),
14389
14390
  options.serializedResource
14390
14391
  );
@@ -14392,10 +14393,10 @@ function buildPostgresEngineProfile(db, options = {}) {
14392
14393
  const fulltextStrategy = options.fulltext === false ? void 0 : options.fulltext ?? chunkSBAN4CHK_cjs.tsvectorStrategy;
14393
14394
  const vectorStrategy = options.vector === false ? void 0 : options.vector ?? chunkFZKXBPTS_cjs.pgvectorStrategy;
14394
14395
  const iterativeScanProbe = createIterativeScanProbe();
14395
- const baseCapabilities = chunkOC5ROP7V_cjs.POSTGRES_CAPABILITIES;
14396
+ const baseCapabilities = chunk6JRVV2SS_cjs.POSTGRES_CAPABILITIES;
14396
14397
  const httpOnlyOverrides = isNeonHttpClient(db) ? {
14397
14398
  execution: {
14398
- ...chunkOC5ROP7V_cjs.POSTGRES_CAPABILITIES.execution,
14399
+ ...chunk6JRVV2SS_cjs.POSTGRES_CAPABILITIES.execution,
14399
14400
  interactiveTransactions: false,
14400
14401
  atomicBatch: "root"
14401
14402
  },
@@ -14404,7 +14405,7 @@ function buildPostgresEngineProfile(db, options = {}) {
14404
14405
  supported: false
14405
14406
  }
14406
14407
  } : {};
14407
- const configuredMaxBindParameters = options.capabilities?.maxBindParameters ?? chunkOC5ROP7V_cjs.POSTGRES_MAX_BIND_PARAMETERS;
14408
+ const configuredMaxBindParameters = options.capabilities?.maxBindParameters ?? chunk6JRVV2SS_cjs.POSTGRES_MAX_BIND_PARAMETERS;
14408
14409
  const driverBindParameterOverrides = isPgliteDatabase(db) ? {
14409
14410
  maxBindParameters: Math.min(
14410
14411
  configuredMaxBindParameters,
@@ -14422,7 +14423,7 @@ function buildPostgresEngineProfile(db, options = {}) {
14422
14423
  );
14423
14424
  }
14424
14425
  const declaredCapabilities = sealCapabilityDeclaration(
14425
- chunkOC5ROP7V_cjs.normalizeGraphAnalyticsCapabilities({
14426
+ chunk6JRVV2SS_cjs.normalizeGraphAnalyticsCapabilities({
14426
14427
  ...baseCapabilities,
14427
14428
  ...httpOnlyOverrides,
14428
14429
  ...options.capabilities,
@@ -14437,11 +14438,11 @@ function buildPostgresEngineProfile(db, options = {}) {
14437
14438
  const adapterOptions = {
14438
14439
  ...options.prepareStatements === void 0 ? {} : { prepareStatements: options.prepareStatements },
14439
14440
  ...options.preparedStatementCacheMax === void 0 ? {} : { preparedStatementCacheMax: options.preparedStatementCacheMax },
14440
- maxBindParameters: declaredCapabilities.maxBindParameters ?? chunkOC5ROP7V_cjs.POSTGRES_MAX_BIND_PARAMETERS,
14441
+ maxBindParameters: declaredCapabilities.maxBindParameters ?? chunk6JRVV2SS_cjs.POSTGRES_MAX_BIND_PARAMETERS,
14441
14442
  interactiveAtomicBatch: declaredCapabilities.execution.interactiveTransactions && (resourceAudit.kind === "independent" || isPgliteDatabase(db))
14442
14443
  };
14443
14444
  const executionAdapter = createPostgresExecutionAdapter(db, adapterOptions);
14444
- const atomicSqlProgramExecutor = chunkKDNRACRG_cjs.createAtomicSqlProgramExecutor(executionAdapter);
14445
+ const atomicSqlProgramExecutor = chunkMRUOOAIQ_cjs.createAtomicSqlProgramExecutor(executionAdapter);
14445
14446
  const tableNames = {
14446
14447
  schemaVersions: drizzleOrm.getTableName(tables3.schemaVersions),
14447
14448
  nodes: drizzleOrm.getTableName(tables3.nodes),
@@ -14501,15 +14502,15 @@ function buildPostgresEngineProfile(db, options = {}) {
14501
14502
  });
14502
14503
  }
14503
14504
  async function ensureDatabaseExtension(capabilities, fencePlan, name) {
14504
- const validated = chunkOC5ROP7V_cjs.DATABASE_EXTENSION_NAMES.find(
14505
+ const validated = chunk6JRVV2SS_cjs.DATABASE_EXTENSION_NAMES.find(
14505
14506
  (candidate) => candidate === name
14506
14507
  );
14507
14508
  if (validated === void 0) {
14508
14509
  throw new chunk7XYPLAPL_cjs.ConfigurationError(
14509
14510
  `Unsupported database extension "${name}".`,
14510
- { extension: name, supported: chunkOC5ROP7V_cjs.DATABASE_EXTENSION_NAMES },
14511
+ { extension: name, supported: chunk6JRVV2SS_cjs.DATABASE_EXTENSION_NAMES },
14511
14512
  {
14512
- suggestion: `Request one of: ${chunkOC5ROP7V_cjs.DATABASE_EXTENSION_NAMES.join(", ")}.`
14513
+ suggestion: `Request one of: ${chunk6JRVV2SS_cjs.DATABASE_EXTENSION_NAMES.join(", ")}.`
14513
14514
  }
14514
14515
  );
14515
14516
  }
@@ -14643,7 +14644,7 @@ function buildPostgresEngineProfile(db, options = {}) {
14643
14644
  const rows = await db.select({ version: tables3.baseSchemaVersions.version }).from(tables3.baseSchemaVersions).where(drizzleOrm.eq(tables3.baseSchemaVersions.installation, 1));
14644
14645
  return rows.at(0)?.version;
14645
14646
  } catch (error) {
14646
- if (chunkOC5ROP7V_cjs.isMissingTableError(error)) return void 0;
14647
+ if (chunk6JRVV2SS_cjs.isMissingTableError(error)) return void 0;
14647
14648
  throw error;
14648
14649
  }
14649
14650
  }
@@ -14719,11 +14720,11 @@ function buildPostgresEngineProfile(db, options = {}) {
14719
14720
  )
14720
14721
  );
14721
14722
  });
14722
- if (!chunkJRWKRBI5_cjs.isOptimisticRetryTier(fenceTarget)) return attempt();
14723
- return chunkJRWKRBI5_cjs.runRetriedUnit(
14723
+ if (!chunk5JOCIMQ3_cjs.isOptimisticRetryTier(fenceTarget)) return attempt();
14724
+ return chunk5JOCIMQ3_cjs.runRetriedUnit(
14724
14725
  {
14725
14726
  operation: "instantiateGraphTemplate",
14726
- attempts: chunkJRWKRBI5_cjs.OPTIMISTIC_RETRY_ATTEMPTS,
14727
+ attempts: chunk5JOCIMQ3_cjs.OPTIMISTIC_RETRY_ATTEMPTS,
14727
14728
  target: fenceTarget
14728
14729
  },
14729
14730
  attempt
@@ -14766,6 +14767,10 @@ function buildPostgresEngineProfile(db, options = {}) {
14766
14767
  ensureEdgeMatchIdentityStorage,
14767
14768
  fencesTableDdl: generatePgCreateTableSQL(tables3.fences),
14768
14769
  sinceIndexDdl: [
14770
+ generatePgCreateTableSQL(tables3.recordedNodes),
14771
+ ...generatePgCreateIndexSQL(tables3.recordedNodes),
14772
+ generatePgCreateTableSQL(tables3.recordedEdges),
14773
+ ...generatePgCreateIndexSQL(tables3.recordedEdges),
14769
14774
  generatePgCreateTableSQL(tables3.recordedIdentityAssertions),
14770
14775
  ...generatePgCreateIndexSQL(tables3.recordedIdentityAssertions),
14771
14776
  ...chunkMDSN3W3Z_cjs.sinceIndexAdoptionDdl({
@@ -14835,8 +14840,8 @@ function buildPostgresEngineProfile(db, options = {}) {
14835
14840
  function lateMembers(ctx) {
14836
14841
  const { capabilities, fencePlan, fenceTarget, isFirstParty } = ctx;
14837
14842
  async function acquireSchemaWriteFence(tx, graphId, beforeAcquisition) {
14838
- const plan = chunkOC5ROP7V_cjs.requireWriteFence(
14839
- chunkOC5ROP7V_cjs.resolveWriteFencePlan(fenceTarget),
14843
+ const plan = chunk6JRVV2SS_cjs.requireWriteFence(
14844
+ chunk6JRVV2SS_cjs.resolveWriteFencePlan(fenceTarget),
14840
14845
  "The PostgreSQL schema-commit fence",
14841
14846
  "keyed"
14842
14847
  );
@@ -14845,7 +14850,7 @@ function buildPostgresEngineProfile(db, options = {}) {
14845
14850
  await beforeAcquisition?.("schema-advisory");
14846
14851
  await tx.execute(
14847
14852
  chunkDCYIUKIM_cjs.toDrizzleSql(
14848
- chunkXPSPDFKO_cjs.sql`SELECT ${chunkJRWKRBI5_cjs.advisoryLockSingleExpression(graphId)}`,
14853
+ chunkXPSPDFKO_cjs.sql`SELECT ${chunk5JOCIMQ3_cjs.advisoryLockSingleExpression(graphId)}`,
14849
14854
  "postgres"
14850
14855
  )
14851
14856
  );
@@ -14877,16 +14882,16 @@ function buildPostgresEngineProfile(db, options = {}) {
14877
14882
  }
14878
14883
  function runSchemaWriteTransaction(graphId, fn) {
14879
14884
  if (!capabilities.execution.interactiveTransactions) {
14880
- const verdict = chunkJRWKRBI5_cjs.resolveBatchWriteVerdict(ctx.self(), {
14885
+ const verdict = chunk5JOCIMQ3_cjs.resolveBatchWriteVerdict(ctx.self(), {
14881
14886
  needs: "schema-commit"
14882
14887
  });
14883
14888
  throw new chunk7XYPLAPL_cjs.ConfigurationError(
14884
- "Schema writes and removal cleanup require atomic transactions, but this Postgres backend does not provide them. The drizzle-orm/neon-http driver communicates over HTTP and cannot hold a session across statements; use drizzle-orm/neon-serverless (websocket) for transactional writes." + chunkJRWKRBI5_cjs.batchRefusalSuffix(verdict),
14889
+ "Schema writes and removal cleanup require atomic transactions, but this Postgres backend does not provide them. The drizzle-orm/neon-http driver communicates over HTTP and cannot hold a session across statements; use drizzle-orm/neon-serverless (websocket) for transactional writes." + chunk5JOCIMQ3_cjs.batchRefusalSuffix(verdict),
14885
14890
  {
14886
14891
  backend: "postgres",
14887
14892
  capability: "execution.interactiveTransactions",
14888
14893
  supportsInteractiveTransactions: false,
14889
- ...chunkJRWKRBI5_cjs.batchRefusalDetails(verdict)
14894
+ ...chunk5JOCIMQ3_cjs.batchRefusalDetails(verdict)
14890
14895
  }
14891
14896
  );
14892
14897
  }
@@ -14914,11 +14919,11 @@ function buildPostgresEngineProfile(db, options = {}) {
14914
14919
  await drainAndClose();
14915
14920
  }
14916
14921
  });
14917
- if (!chunkJRWKRBI5_cjs.isOptimisticRetryTier(fenceTarget)) return attempt();
14918
- return chunkJRWKRBI5_cjs.runRetriedUnit(
14922
+ if (!chunk5JOCIMQ3_cjs.isOptimisticRetryTier(fenceTarget)) return attempt();
14923
+ return chunk5JOCIMQ3_cjs.runRetriedUnit(
14919
14924
  {
14920
14925
  operation: "runSchemaWriteTransaction",
14921
- attempts: chunkJRWKRBI5_cjs.OPTIMISTIC_RETRY_ATTEMPTS,
14926
+ attempts: chunk5JOCIMQ3_cjs.OPTIMISTIC_RETRY_ATTEMPTS,
14922
14927
  target: fenceTarget
14923
14928
  },
14924
14929
  attempt
@@ -14941,7 +14946,7 @@ function buildPostgresEngineProfile(db, options = {}) {
14941
14946
  recordedTime: provisioning.recordedTime,
14942
14947
  isFirstParty: txIsFirstParty
14943
14948
  });
14944
- const gatedBackend = chunkKDNRACRG_cjs.carryAtomicMutationSessionRegistration(
14949
+ const gatedBackend = chunkMRUOOAIQ_cjs.carryAtomicMutationSessionRegistration(
14945
14950
  backend,
14946
14951
  gateFulltext(
14947
14952
  backend,
@@ -14961,7 +14966,7 @@ function buildPostgresEngineProfile(db, options = {}) {
14961
14966
  return ctx.self().transactionWithNative((tx) => fn(tx), options2);
14962
14967
  },
14963
14968
  async transactionWithNative(fn, options2) {
14964
- const temporaryWrites = options2?.temporaryWrites === chunkOC5ROP7V_cjs.INTERNAL_TEMPORARY_WRITES;
14969
+ const temporaryWrites = options2?.temporaryWrites === chunk6JRVV2SS_cjs.INTERNAL_TEMPORARY_WRITES;
14965
14970
  if (temporaryWrites && options2.accessMode !== "read_only") {
14966
14971
  throw new chunk7XYPLAPL_cjs.ConfigurationError(
14967
14972
  "Temporary-write transactions must be semantically read-only.",
@@ -14983,7 +14988,7 @@ function buildPostgresEngineProfile(db, options = {}) {
14983
14988
  const { backend: txBackend, drainAndClose } = bindTransactionBackend(tx, isFirstParty);
14984
14989
  try {
14985
14990
  return await fn(
14986
- chunkOC5ROP7V_cjs.markSchemaFencedInsertEligibleUnderFence(txBackend, fencePlan),
14991
+ chunk6JRVV2SS_cjs.markSchemaFencedInsertEligibleUnderFence(txBackend, fencePlan),
14987
14992
  tx
14988
14993
  );
14989
14994
  } finally {
@@ -15027,7 +15032,7 @@ function buildPostgresEngineProfile(db, options = {}) {
15027
15032
  { waitBudgetMs: options2.waitBudgetMs }
15028
15033
  );
15029
15034
  }
15030
- const schemaFencePlan = chunkOC5ROP7V_cjs.resolveWriteFencePlan(fenceTarget);
15035
+ const schemaFencePlan = chunk6JRVV2SS_cjs.resolveWriteFencePlan(fenceTarget);
15031
15036
  if (schemaFencePlan.kind !== "lock" && schemaFencePlan.kind !== "row") {
15032
15037
  throw new chunk7XYPLAPL_cjs.ConfigurationError(
15033
15038
  "Schema adoption requires a database-enforced PostgreSQL schema fence on the caller's session.",
@@ -15166,7 +15171,7 @@ function buildPostgresEngineProfile(db, options = {}) {
15166
15171
  { capability: "trustedImport", dialect: "postgres" }
15167
15172
  );
15168
15173
  }
15169
- const trustedTx = chunkOC5ROP7V_cjs.deriveBackend(tx, {
15174
+ const trustedTx = chunk6JRVV2SS_cjs.deriveBackend(tx, {
15170
15175
  executeRaw(sqlText, params) {
15171
15176
  return executeCompiled({ params, sql: sqlText });
15172
15177
  }
@@ -15230,7 +15235,7 @@ function buildPostgresEngineProfile(db, options = {}) {
15230
15235
  }
15231
15236
  const profile = {
15232
15237
  dialect: "postgres",
15233
- fenceSql: chunkJRWKRBI5_cjs.postgresFenceSql,
15238
+ fenceSql: chunk5JOCIMQ3_cjs.postgresFenceSql,
15234
15239
  tableNames,
15235
15240
  execution: executionAdapter,
15236
15241
  strategy: operationStrategy,
@@ -15251,7 +15256,7 @@ function buildPostgresEngineProfile(db, options = {}) {
15251
15256
  },
15252
15257
  assembly: assembleEngine({ buildOperations, lateMembers })
15253
15258
  };
15254
- return chunkOC5ROP7V_cjs.registerFirstPartyProfile(profile);
15259
+ return chunk6JRVV2SS_cjs.registerFirstPartyProfile(profile);
15255
15260
  }
15256
15261
  function getSerializedPostgresClient(db) {
15257
15262
  const pgliteClient = getPgliteClient(db);
@@ -15434,7 +15439,7 @@ function createPostgresOperationBackend(options) {
15434
15439
  });
15435
15440
  }
15436
15441
  const batchConfig = computePostgresBatchChunkSizes(
15437
- capabilities.maxBindParameters ?? chunkOC5ROP7V_cjs.POSTGRES_MAX_BIND_PARAMETERS
15442
+ capabilities.maxBindParameters ?? chunk6JRVV2SS_cjs.POSTGRES_MAX_BIND_PARAMETERS
15438
15443
  );
15439
15444
  const fulltextMembers = fulltextStrategy === void 0 ? createFulltextMembers({ fulltextStrategy: void 0 }) : createFulltextMembers({
15440
15445
  fulltextStrategy,
@@ -15446,7 +15451,7 @@ function createPostgresOperationBackend(options) {
15446
15451
  execRun,
15447
15452
  operationStrategy
15448
15453
  });
15449
- const schemaFenceFusionPlan = chunkOC5ROP7V_cjs.resolveWriteFencePlan(fenceTarget);
15454
+ const schemaFenceFusionPlan = chunk6JRVV2SS_cjs.resolveWriteFencePlan(fenceTarget);
15450
15455
  const schemaFenceInsertLockClause = schemaFenceFusionPlan.kind === "lock" ? drizzleOrm.sql.raw("FOR SHARE") : drizzleOrm.sql.raw("");
15451
15456
  const commonOperationMembers = createCommonOperationBackend(
15452
15457
  buildCommonOperationOptions({
@@ -15459,8 +15464,8 @@ function createPostgresOperationBackend(options) {
15459
15464
  execRun
15460
15465
  },
15461
15466
  atomicSqlProgramExecutor,
15462
- nowIso: chunkDSX3P4S5_cjs.nowIso,
15463
- maxBindParameters: capabilities.maxBindParameters ?? chunkOC5ROP7V_cjs.POSTGRES_MAX_BIND_PARAMETERS,
15467
+ nowIso: chunk76OB5RSH_cjs.nowIso,
15468
+ maxBindParameters: capabilities.maxBindParameters ?? chunk6JRVV2SS_cjs.POSTGRES_MAX_BIND_PARAMETERS,
15464
15469
  operationStrategy,
15465
15470
  rowMappers: {
15466
15471
  toEdgeRow,
@@ -15516,7 +15521,7 @@ function createPostgresOperationBackend(options) {
15516
15521
  );
15517
15522
  },
15518
15523
  ...transactionScoped ? {
15519
- schemaGraphWriteLockNamespace: chunkJRWKRBI5_cjs.RECORDED_GRAPH_WRITE_ADVISORY_LOCK_NAMESPACE,
15524
+ schemaGraphWriteLockNamespace: chunk5JOCIMQ3_cjs.RECORDED_GRAPH_WRITE_ADVISORY_LOCK_NAMESPACE,
15520
15525
  edgeCardinalityInsertFusion: true,
15521
15526
  nodeClaimInsertFusion: true
15522
15527
  } : {},
@@ -15578,7 +15583,7 @@ function createPostgresOperationBackend(options) {
15578
15583
  tableNames.nodes,
15579
15584
  params.graphId,
15580
15585
  params.nodeKind,
15581
- chunkDSX3P4S5_cjs.nowIso()
15586
+ chunk76OB5RSH_cjs.nowIso()
15582
15587
  );
15583
15588
  const vectorParams = {
15584
15589
  graphId: params.graphId,
@@ -15619,8 +15624,8 @@ function createPostgresOperationBackend(options) {
15619
15624
  } : {}
15620
15625
  };
15621
15626
  async function lockActiveSchemaVersion(graphId) {
15622
- const plan = chunkOC5ROP7V_cjs.requireWriteFence(
15623
- chunkOC5ROP7V_cjs.resolveWriteFencePlan(fenceTarget),
15627
+ const plan = chunk6JRVV2SS_cjs.requireWriteFence(
15628
+ chunk6JRVV2SS_cjs.resolveWriteFencePlan(fenceTarget),
15624
15629
  "The PostgreSQL schema write fence",
15625
15630
  "keyed"
15626
15631
  );
@@ -15697,6 +15702,64 @@ function createPostgresOperationBackend(options) {
15697
15702
  });
15698
15703
  return {
15699
15704
  ...operations,
15705
+ ...transactionScoped ? {
15706
+ async upsertHeterogeneousNodes(params) {
15707
+ if (params.entries.length === 0) return [];
15708
+ const timestamp2 = chunk76OB5RSH_cjs.nowIso();
15709
+ const storedLowerBound = chunkL4L4AV6F_cjs.resolveStampedValidityLowerBound(
15710
+ void 0,
15711
+ void 0,
15712
+ timestamp2
15713
+ );
15714
+ const inputRows = drizzleOrm.sql.join(
15715
+ params.entries.map(
15716
+ (entry, index3) => drizzleOrm.sql`(${params.schemaFence.graphId}, ${entry.kind}, ${entry.id}, ${JSON.stringify(entry.props)}, ${JSON.stringify(entry.updateProps)}, ${index3})`
15717
+ ),
15718
+ drizzleOrm.sql`, `
15719
+ );
15720
+ const nodes3 = drizzleOrm.sql.identifier(tableNames.nodes);
15721
+ const schemaVersions3 = drizzleOrm.sql.identifier(
15722
+ chunkBXHAPCQG_cjs.requireDefined(tableNames.schemaVersions)
15723
+ );
15724
+ const query = drizzleOrm.sql`
15725
+ WITH "schema_fence" AS (
15726
+ SELECT 1 FROM ${schemaVersions3}
15727
+ WHERE graph_id = ${params.schemaFence.graphId}
15728
+ AND version = ${params.schemaFence.expectedVersion}
15729
+ AND is_active = TRUE
15730
+ FOR SHARE
15731
+ ), "input_rows" (graph_id, kind, id, create_props, update_props, ord) AS (
15732
+ VALUES ${inputRows}
15733
+ ), "upserted" AS (
15734
+ INSERT INTO ${nodes3} AS "target"
15735
+ (graph_id, kind, id, props, version, valid_from, valid_to, created_at, updated_at)
15736
+ SELECT graph_id, kind, id, create_props::jsonb, 1, ${storedLowerBound}, NULL, ${timestamp2}, ${timestamp2}
15737
+ FROM "input_rows" CROSS JOIN "schema_fence"
15738
+ ON CONFLICT (graph_id, kind, id) DO UPDATE SET
15739
+ props = CASE
15740
+ WHEN "target".deleted_at IS NULL THEN "target".props || (
15741
+ SELECT update_props::jsonb FROM "input_rows"
15742
+ WHERE graph_id = "target".graph_id
15743
+ AND kind = "target".kind
15744
+ AND id = "target".id
15745
+ )
15746
+ ELSE EXCLUDED.props
15747
+ END,
15748
+ version = "target".version + 1,
15749
+ valid_from = CASE WHEN "target".deleted_at IS NULL THEN "target".valid_from ELSE EXCLUDED.valid_from END,
15750
+ valid_to = CASE WHEN "target".deleted_at IS NULL THEN "target".valid_to ELSE EXCLUDED.valid_to END,
15751
+ deleted_at = NULL,
15752
+ updated_at = EXCLUDED.updated_at
15753
+ RETURNING *
15754
+ )
15755
+ SELECT "upserted".* FROM "upserted"
15756
+ JOIN "input_rows" USING (graph_id, kind, id)
15757
+ ORDER BY "input_rows".ord
15758
+ `;
15759
+ const rows = await execAll(query);
15760
+ return rows.map((row) => toNodeRow(row));
15761
+ }
15762
+ } : {},
15700
15763
  ...vectorEmbeddingMethods,
15701
15764
  catalog: catalog ?? createPostgresCatalogProbes(
15702
15765
  db,
@@ -15739,8 +15802,8 @@ function createTransactionBackend(options) {
15739
15802
  );
15740
15803
  const runExclusive = txExecutionAdapter.runExclusive;
15741
15804
  const sessionAtomicBatchAdapter = executeCompiled === void 0 ? void 0 : createSessionAtomicBatchAdapter({ executeCompiled, runExclusive });
15742
- const sessionAtomicSqlProgramExecutor = sessionAtomicBatchAdapter === void 0 ? void 0 : chunkKDNRACRG_cjs.createAtomicSqlProgramExecutor(sessionAtomicBatchAdapter);
15743
- const sessionCapabilities = chunkOC5ROP7V_cjs.scopeAtomicBatchToSession(
15805
+ const sessionAtomicSqlProgramExecutor = sessionAtomicBatchAdapter === void 0 ? void 0 : chunkMRUOOAIQ_cjs.createAtomicSqlProgramExecutor(sessionAtomicBatchAdapter);
15806
+ const sessionCapabilities = chunk6JRVV2SS_cjs.scopeAtomicBatchToSession(
15744
15807
  options.capabilities,
15745
15808
  sessionAtomicSqlProgramExecutor !== void 0
15746
15809
  );
@@ -15764,13 +15827,13 @@ function createTransactionBackend(options) {
15764
15827
  lineage: options.lineage,
15765
15828
  recordedTime: options.recordedTime
15766
15829
  });
15767
- const backend = options.isFirstParty ? chunkOC5ROP7V_cjs.markFirstPartyFactory(txOperationBackend) : txOperationBackend;
15830
+ const backend = options.isFirstParty ? chunk6JRVV2SS_cjs.markFirstPartyFactory(txOperationBackend) : txOperationBackend;
15768
15831
  if (sessionAtomicBatchAdapter !== void 0) {
15769
- chunkKDNRACRG_cjs.registerAtomicSqlProgram(backend, sessionAtomicBatchAdapter);
15832
+ chunkMRUOOAIQ_cjs.registerAtomicSqlProgram(backend, sessionAtomicBatchAdapter);
15770
15833
  const mutateEdges = chunkBXHAPCQG_cjs.requireDefined(
15771
15834
  backend.executeAtomicEdgeMutationProgram
15772
15835
  );
15773
- chunkKDNRACRG_cjs.registerAtomicMutationPrograms(backend, {
15836
+ chunkMRUOOAIQ_cjs.registerAtomicMutationPrograms(backend, {
15774
15837
  mutateNodes: chunkBXHAPCQG_cjs.requireDefined(backend.executeAtomicNodeResolvedMutationSet),
15775
15838
  mutateEdges: resolvedSetOnlyEdgeMutationProgram(mutateEdges),
15776
15839
  replaceNodes: chunkBXHAPCQG_cjs.requireDefined(backend.executeAtomicNodeReplacementBatch)
@@ -15920,14 +15983,14 @@ function hasModernBindLimitByVersion(rows) {
15920
15983
  }
15921
15984
  function detectHardMaxBindParameters(transactionMode, hostedPlatform) {
15922
15985
  if (hostedPlatform === "durable-object" || transactionMode === "do-sqlite") {
15923
- return chunkOC5ROP7V_cjs.DURABLE_OBJECT_MAX_BIND_PARAMETERS;
15986
+ return chunk6JRVV2SS_cjs.DURABLE_OBJECT_MAX_BIND_PARAMETERS;
15924
15987
  }
15925
- if (hostedPlatform === "d1") return chunkOC5ROP7V_cjs.D1_MAX_BIND_PARAMETERS;
15988
+ if (hostedPlatform === "d1") return chunk6JRVV2SS_cjs.D1_MAX_BIND_PARAMETERS;
15926
15989
  return void 0;
15927
15990
  }
15928
15991
  function detectMaxBindParameters(sqliteClient, hardMaxBindParameters) {
15929
15992
  if (hardMaxBindParameters !== void 0) return hardMaxBindParameters;
15930
- if (sqliteClient === void 0) return chunkOC5ROP7V_cjs.SQLITE_MAX_BIND_PARAMETERS;
15993
+ if (sqliteClient === void 0) return chunk6JRVV2SS_cjs.SQLITE_MAX_BIND_PARAMETERS;
15931
15994
  try {
15932
15995
  const compiled = parseCompiledMaxVariableNumber(
15933
15996
  sqliteClient.prepare("PRAGMA compile_options").all()
@@ -15936,9 +15999,9 @@ function detectMaxBindParameters(sqliteClient, hardMaxBindParameters) {
15936
15999
  const isModern = hasModernBindLimitByVersion(
15937
16000
  sqliteClient.prepare("SELECT sqlite_version() AS version").all()
15938
16001
  );
15939
- return isModern ? chunkOC5ROP7V_cjs.MODERN_SQLITE_MAX_BIND_PARAMETERS : chunkOC5ROP7V_cjs.SQLITE_MAX_BIND_PARAMETERS;
16002
+ return isModern ? chunk6JRVV2SS_cjs.MODERN_SQLITE_MAX_BIND_PARAMETERS : chunk6JRVV2SS_cjs.SQLITE_MAX_BIND_PARAMETERS;
15940
16003
  } catch {
15941
- return chunkOC5ROP7V_cjs.SQLITE_MAX_BIND_PARAMETERS;
16004
+ return chunk6JRVV2SS_cjs.SQLITE_MAX_BIND_PARAMETERS;
15942
16005
  }
15943
16006
  }
15944
16007
  function preparingClient(client) {
@@ -16206,11 +16269,11 @@ function computeSqliteBatchChunkSizes(maxBindParameters) {
16206
16269
  )
16207
16270
  };
16208
16271
  }
16209
- var toNodeRow2 = chunkDSX3P4S5_cjs.createNodeRowMapper(chunkDSX3P4S5_cjs.SQLITE_ROW_MAPPER_CONFIG);
16210
- var toEdgeRow2 = chunkDSX3P4S5_cjs.createEdgeRowMapper(chunkDSX3P4S5_cjs.SQLITE_ROW_MAPPER_CONFIG);
16211
- var toUniqueRow2 = chunkDSX3P4S5_cjs.createUniqueRowMapper(chunkDSX3P4S5_cjs.SQLITE_ROW_MAPPER_CONFIG);
16212
- var toSchemaVersionRow2 = chunkDSX3P4S5_cjs.createSchemaVersionRowMapper(
16213
- chunkDSX3P4S5_cjs.SQLITE_ROW_MAPPER_CONFIG
16272
+ var toNodeRow2 = chunk76OB5RSH_cjs.createNodeRowMapper(chunk76OB5RSH_cjs.SQLITE_ROW_MAPPER_CONFIG);
16273
+ var toEdgeRow2 = chunk76OB5RSH_cjs.createEdgeRowMapper(chunk76OB5RSH_cjs.SQLITE_ROW_MAPPER_CONFIG);
16274
+ var toUniqueRow2 = chunk76OB5RSH_cjs.createUniqueRowMapper(chunk76OB5RSH_cjs.SQLITE_ROW_MAPPER_CONFIG);
16275
+ var toSchemaVersionRow2 = chunk76OB5RSH_cjs.createSchemaVersionRowMapper(
16276
+ chunk76OB5RSH_cjs.SQLITE_ROW_MAPPER_CONFIG
16214
16277
  );
16215
16278
  function throwSqliteTransactionsDisabled(message, details) {
16216
16279
  throw new chunk7XYPLAPL_cjs.ConfigurationError(message, {
@@ -16222,18 +16285,18 @@ function throwSqliteTransactionsDisabled(message, details) {
16222
16285
  }
16223
16286
  function buildSqliteCapabilities(options) {
16224
16287
  const base = options.transactionMode === "none" ? {
16225
- ...chunkOC5ROP7V_cjs.SQLITE_CAPABILITIES,
16288
+ ...chunk6JRVV2SS_cjs.SQLITE_CAPABILITIES,
16226
16289
  execution: {
16227
- ...chunkOC5ROP7V_cjs.SQLITE_CAPABILITIES.execution,
16290
+ ...chunk6JRVV2SS_cjs.SQLITE_CAPABILITIES.execution,
16228
16291
  interactiveTransactions: false
16229
16292
  },
16230
16293
  graphAnalytics: {
16231
- ...chunkOC5ROP7V_cjs.SQLITE_CAPABILITIES.graphAnalytics ?? {
16294
+ ...chunk6JRVV2SS_cjs.SQLITE_CAPABILITIES.graphAnalytics ?? {
16232
16295
  mathFunctions: false
16233
16296
  },
16234
16297
  supported: false
16235
16298
  }
16236
- } : chunkOC5ROP7V_cjs.SQLITE_CAPABILITIES;
16299
+ } : chunk6JRVV2SS_cjs.SQLITE_CAPABILITIES;
16237
16300
  return {
16238
16301
  ...base,
16239
16302
  maxBindParameters: options.maxBindParameters,
@@ -16245,7 +16308,7 @@ function resolveMaxBindParametersCapability(profile, override) {
16245
16308
  return profile.hardMaxBindParameters === void 0 ? requested : Math.min(requested, profile.hardMaxBindParameters);
16246
16309
  }
16247
16310
  function resolveSqliteGraphAnalyticsCapabilities(profile, override) {
16248
- const requested = override ?? chunkOC5ROP7V_cjs.SQLITE_CAPABILITIES.graphAnalytics ?? {
16311
+ const requested = override ?? chunk6JRVV2SS_cjs.SQLITE_CAPABILITIES.graphAnalytics ?? {
16249
16312
  supported: false,
16250
16313
  mathFunctions: false
16251
16314
  };
@@ -16281,7 +16344,7 @@ function createSqliteCatalogProbes(executionAdapter, operationStrategy, serializ
16281
16344
  SELECT name
16282
16345
  FROM sqlite_master
16283
16346
  WHERE type = 'table'
16284
- AND name IN (${chunkJRWKRBI5_cjs.sqlValueList(names)})
16347
+ AND name IN (${chunk5JOCIMQ3_cjs.sqlValueList(names)})
16285
16348
  `
16286
16349
  );
16287
16350
  const existing = new Set(rows.map((row) => row.name));
@@ -16296,7 +16359,7 @@ function createSqliteCatalogProbes(executionAdapter, operationStrategy, serializ
16296
16359
  SELECT name
16297
16360
  FROM sqlite_master
16298
16361
  WHERE type = 'index'
16299
- AND name IN (${chunkJRWKRBI5_cjs.sqlValueList(names)})
16362
+ AND name IN (${chunk5JOCIMQ3_cjs.sqlValueList(names)})
16300
16363
  `
16301
16364
  );
16302
16365
  const existing = new Set(rows.map((row) => row.name));
@@ -16383,7 +16446,7 @@ function createSqliteOperationBackend(options) {
16383
16446
  });
16384
16447
  }
16385
16448
  const batchConfig = computeSqliteBatchChunkSizes(
16386
- capabilities.maxBindParameters ?? chunkOC5ROP7V_cjs.SQLITE_MAX_BIND_PARAMETERS
16449
+ capabilities.maxBindParameters ?? chunk6JRVV2SS_cjs.SQLITE_MAX_BIND_PARAMETERS
16387
16450
  );
16388
16451
  const fulltextMembers = fulltextStrategy === void 0 ? createFulltextMembers({ fulltextStrategy: void 0 }) : createFulltextMembers({
16389
16452
  fulltextStrategy,
@@ -16406,8 +16469,8 @@ function createSqliteOperationBackend(options) {
16406
16469
  execRun
16407
16470
  },
16408
16471
  atomicSqlProgramExecutor,
16409
- nowIso: chunkDSX3P4S5_cjs.nowIso,
16410
- maxBindParameters: capabilities.maxBindParameters ?? chunkOC5ROP7V_cjs.SQLITE_MAX_BIND_PARAMETERS,
16472
+ nowIso: chunk76OB5RSH_cjs.nowIso,
16473
+ maxBindParameters: capabilities.maxBindParameters ?? chunk6JRVV2SS_cjs.SQLITE_MAX_BIND_PARAMETERS,
16411
16474
  operationStrategy,
16412
16475
  rowMappers: {
16413
16476
  toEdgeRow: toEdgeRow2,
@@ -16479,7 +16542,7 @@ function createSqliteOperationBackend(options) {
16479
16542
  tableNames.nodes,
16480
16543
  params.graphId,
16481
16544
  params.nodeKind,
16482
- chunkDSX3P4S5_cjs.nowIso()
16545
+ chunk76OB5RSH_cjs.nowIso()
16483
16546
  );
16484
16547
  const vectorParams = {
16485
16548
  graphId: params.graphId,
@@ -16522,8 +16585,8 @@ function createSqliteOperationBackend(options) {
16522
16585
  }
16523
16586
  );
16524
16587
  }
16525
- const plan = chunkOC5ROP7V_cjs.requireWriteFence(
16526
- chunkOC5ROP7V_cjs.resolveWriteFencePlan(fenceTarget),
16588
+ const plan = chunk6JRVV2SS_cjs.requireWriteFence(
16589
+ chunk6JRVV2SS_cjs.resolveWriteFencePlan(fenceTarget),
16527
16590
  "The SQLite schema write fence",
16528
16591
  "keyed"
16529
16592
  );
@@ -16590,7 +16653,7 @@ function createSqliteBackend(db, options = {}) {
16590
16653
  }
16591
16654
  function buildSqliteEngineProfile(db, options = {}) {
16592
16655
  assertNoLegacyTransactionCapability(options.capabilities);
16593
- const resourceAudit = chunkOC5ROP7V_cjs.resolveDeclaredBackendResource(
16656
+ const resourceAudit = chunk6JRVV2SS_cjs.resolveDeclaredBackendResource(
16594
16657
  getSerializedSqliteConnection(db),
16595
16658
  options.serializedResource
16596
16659
  );
@@ -16598,7 +16661,7 @@ function buildSqliteEngineProfile(db, options = {}) {
16598
16661
  const fulltextStrategy = options.fulltext === false ? void 0 : options.fulltext ?? chunkSBAN4CHK_cjs.fts5Strategy;
16599
16662
  const profileHints = options.executionProfile ?? {};
16600
16663
  const executionAdapter = createSqliteExecutionAdapter(db, { profileHints });
16601
- const atomicSqlProgramExecutor = chunkKDNRACRG_cjs.createAtomicSqlProgramExecutor(executionAdapter);
16664
+ const atomicSqlProgramExecutor = chunkMRUOOAIQ_cjs.createAtomicSqlProgramExecutor(executionAdapter);
16602
16665
  const { isSync, transactionMode } = executionAdapter.profile;
16603
16666
  const vectorStrategy = options.vector;
16604
16667
  const capabilityOverrides = options.capabilities ?? {};
@@ -16608,7 +16671,7 @@ function buildSqliteEngineProfile(db, options = {}) {
16608
16671
  orderedAggregates: executionAdapter.profile.orderedAggregates
16609
16672
  });
16610
16673
  const declaredCapabilities = sealCapabilityDeclaration(
16611
- chunkOC5ROP7V_cjs.normalizeGraphAnalyticsCapabilities({
16674
+ chunk6JRVV2SS_cjs.normalizeGraphAnalyticsCapabilities({
16612
16675
  ...baseCapabilities,
16613
16676
  ...capabilityOverrides,
16614
16677
  execution: {
@@ -16765,7 +16828,7 @@ function buildSqliteEngineProfile(db, options = {}) {
16765
16828
  }
16766
16829
  return;
16767
16830
  } catch (error) {
16768
- if (attempt === 2 || !chunkOC5ROP7V_cjs.isSqliteDuplicateEdgeMatchIdentityColumnError(error)) {
16831
+ if (attempt === 2 || !chunk6JRVV2SS_cjs.isSqliteDuplicateEdgeMatchIdentityColumnError(error)) {
16769
16832
  throw error;
16770
16833
  }
16771
16834
  }
@@ -16779,13 +16842,13 @@ function buildSqliteEngineProfile(db, options = {}) {
16779
16842
  const rows = await db.select({ version: tables3.baseSchemaVersions.version }).from(tables3.baseSchemaVersions).where(drizzleOrm.eq(tables3.baseSchemaVersions.installation, 1));
16780
16843
  return rows.at(0)?.version;
16781
16844
  } catch (error) {
16782
- if (chunkOC5ROP7V_cjs.isMissingTableError(error)) return void 0;
16845
+ if (chunk6JRVV2SS_cjs.isMissingTableError(error)) return void 0;
16783
16846
  throw error;
16784
16847
  }
16785
16848
  }
16786
16849
  async function writeBaseSchemaVersion(version) {
16787
16850
  const marker = tables3.baseSchemaVersions;
16788
- const timestamp2 = chunkDSX3P4S5_cjs.nowIso();
16851
+ const timestamp2 = chunk76OB5RSH_cjs.nowIso();
16789
16852
  await db.insert(marker).values({ installation: 1, version, updatedAt: timestamp2 }).onConflictDoUpdate({
16790
16853
  target: marker.installation,
16791
16854
  set: { version, updatedAt: timestamp2 },
@@ -16825,7 +16888,7 @@ function buildSqliteEngineProfile(db, options = {}) {
16825
16888
  templateId: params.templateId,
16826
16889
  schemaHash: params.schemaHash,
16827
16890
  schemaDoc: JSON.stringify(params.schemaDoc),
16828
- createdAt: chunkDSX3P4S5_cjs.nowIso()
16891
+ createdAt: chunk76OB5RSH_cjs.nowIso()
16829
16892
  }).onConflictDoNothing();
16830
16893
  },
16831
16894
  async selectByTemplateId(templateId) {
@@ -16863,6 +16926,10 @@ function buildSqliteEngineProfile(db, options = {}) {
16863
16926
  ensureEdgeMatchIdentityStorage,
16864
16927
  fencesTableDdl: generateSqliteCreateTableSQL(tables3.fences),
16865
16928
  sinceIndexDdl: [
16929
+ generateSqliteCreateTableSQL(tables3.recordedNodes),
16930
+ ...generateSqliteCreateIndexSQL(tables3.recordedNodes),
16931
+ generateSqliteCreateTableSQL(tables3.recordedEdges),
16932
+ ...generateSqliteCreateIndexSQL(tables3.recordedEdges),
16866
16933
  generateSqliteCreateTableSQL(tables3.recordedIdentityAssertions),
16867
16934
  ...generateSqliteCreateIndexSQL(tables3.recordedIdentityAssertions),
16868
16935
  ...chunkMDSN3W3Z_cjs.sinceIndexAdoptionDdl({
@@ -16965,12 +17032,12 @@ function buildSqliteEngineProfile(db, options = {}) {
16965
17032
  }
16966
17033
  function runSchemaWriteTransaction(fn) {
16967
17034
  if (transactionMode === "none") {
16968
- const verdict = chunkJRWKRBI5_cjs.resolveBatchWriteVerdict(ctx.self(), {
17035
+ const verdict = chunk5JOCIMQ3_cjs.resolveBatchWriteVerdict(ctx.self(), {
16969
17036
  needs: "schema-commit"
16970
17037
  });
16971
17038
  throwSqliteTransactionsDisabled(
16972
- "Schema writes and removal cleanup require atomic transactions, but this SQLite backend has transactions disabled. Configure a driver that supports transactions (better-sqlite3, libsql, bun:sqlite) to use schema commits." + chunkJRWKRBI5_cjs.batchRefusalSuffix(verdict),
16973
- chunkJRWKRBI5_cjs.batchRefusalDetails(verdict)
17039
+ "Schema writes and removal cleanup require atomic transactions, but this SQLite backend has transactions disabled. Configure a driver that supports transactions (better-sqlite3, libsql, bun:sqlite) to use schema commits." + chunk5JOCIMQ3_cjs.batchRefusalSuffix(verdict),
17040
+ chunk5JOCIMQ3_cjs.batchRefusalDetails(verdict)
16974
17041
  );
16975
17042
  }
16976
17043
  if (transactionMode === "sql") {
@@ -17087,7 +17154,7 @@ function buildSqliteEngineProfile(db, options = {}) {
17087
17154
  return ctx.self().transactionWithNative((tx) => fn(tx), options2);
17088
17155
  },
17089
17156
  async transactionWithNative(fn, options2) {
17090
- const temporaryWrites = options2?.temporaryWrites === chunkOC5ROP7V_cjs.INTERNAL_TEMPORARY_WRITES;
17157
+ const temporaryWrites = options2?.temporaryWrites === chunk6JRVV2SS_cjs.INTERNAL_TEMPORARY_WRITES;
17091
17158
  if (temporaryWrites && options2.accessMode !== "read_only") {
17092
17159
  throw new chunk7XYPLAPL_cjs.ConfigurationError(
17093
17160
  "Temporary-write transactions must be semantically read-only.",
@@ -17121,7 +17188,7 @@ function buildSqliteEngineProfile(db, options = {}) {
17121
17188
  );
17122
17189
  try {
17123
17190
  const result = await fn(
17124
- chunkOC5ROP7V_cjs.markSchemaFencedInsertEligibleUnderFence(
17191
+ chunk6JRVV2SS_cjs.markSchemaFencedInsertEligibleUnderFence(
17125
17192
  gateFulltext(
17126
17193
  txBackend,
17127
17194
  ctx.contributionMaterializer.assertInitialized,
@@ -17142,7 +17209,7 @@ function buildSqliteEngineProfile(db, options = {}) {
17142
17209
  if (transactionMode === "do-sqlite") {
17143
17210
  return runDoSqliteStorageTransaction(
17144
17211
  async () => fn(
17145
- chunkOC5ROP7V_cjs.markSchemaFencedInsertEligibleUnderFence(
17212
+ chunk6JRVV2SS_cjs.markSchemaFencedInsertEligibleUnderFence(
17146
17213
  bindTransactionBackend(db, isFirstParty),
17147
17214
  fencePlan
17148
17215
  ),
@@ -17154,7 +17221,7 @@ function buildSqliteEngineProfile(db, options = {}) {
17154
17221
  serializedQueue,
17155
17222
  async () => db.transaction(
17156
17223
  async (tx) => fn(
17157
- chunkOC5ROP7V_cjs.markSchemaFencedInsertEligibleUnderFence(
17224
+ chunk6JRVV2SS_cjs.markSchemaFencedInsertEligibleUnderFence(
17158
17225
  bindTransactionBackend(tx, isFirstParty),
17159
17226
  fencePlan
17160
17227
  ),
@@ -17221,7 +17288,7 @@ function buildSqliteEngineProfile(db, options = {}) {
17221
17288
  let slotError;
17222
17289
  try {
17223
17290
  await backend.executeStatement(
17224
- chunkJRWKRBI5_cjs.engineSerializedWriterSlotStatement(
17291
+ chunk5JOCIMQ3_cjs.engineSerializedWriterSlotStatement(
17225
17292
  chunkXPSPDFKO_cjs.sql.identifier(tableNames.nodes)
17226
17293
  )
17227
17294
  );
@@ -17238,7 +17305,7 @@ function buildSqliteEngineProfile(db, options = {}) {
17238
17305
  );
17239
17306
  }
17240
17307
  if (slotError !== void 0) {
17241
- if (chunkOC5ROP7V_cjs.isSqliteWriterSlotBusy(slotError)) {
17308
+ if (chunk6JRVV2SS_cjs.isSqliteWriterSlotBusy(slotError)) {
17242
17309
  throw new chunk7XYPLAPL_cjs.SchemaFenceTimeoutError(
17243
17310
  graphId,
17244
17311
  "writer-slot",
@@ -17296,7 +17363,7 @@ function buildSqliteEngineProfile(db, options = {}) {
17296
17363
  )
17297
17364
  );
17298
17365
  } catch (error) {
17299
- if (!chunkOC5ROP7V_cjs.isSqliteNotAuthorizedError(error)) throw error;
17366
+ if (!chunk6JRVV2SS_cjs.isSqliteNotAuthorizedError(error)) throw error;
17300
17367
  }
17301
17368
  for (const tableName of coreAnalyzeTables) {
17302
17369
  await db.run(
@@ -17315,7 +17382,7 @@ function buildSqliteEngineProfile(db, options = {}) {
17315
17382
  )
17316
17383
  );
17317
17384
  } catch (error) {
17318
- if (!chunkOC5ROP7V_cjs.isMissingTableError(error)) throw error;
17385
+ if (!chunk6JRVV2SS_cjs.isMissingTableError(error)) throw error;
17319
17386
  }
17320
17387
  }
17321
17388
  }
@@ -17371,14 +17438,14 @@ function buildSqliteEngineProfile(db, options = {}) {
17371
17438
  },
17372
17439
  assembly: assembleEngine({ buildOperations, lateMembers })
17373
17440
  };
17374
- return chunkOC5ROP7V_cjs.registerFirstPartyProfile(profile);
17441
+ return chunk6JRVV2SS_cjs.registerFirstPartyProfile(profile);
17375
17442
  }
17376
17443
  function createTransactionBackend2(options) {
17377
17444
  const txExecutionAdapter = options.executionAdapter ?? createSqliteExecutionAdapter(options.db, {
17378
17445
  profileHints: options.profileHints
17379
17446
  });
17380
17447
  const txBackend = createSqliteOperationBackend({
17381
- capabilities: chunkOC5ROP7V_cjs.downgradeAtomicBatch(options.capabilities),
17448
+ capabilities: chunk6JRVV2SS_cjs.downgradeAtomicBatch(options.capabilities),
17382
17449
  db: options.db,
17383
17450
  executionAdapter: txExecutionAdapter,
17384
17451
  operationStrategy: options.operationStrategy,
@@ -17391,7 +17458,7 @@ function createTransactionBackend2(options) {
17391
17458
  lineage: options.lineage,
17392
17459
  recordedTime: options.recordedTime
17393
17460
  });
17394
- return options.isFirstParty ? chunkOC5ROP7V_cjs.markFirstPartyFactory(txBackend) : txBackend;
17461
+ return options.isFirstParty ? chunk6JRVV2SS_cjs.markFirstPartyFactory(txBackend) : txBackend;
17395
17462
  }
17396
17463
 
17397
17464
  exports.CURRENT_BASE_SCHEMA_VERSION = CURRENT_BASE_SCHEMA_VERSION;
@@ -17433,5 +17500,5 @@ exports.tables = tables;
17433
17500
  exports.tables2 = tables2;
17434
17501
  exports.uniques = uniques;
17435
17502
  exports.uniques2 = uniques2;
17436
- //# sourceMappingURL=chunk-3KWF25MF.cjs.map
17437
- //# sourceMappingURL=chunk-3KWF25MF.cjs.map
17503
+ //# sourceMappingURL=chunk-MN325MG4.cjs.map
17504
+ //# sourceMappingURL=chunk-MN325MG4.cjs.map