@nicia-ai/typegraph 0.46.2 → 0.47.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (294) hide show
  1. package/README.md +20 -1
  2. package/dist/backend/drizzle/indexes.cjs +9 -9
  3. package/dist/backend/drizzle/indexes.d.cts +1 -1
  4. package/dist/backend/drizzle/indexes.d.ts +1 -1
  5. package/dist/backend/drizzle/indexes.js +5 -5
  6. package/dist/backend/index.cjs +50 -49
  7. package/dist/backend/index.d.cts +3 -3
  8. package/dist/backend/index.d.ts +3 -3
  9. package/dist/backend/index.js +11 -10
  10. package/dist/backend/postgres/index.cjs +27 -26
  11. package/dist/backend/postgres/index.d.cts +6 -6
  12. package/dist/backend/postgres/index.d.ts +6 -6
  13. package/dist/backend/postgres/index.js +14 -13
  14. package/dist/backend/postgres/pglite-store.cjs +34 -33
  15. package/dist/backend/postgres/pglite-store.cjs.map +1 -1
  16. package/dist/backend/postgres/pglite-store.d.cts +8 -8
  17. package/dist/backend/postgres/pglite-store.d.ts +8 -8
  18. package/dist/backend/postgres/pglite-store.js +30 -29
  19. package/dist/backend/postgres/pglite-store.js.map +1 -1
  20. package/dist/backend/postgres/pglite.cjs +16 -15
  21. package/dist/backend/postgres/pglite.d.cts +3 -3
  22. package/dist/backend/postgres/pglite.d.ts +3 -3
  23. package/dist/backend/postgres/pglite.js +15 -14
  24. package/dist/backend/sqlite/index.cjs +24 -23
  25. package/dist/backend/sqlite/index.d.cts +6 -6
  26. package/dist/backend/sqlite/index.d.ts +6 -6
  27. package/dist/backend/sqlite/index.js +12 -11
  28. package/dist/backend/sqlite/libsql.cjs +19 -18
  29. package/dist/backend/sqlite/libsql.cjs.map +1 -1
  30. package/dist/backend/sqlite/libsql.d.cts +3 -3
  31. package/dist/backend/sqlite/libsql.d.ts +3 -3
  32. package/dist/backend/sqlite/libsql.js +14 -13
  33. package/dist/backend/sqlite/libsql.js.map +1 -1
  34. package/dist/backend/sqlite/local-store.cjs +35 -34
  35. package/dist/backend/sqlite/local-store.cjs.map +1 -1
  36. package/dist/backend/sqlite/local-store.d.cts +8 -8
  37. package/dist/backend/sqlite/local-store.d.ts +8 -8
  38. package/dist/backend/sqlite/local-store.js +31 -30
  39. package/dist/backend/sqlite/local-store.js.map +1 -1
  40. package/dist/backend/sqlite/local.cjs +17 -16
  41. package/dist/backend/sqlite/local.d.cts +3 -3
  42. package/dist/backend/sqlite/local.d.ts +3 -3
  43. package/dist/backend/sqlite/local.js +15 -14
  44. package/dist/{chunk-TCT66A7N.cjs → chunk-26YKDNUD.cjs} +10 -10
  45. package/dist/{chunk-TCT66A7N.cjs.map → chunk-26YKDNUD.cjs.map} +1 -1
  46. package/dist/{chunk-QOJ2L2AD.js → chunk-3DMMGT6S.js} +3 -3
  47. package/dist/{chunk-QOJ2L2AD.js.map → chunk-3DMMGT6S.js.map} +1 -1
  48. package/dist/{chunk-ANKOXPCC.cjs → chunk-3HGRTCDU.cjs} +6 -4
  49. package/dist/chunk-3HGRTCDU.cjs.map +1 -0
  50. package/dist/{chunk-QU7QLJA4.cjs → chunk-3U5ABFDW.cjs} +26 -26
  51. package/dist/{chunk-QU7QLJA4.cjs.map → chunk-3U5ABFDW.cjs.map} +1 -1
  52. package/dist/{chunk-5PDSCELM.cjs → chunk-425IZOQ5.cjs} +11 -164
  53. package/dist/chunk-425IZOQ5.cjs.map +1 -0
  54. package/dist/{chunk-S7WIRFNS.cjs → chunk-5FBRVORR.cjs} +12 -12
  55. package/dist/{chunk-S7WIRFNS.cjs.map → chunk-5FBRVORR.cjs.map} +1 -1
  56. package/dist/{chunk-GWXXHOLU.js → chunk-5FT3TLPK.js} +11 -11
  57. package/dist/{chunk-GWXXHOLU.js.map → chunk-5FT3TLPK.js.map} +1 -1
  58. package/dist/{chunk-S3G5VLSW.js → chunk-5UMTUOM5.js} +6 -6
  59. package/dist/{chunk-S3G5VLSW.js.map → chunk-5UMTUOM5.js.map} +1 -1
  60. package/dist/{chunk-RFDEYLIK.js → chunk-6FWSNSRE.js} +7 -7
  61. package/dist/{chunk-RFDEYLIK.js.map → chunk-6FWSNSRE.js.map} +1 -1
  62. package/dist/{chunk-F36KZDFX.cjs → chunk-6JVZSOHQ.cjs} +91 -91
  63. package/dist/{chunk-F36KZDFX.cjs.map → chunk-6JVZSOHQ.cjs.map} +1 -1
  64. package/dist/chunk-6KFLYYOC.cjs +161 -0
  65. package/dist/chunk-6KFLYYOC.cjs.map +1 -0
  66. package/dist/{chunk-D6GCNNMK.cjs → chunk-6NGW27EO.cjs} +10 -10
  67. package/dist/{chunk-D6GCNNMK.cjs.map → chunk-6NGW27EO.cjs.map} +1 -1
  68. package/dist/{chunk-WHS2Y43J.js → chunk-6SWPJEYN.js} +5 -5
  69. package/dist/{chunk-WHS2Y43J.js.map → chunk-6SWPJEYN.js.map} +1 -1
  70. package/dist/{chunk-7TKNK32B.js → chunk-7SQSZN2J.js} +5 -5
  71. package/dist/{chunk-7TKNK32B.js.map → chunk-7SQSZN2J.js.map} +1 -1
  72. package/dist/{chunk-BEB4OFZF.cjs → chunk-AMMWA76F.cjs} +51 -59
  73. package/dist/chunk-AMMWA76F.cjs.map +1 -0
  74. package/dist/{chunk-PYKF7UIL.cjs → chunk-AOSSQDVO.cjs} +13 -13
  75. package/dist/{chunk-PYKF7UIL.cjs.map → chunk-AOSSQDVO.cjs.map} +1 -1
  76. package/dist/{chunk-EDHV4CBU.js → chunk-AVGUJWVX.js} +30 -10
  77. package/dist/chunk-AVGUJWVX.js.map +1 -0
  78. package/dist/{chunk-C2ZP5YS6.cjs → chunk-BCQ76AXA.cjs} +258 -153
  79. package/dist/chunk-BCQ76AXA.cjs.map +1 -0
  80. package/dist/{chunk-WA64ZSCA.cjs → chunk-BFUOME67.cjs} +11 -11
  81. package/dist/{chunk-WA64ZSCA.cjs.map → chunk-BFUOME67.cjs.map} +1 -1
  82. package/dist/{chunk-C6KE2HSQ.cjs → chunk-BR7SHKGM.cjs} +1611 -1382
  83. package/dist/chunk-BR7SHKGM.cjs.map +1 -0
  84. package/dist/{chunk-FCIZNUW5.js → chunk-CHAOFCHV.js} +3 -3
  85. package/dist/{chunk-FCIZNUW5.js.map → chunk-CHAOFCHV.js.map} +1 -1
  86. package/dist/chunk-CICO5GXD.cjs +12 -0
  87. package/dist/{chunk-73MWKDFK.cjs.map → chunk-CICO5GXD.cjs.map} +1 -1
  88. package/dist/{chunk-SXWLLQ3D.js → chunk-D5R42W5D.js} +4 -4
  89. package/dist/{chunk-SXWLLQ3D.js.map → chunk-D5R42W5D.js.map} +1 -1
  90. package/dist/{chunk-YQ4JONWE.js → chunk-DJZTXBWY.js} +342 -113
  91. package/dist/chunk-DJZTXBWY.js.map +1 -0
  92. package/dist/{chunk-BZZI7B43.cjs → chunk-DO7SAMEK.cjs} +47 -47
  93. package/dist/{chunk-BZZI7B43.cjs.map → chunk-DO7SAMEK.cjs.map} +1 -1
  94. package/dist/{chunk-2ZWM2RFH.cjs → chunk-EDN4Y4ZG.cjs} +9 -9
  95. package/dist/{chunk-2ZWM2RFH.cjs.map → chunk-EDN4Y4ZG.cjs.map} +1 -1
  96. package/dist/{chunk-E4OSGBCM.cjs → chunk-EMIB2RXD.cjs} +131 -131
  97. package/dist/{chunk-E4OSGBCM.cjs.map → chunk-EMIB2RXD.cjs.map} +1 -1
  98. package/dist/{chunk-GWUWRZXW.js → chunk-EP4RUYD6.js} +3 -3
  99. package/dist/{chunk-GWUWRZXW.js.map → chunk-EP4RUYD6.js.map} +1 -1
  100. package/dist/{chunk-LHYSY6SE.js → chunk-FNOMT74T.js} +10 -8
  101. package/dist/chunk-FNOMT74T.js.map +1 -0
  102. package/dist/{chunk-ZBVZ7HXD.cjs → chunk-FQPEMEWX.cjs} +12 -12
  103. package/dist/{chunk-ZBVZ7HXD.cjs.map → chunk-FQPEMEWX.cjs.map} +1 -1
  104. package/dist/{chunk-LNIWCQR4.js → chunk-GLHXM7C4.js} +3 -3
  105. package/dist/{chunk-LNIWCQR4.js.map → chunk-GLHXM7C4.js.map} +1 -1
  106. package/dist/{chunk-6BD6ZBKT.cjs → chunk-GYEG3ZLZ.cjs} +10 -10
  107. package/dist/{chunk-6BD6ZBKT.cjs.map → chunk-GYEG3ZLZ.cjs.map} +1 -1
  108. package/dist/{chunk-XBHRKLZU.cjs → chunk-GYUJZARH.cjs} +4 -4
  109. package/dist/{chunk-XBHRKLZU.cjs.map → chunk-GYUJZARH.cjs.map} +1 -1
  110. package/dist/{chunk-A7NMUYEL.cjs → chunk-HDL2ARHX.cjs} +27 -27
  111. package/dist/{chunk-A7NMUYEL.cjs.map → chunk-HDL2ARHX.cjs.map} +1 -1
  112. package/dist/{chunk-5ZJOB5YS.js → chunk-HEV35TGT.js} +4 -4
  113. package/dist/{chunk-5ZJOB5YS.js.map → chunk-HEV35TGT.js.map} +1 -1
  114. package/dist/{chunk-UTVQPZPN.cjs → chunk-I4G3SQPF.cjs} +20 -20
  115. package/dist/{chunk-UTVQPZPN.cjs.map → chunk-I4G3SQPF.cjs.map} +1 -1
  116. package/dist/{chunk-JCNTKRAK.js → chunk-JONXFAPO.js} +5 -5
  117. package/dist/{chunk-JCNTKRAK.js.map → chunk-JONXFAPO.js.map} +1 -1
  118. package/dist/{chunk-GVAMRRZR.cjs → chunk-JR6SX5RH.cjs} +4 -4
  119. package/dist/{chunk-GVAMRRZR.cjs.map → chunk-JR6SX5RH.cjs.map} +1 -1
  120. package/dist/{chunk-N3QTGPC7.cjs → chunk-KABFHAL7.cjs} +100 -99
  121. package/dist/chunk-KABFHAL7.cjs.map +1 -0
  122. package/dist/{chunk-KXSMF6PL.js → chunk-KH7XW7VV.js} +20 -12
  123. package/dist/chunk-KH7XW7VV.js.map +1 -0
  124. package/dist/{chunk-EDJDDY6H.js → chunk-KKBDXCLQ.js} +4 -4
  125. package/dist/{chunk-EDJDDY6H.js.map → chunk-KKBDXCLQ.js.map} +1 -1
  126. package/dist/{chunk-ZHOAZD7Q.cjs → chunk-L3LQNR34.cjs} +161 -161
  127. package/dist/{chunk-ZHOAZD7Q.cjs.map → chunk-L3LQNR34.cjs.map} +1 -1
  128. package/dist/{chunk-IHRDX7K6.js → chunk-LEWHMOUY.js} +46 -56
  129. package/dist/chunk-LEWHMOUY.js.map +1 -0
  130. package/dist/{chunk-AF3TWL5C.cjs → chunk-LRQKXRXO.cjs} +4 -4
  131. package/dist/{chunk-AF3TWL5C.cjs.map → chunk-LRQKXRXO.cjs.map} +1 -1
  132. package/dist/{chunk-WYFB7BN3.js → chunk-M35DF33T.js} +143 -38
  133. package/dist/chunk-M35DF33T.js.map +1 -0
  134. package/dist/{chunk-32UETY6S.cjs → chunk-MFZR4QKM.cjs} +30 -28
  135. package/dist/chunk-MFZR4QKM.cjs.map +1 -0
  136. package/dist/chunk-MKJ4KXL5.cjs +12 -0
  137. package/dist/{chunk-6LAXM4J2.cjs.map → chunk-MKJ4KXL5.cjs.map} +1 -1
  138. package/dist/{chunk-KCH7WQA5.cjs → chunk-MRDBBHIZ.cjs} +48 -2
  139. package/dist/chunk-MRDBBHIZ.cjs.map +1 -0
  140. package/dist/{chunk-QPOQX2DI.cjs → chunk-MX4DHSQP.cjs} +1023 -360
  141. package/dist/chunk-MX4DHSQP.cjs.map +1 -0
  142. package/dist/{chunk-FXNHZFZV.js → chunk-MYKHJI2J.js} +3 -3
  143. package/dist/{chunk-FXNHZFZV.js.map → chunk-MYKHJI2J.js.map} +1 -1
  144. package/dist/{chunk-DSAWGCMP.js → chunk-NAZ2RA4L.js} +3 -3
  145. package/dist/{chunk-DSAWGCMP.js.map → chunk-NAZ2RA4L.js.map} +1 -1
  146. package/dist/{chunk-R7EWHKID.js → chunk-NG2RB5WL.js} +4 -145
  147. package/dist/chunk-NG2RB5WL.js.map +1 -0
  148. package/dist/{chunk-A2LJG5GM.js → chunk-NNQ6A3RM.js} +803 -143
  149. package/dist/chunk-NNQ6A3RM.js.map +1 -0
  150. package/dist/{chunk-72WUT4GG.js → chunk-NVY5CJFP.js} +4 -4
  151. package/dist/{chunk-72WUT4GG.js.map → chunk-NVY5CJFP.js.map} +1 -1
  152. package/dist/{chunk-ZIH42CRX.cjs → chunk-OI2GQ25X.cjs} +7 -7
  153. package/dist/{chunk-ZIH42CRX.cjs.map → chunk-OI2GQ25X.cjs.map} +1 -1
  154. package/dist/{chunk-A4R3H7RU.cjs → chunk-OIFSOPSR.cjs} +259 -238
  155. package/dist/chunk-OIFSOPSR.cjs.map +1 -0
  156. package/dist/{chunk-AU3IJNNP.js → chunk-OMZ37BM2.js} +5 -5
  157. package/dist/{chunk-AU3IJNNP.js.map → chunk-OMZ37BM2.js.map} +1 -1
  158. package/dist/{chunk-C4DYN2SD.cjs → chunk-OORXGFL5.cjs} +48 -48
  159. package/dist/{chunk-C4DYN2SD.cjs.map → chunk-OORXGFL5.cjs.map} +1 -1
  160. package/dist/{chunk-BRN3RGD2.js → chunk-OVI7IXYX.js} +3 -3
  161. package/dist/{chunk-BRN3RGD2.js.map → chunk-OVI7IXYX.js.map} +1 -1
  162. package/dist/{chunk-WMKEGJG4.js → chunk-P6YLZTRE.js} +3 -3
  163. package/dist/{chunk-WMKEGJG4.js.map → chunk-P6YLZTRE.js.map} +1 -1
  164. package/dist/{chunk-AT3MLMJV.js → chunk-QS3NQZVC.js} +82 -16
  165. package/dist/chunk-QS3NQZVC.js.map +1 -0
  166. package/dist/{chunk-EJSYWAEV.js → chunk-QTD6HX4O.js} +5 -5
  167. package/dist/{chunk-EJSYWAEV.js.map → chunk-QTD6HX4O.js.map} +1 -1
  168. package/dist/{chunk-JL5UEBWT.cjs → chunk-ROR5ZR6A.cjs} +45 -45
  169. package/dist/{chunk-JL5UEBWT.cjs.map → chunk-ROR5ZR6A.cjs.map} +1 -1
  170. package/dist/{chunk-FSLTU57P.js → chunk-SDBBMD4N.js} +3 -3
  171. package/dist/{chunk-FSLTU57P.js.map → chunk-SDBBMD4N.js.map} +1 -1
  172. package/dist/{chunk-WEJHA7AD.js → chunk-SE6EGQSD.js} +78 -16
  173. package/dist/chunk-SE6EGQSD.js.map +1 -0
  174. package/dist/{chunk-36LIJXWC.js → chunk-SHFBB23Q.js} +4 -4
  175. package/dist/{chunk-36LIJXWC.js.map → chunk-SHFBB23Q.js.map} +1 -1
  176. package/dist/{chunk-FA6Z7B5L.js → chunk-SHSSRCFR.js} +5 -3
  177. package/dist/chunk-SHSSRCFR.js.map +1 -0
  178. package/dist/{chunk-KOAI3KIV.cjs → chunk-TZEGUG6D.cjs} +4 -4
  179. package/dist/{chunk-KOAI3KIV.cjs.map → chunk-TZEGUG6D.cjs.map} +1 -1
  180. package/dist/{chunk-HNYLMPQQ.cjs → chunk-U5EDAVOJ.cjs} +140 -74
  181. package/dist/chunk-U5EDAVOJ.cjs.map +1 -0
  182. package/dist/{chunk-RHDOAQCT.cjs → chunk-UPAJHMW3.cjs} +122 -114
  183. package/dist/chunk-UPAJHMW3.cjs.map +1 -0
  184. package/dist/{chunk-BQM5P2NO.cjs → chunk-WGX7JH7E.cjs} +235 -170
  185. package/dist/chunk-WGX7JH7E.cjs.map +1 -0
  186. package/dist/{chunk-DYPRZ53S.cjs → chunk-WODMN3Q2.cjs} +27 -27
  187. package/dist/{chunk-DYPRZ53S.cjs.map → chunk-WODMN3Q2.cjs.map} +1 -1
  188. package/dist/{chunk-OZJCH7ZS.js → chunk-XVWOYKIK.js} +3 -3
  189. package/dist/{chunk-OZJCH7ZS.js.map → chunk-XVWOYKIK.js.map} +1 -1
  190. package/dist/chunk-XY5OMOJD.js +147 -0
  191. package/dist/chunk-XY5OMOJD.js.map +1 -0
  192. package/dist/{chunk-KA4L2NZ3.js → chunk-XYBQI6LE.js} +14 -14
  193. package/dist/{chunk-KA4L2NZ3.js.map → chunk-XYBQI6LE.js.map} +1 -1
  194. package/dist/{chunk-EAMVXR5B.js → chunk-ZDKTPBGV.js} +4 -4
  195. package/dist/{chunk-EAMVXR5B.js.map → chunk-ZDKTPBGV.js.map} +1 -1
  196. package/dist/{chunk-Z43KWLZF.js → chunk-ZHNXLS3C.js} +9 -8
  197. package/dist/chunk-ZHNXLS3C.js.map +1 -0
  198. package/dist/{chunk-62ZXBMSD.js → chunk-ZLONH2UD.js} +46 -3
  199. package/dist/chunk-ZLONH2UD.js.map +1 -0
  200. package/dist/core/index.cjs +28 -27
  201. package/dist/core/index.d.cts +4 -4
  202. package/dist/core/index.d.ts +4 -4
  203. package/dist/core/index.js +8 -7
  204. package/dist/{ddl-opIn8DfX.d.ts → ddl-CprnMXJ-.d.ts} +3 -3
  205. package/dist/{ddl-mE07h_EM.d.cts → ddl-DJA7Lci5.d.cts} +3 -3
  206. package/dist/graph-extension/index.cjs +20 -20
  207. package/dist/graph-extension/index.d.cts +4 -4
  208. package/dist/graph-extension/index.d.ts +4 -4
  209. package/dist/graph-extension/index.js +4 -4
  210. package/dist/graph-merge/index.cjs +3204 -635
  211. package/dist/graph-merge/index.cjs.map +1 -1
  212. package/dist/graph-merge/index.d.cts +502 -60
  213. package/dist/graph-merge/index.d.ts +502 -60
  214. package/dist/graph-merge/index.js +2979 -427
  215. package/dist/graph-merge/index.js.map +1 -1
  216. package/dist/{index-Deyu8IXL.d.ts → index-CHTv4XMZ.d.cts} +47 -3
  217. package/dist/{index-DrRS51Ld.d.cts → index-CzoJ3MUw.d.ts} +47 -3
  218. package/dist/index.cjs +229 -216
  219. package/dist/index.cjs.map +1 -1
  220. package/dist/index.d.cts +11 -11
  221. package/dist/index.d.ts +11 -11
  222. package/dist/index.js +35 -34
  223. package/dist/index.js.map +1 -1
  224. package/dist/indexes/index.cjs +13 -13
  225. package/dist/indexes/index.d.cts +4 -4
  226. package/dist/indexes/index.d.ts +4 -4
  227. package/dist/indexes/index.js +6 -6
  228. package/dist/interchange/index.cjs +53 -52
  229. package/dist/interchange/index.cjs.map +1 -1
  230. package/dist/interchange/index.d.cts +17 -13
  231. package/dist/interchange/index.d.ts +17 -13
  232. package/dist/interchange/index.js +17 -16
  233. package/dist/interchange/index.js.map +1 -1
  234. package/dist/{manager-DX983gJ0.d.ts → manager-B6sOQzcQ.d.ts} +2 -2
  235. package/dist/{manager-ptr3JLRP.d.cts → manager-DlY1vlla.d.cts} +2 -2
  236. package/dist/{materialize-indexes-CpXoggWU.d.ts → materialize-indexes-DQL4xcpf.d.ts} +1 -1
  237. package/dist/{materialize-indexes-BXz77YqO.d.cts → materialize-indexes-sskhp-c_.d.cts} +1 -1
  238. package/dist/{postgres-DwgEXSPI.d.cts → postgres-B6YOUcaK.d.ts} +1 -1
  239. package/dist/{postgres-QdOMHTBz.d.ts → postgres-BXy_nyMs.d.cts} +1 -1
  240. package/dist/profiler/index.d.cts +9 -9
  241. package/dist/profiler/index.d.ts +9 -9
  242. package/dist/provenance/index.cjs +43 -42
  243. package/dist/provenance/index.cjs.map +1 -1
  244. package/dist/provenance/index.d.cts +7 -7
  245. package/dist/provenance/index.d.ts +7 -7
  246. package/dist/provenance/index.js +10 -9
  247. package/dist/provenance/index.js.map +1 -1
  248. package/dist/schema/index.cjs +45 -44
  249. package/dist/schema/index.d.cts +6 -6
  250. package/dist/schema/index.d.ts +6 -6
  251. package/dist/schema/index.js +18 -17
  252. package/dist/{searchable-BrUh0pdc.d.cts → searchable-0Cn_lY8U.d.cts} +1 -1
  253. package/dist/{searchable-BOUuA83f.d.ts → searchable-D9gMiwcS.d.ts} +1 -1
  254. package/dist/{sqlite-BfYcV61E.d.cts → sqlite-ClXuBYAj.d.ts} +1 -1
  255. package/dist/{sqlite-DK40XVR1.d.ts → sqlite-DioSxaPe.d.cts} +1 -1
  256. package/dist/{store-Bo1psfVZ.d.ts → store-5j-w5onJ.d.ts} +120 -71
  257. package/dist/{store-FTqBpuJD.d.cts → store-CFedKGU5.d.cts} +120 -71
  258. package/dist/{temporal-CXewwLTB.d.cts → temporal-Ce1pG0S1.d.cts} +1 -1
  259. package/dist/{temporal-DPtn0HOu.d.ts → temporal-CjO9FH1l.d.ts} +1 -1
  260. package/dist/{types-CeT7xM4M.d.ts → types-BrdOFu48.d.ts} +1 -1
  261. package/dist/{types-Du78EvpN.d.ts → types-DKkMJZjR.d.cts} +32 -6
  262. package/dist/{types-Du78EvpN.d.cts → types-DKkMJZjR.d.ts} +32 -6
  263. package/dist/{types-XR1nHERK.d.cts → types-oj_OGAaZ.d.cts} +1 -1
  264. package/dist/{where-CMbFiWwp.d.ts → where-C8w2627G.d.ts} +1 -1
  265. package/dist/{where-CJsp-YUf.d.cts → where-D1wKCJ4Q.d.cts} +1 -1
  266. package/package.json +1 -1
  267. package/dist/chunk-32UETY6S.cjs.map +0 -1
  268. package/dist/chunk-5PDSCELM.cjs.map +0 -1
  269. package/dist/chunk-62ZXBMSD.js.map +0 -1
  270. package/dist/chunk-6LAXM4J2.cjs +0 -12
  271. package/dist/chunk-73MWKDFK.cjs +0 -12
  272. package/dist/chunk-A2LJG5GM.js.map +0 -1
  273. package/dist/chunk-A4R3H7RU.cjs.map +0 -1
  274. package/dist/chunk-ANKOXPCC.cjs.map +0 -1
  275. package/dist/chunk-AT3MLMJV.js.map +0 -1
  276. package/dist/chunk-BEB4OFZF.cjs.map +0 -1
  277. package/dist/chunk-BQM5P2NO.cjs.map +0 -1
  278. package/dist/chunk-C2ZP5YS6.cjs.map +0 -1
  279. package/dist/chunk-C6KE2HSQ.cjs.map +0 -1
  280. package/dist/chunk-EDHV4CBU.js.map +0 -1
  281. package/dist/chunk-FA6Z7B5L.js.map +0 -1
  282. package/dist/chunk-HNYLMPQQ.cjs.map +0 -1
  283. package/dist/chunk-IHRDX7K6.js.map +0 -1
  284. package/dist/chunk-KCH7WQA5.cjs.map +0 -1
  285. package/dist/chunk-KXSMF6PL.js.map +0 -1
  286. package/dist/chunk-LHYSY6SE.js.map +0 -1
  287. package/dist/chunk-N3QTGPC7.cjs.map +0 -1
  288. package/dist/chunk-QPOQX2DI.cjs.map +0 -1
  289. package/dist/chunk-R7EWHKID.js.map +0 -1
  290. package/dist/chunk-RHDOAQCT.cjs.map +0 -1
  291. package/dist/chunk-WEJHA7AD.js.map +0 -1
  292. package/dist/chunk-WYFB7BN3.js.map +0 -1
  293. package/dist/chunk-YQ4JONWE.js.map +0 -1
  294. package/dist/chunk-Z43KWLZF.js.map +0 -1
@@ -1,15 +1,15 @@
1
1
  'use strict';
2
2
 
3
- var chunkBEB4OFZF_cjs = require('./chunk-BEB4OFZF.cjs');
4
- var chunkA7NMUYEL_cjs = require('./chunk-A7NMUYEL.cjs');
5
- var chunkDYPRZ53S_cjs = require('./chunk-DYPRZ53S.cjs');
3
+ var chunkAMMWA76F_cjs = require('./chunk-AMMWA76F.cjs');
4
+ var chunkHDL2ARHX_cjs = require('./chunk-HDL2ARHX.cjs');
5
+ var chunkWODMN3Q2_cjs = require('./chunk-WODMN3Q2.cjs');
6
6
  var chunkPWLJ77UV_cjs = require('./chunk-PWLJ77UV.cjs');
7
- var chunkGVAMRRZR_cjs = require('./chunk-GVAMRRZR.cjs');
8
- var chunkANKOXPCC_cjs = require('./chunk-ANKOXPCC.cjs');
7
+ var chunkJR6SX5RH_cjs = require('./chunk-JR6SX5RH.cjs');
8
+ var chunk3HGRTCDU_cjs = require('./chunk-3HGRTCDU.cjs');
9
9
  var chunkZY4GXIVN_cjs = require('./chunk-ZY4GXIVN.cjs');
10
- var chunkZHOAZD7Q_cjs = require('./chunk-ZHOAZD7Q.cjs');
11
- var chunk2ZWM2RFH_cjs = require('./chunk-2ZWM2RFH.cjs');
12
- var chunkKCH7WQA5_cjs = require('./chunk-KCH7WQA5.cjs');
10
+ var chunkL3LQNR34_cjs = require('./chunk-L3LQNR34.cjs');
11
+ var chunkEDN4Y4ZG_cjs = require('./chunk-EDN4Y4ZG.cjs');
12
+ var chunkMRDBBHIZ_cjs = require('./chunk-MRDBBHIZ.cjs');
13
13
  var chunkN66HCGCY_cjs = require('./chunk-N66HCGCY.cjs');
14
14
  var drizzleOrm = require('drizzle-orm');
15
15
 
@@ -20,7 +20,7 @@ function assertLimitPerEndpoint(operation, graphId, limitPerEndpoint, kind) {
20
20
  if (limitPerEndpoint === void 0 || Number.isInteger(limitPerEndpoint) && limitPerEndpoint > 0) {
21
21
  return;
22
22
  }
23
- throw new chunkKCH7WQA5_cjs.ConfigurationError(
23
+ throw new chunkMRDBBHIZ_cjs.ConfigurationError(
24
24
  `${operation} \`limitPerEndpoint\` must be a positive integer, received ${String(limitPerEndpoint)}.`,
25
25
  {
26
26
  code: "EDGE_ENDPOINT_SET_INVALID",
@@ -64,7 +64,7 @@ function resolveHeterogeneousEdgeRead(params, maxBindParameters) {
64
64
  if (endpointChunkSize >= 1) {
65
65
  return { edgeKinds, endpoints, endpointChunkSize };
66
66
  }
67
- throw new chunkKCH7WQA5_cjs.ConfigurationError(
67
+ throw new chunkMRDBBHIZ_cjs.ConfigurationError(
68
68
  "findEdgesByHeterogeneousEndpointSet cannot fit one endpoint and the selected edge kinds within the backend bind-parameter budget.",
69
69
  {
70
70
  code: "EDGE_HETEROGENEOUS_READ_BIND_BUDGET_EXCEEDED",
@@ -80,8 +80,8 @@ function resolveHeterogeneousEdgeRead(params, maxBindParameters) {
80
80
 
81
81
  // src/backend/live-node-candidates.ts
82
82
  function buildLiveNodeCandidates(nodesTableName, graphId, nodeKind, now) {
83
- const nodes = chunk2ZWM2RFH_cjs.sql.identifier(nodesTableName);
84
- return chunk2ZWM2RFH_cjs.sql`
83
+ const nodes = chunkEDN4Y4ZG_cjs.sql.identifier(nodesTableName);
84
+ return chunkEDN4Y4ZG_cjs.sql`
85
85
  SELECT "id" AS node_id
86
86
  FROM ${nodes}
87
87
  WHERE "graph_id" = ${graphId}
@@ -122,10 +122,10 @@ function vectorSlotFromDropIndexParams(params) {
122
122
  };
123
123
  }
124
124
  function mapVectorWriteError(error, params) {
125
- const mismatch = chunkGVAMRRZR_cjs.parseDimensionMismatch(error);
125
+ const mismatch = chunkJR6SX5RH_cjs.parseDimensionMismatch(error);
126
126
  if (mismatch === void 0) return error;
127
127
  const attempted = mismatch.actual ?? "a different number of";
128
- return new chunkKCH7WQA5_cjs.EmbeddingDimensionChangedError(
128
+ return new chunkMRDBBHIZ_cjs.EmbeddingDimensionChangedError(
129
129
  `Embedding "${params.nodeKind}.${params.fieldPath}" was written with ${attempted} dimensions, but its per-field storage expects ${mismatch.expected}. The field's embedding dimension changed; existing vectors must be recreated and re-embedded.`,
130
130
  {
131
131
  kind: params.nodeKind,
@@ -141,7 +141,7 @@ var SQLITE_CONTRIBUTION_MAT_TIMESTAMPS = {
141
141
  encode: (value) => value
142
142
  };
143
143
  var POSTGRES_CONTRIBUTION_MAT_TIMESTAMPS = {
144
- decode: chunkBEB4OFZF_cjs.formatPostgresTimestamp,
144
+ decode: chunkAMMWA76F_cjs.formatPostgresTimestamp,
145
145
  encode: (value) => new Date(value)
146
146
  };
147
147
  function mapContributionMaterializationRow(row, decode) {
@@ -250,7 +250,7 @@ function identityOf(graphId, contribution) {
250
250
  }
251
251
  function missingTableErrorNames(error, tableName) {
252
252
  const quotedTableName2 = `"${tableName.replaceAll('"', '""')}"`;
253
- for (const link of chunkGVAMRRZR_cjs.errorChain(error)) {
253
+ for (const link of chunkJR6SX5RH_cjs.errorChain(error)) {
254
254
  const message = errorMessage(link);
255
255
  if (typeof message !== "string") continue;
256
256
  const sqliteMatch = /\bno such table:\s*([^\s;]+)/i.exec(message);
@@ -355,13 +355,13 @@ function gateFulltextMethods(source, assert, refuseUnavailable) {
355
355
  return gated;
356
356
  }
357
357
  function gateFulltext(tx, assert, refuseUnavailable) {
358
- return chunkANKOXPCC_cjs.createBackendOverlay(
358
+ return chunk3HGRTCDU_cjs.createBackendOverlay(
359
359
  tx,
360
360
  gateFulltextMethods(tx, assert, refuseUnavailable)
361
361
  );
362
362
  }
363
363
  function contributionRebuildSupported(fulltextStrategy, fulltextTableName, transactional) {
364
- return transactional && chunkA7NMUYEL_cjs.runtimeStrategyContributions(fulltextStrategy, fulltextTableName).every(
364
+ return transactional && chunkHDL2ARHX_cjs.runtimeStrategyContributions(fulltextStrategy, fulltextTableName).every(
365
365
  (contribution) => contribution.dropDdl !== void 0
366
366
  );
367
367
  }
@@ -410,7 +410,7 @@ function createContributionMaterializer(deps) {
410
410
  }
411
411
  }
412
412
  function runtimeContributions() {
413
- return chunkA7NMUYEL_cjs.runtimeStrategyContributions(fulltextStrategy, fulltextTableName);
413
+ return chunkHDL2ARHX_cjs.runtimeStrategyContributions(fulltextStrategy, fulltextTableName);
414
414
  }
415
415
  function cacheInitializedSignature(key, signature) {
416
416
  if (!uncacheableKeys.has(key)) {
@@ -437,13 +437,13 @@ function createContributionMaterializer(deps) {
437
437
  await deps.recordMarker({
438
438
  ...identity,
439
439
  signature: existing.signature,
440
- attemptedAt: chunkBEB4OFZF_cjs.nowIso(),
440
+ attemptedAt: chunkAMMWA76F_cjs.nowIso(),
441
441
  materializedAt: void 0,
442
442
  error: error.message
443
443
  });
444
444
  throw error;
445
445
  }
446
- const attemptedAt = chunkBEB4OFZF_cjs.nowIso();
446
+ const attemptedAt = chunkAMMWA76F_cjs.nowIso();
447
447
  try {
448
448
  for (const statement of contribution.createDdl) {
449
449
  await deps.execDdl(statement);
@@ -479,7 +479,7 @@ function createContributionMaterializer(deps) {
479
479
  rows: indexMarkerRows(graphId, await deps.getMarkers(graphId))
480
480
  };
481
481
  } catch (error) {
482
- if (!chunkGVAMRRZR_cjs.isMissingTableError(error)) throw error;
482
+ if (!chunkJR6SX5RH_cjs.isMissingTableError(error)) throw error;
483
483
  return { kind: "missing-table", error };
484
484
  }
485
485
  }
@@ -558,7 +558,7 @@ function createContributionMaterializer(deps) {
558
558
  if (read.kind === "missing-table") {
559
559
  const first = pending[0];
560
560
  if (first === void 0) return;
561
- throw new chunkKCH7WQA5_cjs.StoreNotInitializedError(graphId, "missing", {
561
+ throw new chunkMRDBBHIZ_cjs.StoreNotInitializedError(graphId, "missing", {
562
562
  cause: read.error,
563
563
  details: { logicalName: first.contribution.logicalName }
564
564
  });
@@ -567,7 +567,7 @@ function createContributionMaterializer(deps) {
567
567
  const { contribution, key, signature } = entry;
568
568
  const state = evaluateContributionState(read.rows.get(key), signature);
569
569
  if (state !== "initialized") {
570
- throw new chunkKCH7WQA5_cjs.StoreNotInitializedError(graphId, state, {
570
+ throw new chunkMRDBBHIZ_cjs.StoreNotInitializedError(graphId, state, {
571
571
  details: { logicalName: contribution.logicalName }
572
572
  });
573
573
  }
@@ -582,12 +582,12 @@ function createContributionMaterializer(deps) {
582
582
  }
583
583
  async function refuseUnavailableFulltext(graphId, error) {
584
584
  await Promise.resolve();
585
- if (!chunkGVAMRRZR_cjs.isMissingTableError(error)) throw error;
585
+ if (!chunkJR6SX5RH_cjs.isMissingTableError(error)) throw error;
586
586
  const missingContribution = runtimeContributions().find(
587
587
  (contribution) => contribution.logicalName === "fulltext" && missingTableErrorNames(error, contribution.tableName)
588
588
  );
589
589
  if (missingContribution !== void 0) {
590
- throw new chunkKCH7WQA5_cjs.ContributionUnavailableError(
590
+ throw new chunkMRDBBHIZ_cjs.ContributionUnavailableError(
591
591
  graphId,
592
592
  missingContribution.tableName,
593
593
  { cause: error }
@@ -756,23 +756,23 @@ function createContributionMaterializer(deps) {
756
756
  async function lockContributionDdl(tx) {
757
757
  if (dialect !== "postgres") return;
758
758
  await tx.execute(
759
- chunk2ZWM2RFH_cjs.asCompiledRowsSql(
760
- chunk2ZWM2RFH_cjs.sql`SELECT pg_advisory_xact_lock(hashtext(${CONTRIBUTION_DDL_LOCK_KEY}), 0)`
759
+ chunkEDN4Y4ZG_cjs.asCompiledRowsSql(
760
+ chunkEDN4Y4ZG_cjs.sql`SELECT pg_advisory_xact_lock(hashtext(${CONTRIBUTION_DDL_LOCK_KEY}), 0)`
761
761
  )
762
762
  );
763
763
  }
764
764
  async function lockSharedFulltextTable(tx, tableName) {
765
765
  if (dialect !== "postgres") return;
766
766
  await tx.executeStatement(
767
- chunk2ZWM2RFH_cjs.asCompiledStatementSql(
768
- chunk2ZWM2RFH_cjs.sql`LOCK TABLE ${chunk2ZWM2RFH_cjs.sql.identifier(tableName)} IN ACCESS EXCLUSIVE MODE`
767
+ chunkEDN4Y4ZG_cjs.asCompiledStatementSql(
768
+ chunkEDN4Y4ZG_cjs.sql`LOCK TABLE ${chunkEDN4Y4ZG_cjs.sql.identifier(tableName)} IN ACCESS EXCLUSIVE MODE`
769
769
  )
770
770
  );
771
771
  }
772
772
  async function readForeignGraphIds(tx, tableName, graphId) {
773
773
  const rows = await tx.execute(
774
- chunk2ZWM2RFH_cjs.asCompiledRowsSql(
775
- chunkZHOAZD7Q_cjs.buildForeignFulltextGraphProbe(
774
+ chunkEDN4Y4ZG_cjs.asCompiledRowsSql(
775
+ chunkL3LQNR34_cjs.buildForeignFulltextGraphProbe(
776
776
  tableName,
777
777
  graphId,
778
778
  FOREIGN_GRAPH_REPORT_LIMIT
@@ -783,7 +783,7 @@ function createContributionMaterializer(deps) {
783
783
  }
784
784
  async function rebuildContribution(graphId, scope, repopulate) {
785
785
  if (scope === "vector") {
786
- throw new chunkKCH7WQA5_cjs.ContributionRebuildUnsupportedError(
786
+ throw new chunkMRDBBHIZ_cjs.ContributionRebuildUnsupportedError(
787
787
  "vector-source-unavailable",
788
788
  { graphId, contribution: scope }
789
789
  );
@@ -793,7 +793,7 @@ function createContributionMaterializer(deps) {
793
793
  (contribution) => contribution.dropDdl === void 0
794
794
  );
795
795
  if (withoutTeardown !== void 0) {
796
- throw new chunkKCH7WQA5_cjs.ContributionRebuildUnsupportedError("no-drop-ddl", {
796
+ throw new chunkMRDBBHIZ_cjs.ContributionRebuildUnsupportedError("no-drop-ddl", {
797
797
  graphId,
798
798
  contribution: scope,
799
799
  owner: withoutTeardown.owner,
@@ -803,7 +803,7 @@ function createContributionMaterializer(deps) {
803
803
  }
804
804
  const fence = deps.schemaWriteTransaction;
805
805
  if (fence === void 0) {
806
- throw new chunkKCH7WQA5_cjs.ContributionRebuildUnsupportedError("no-schema-fence", {
806
+ throw new chunkMRDBBHIZ_cjs.ContributionRebuildUnsupportedError("no-schema-fence", {
807
807
  graphId,
808
808
  contribution: scope,
809
809
  backend: dialect
@@ -826,7 +826,7 @@ function createContributionMaterializer(deps) {
826
826
  const rebuilt = await fence(graphId, async (tx) => {
827
827
  const record = tx.recordContributionMaterialization;
828
828
  if (record === void 0) {
829
- throw new chunkKCH7WQA5_cjs.ConfigurationError(
829
+ throw new chunkMRDBBHIZ_cjs.ConfigurationError(
830
830
  "rebuildContribution requires a transaction-scoped backend that can write contribution markers; without it the drop, recreate, and stamp could not commit together.",
831
831
  {
832
832
  backend: dialect,
@@ -850,7 +850,7 @@ function createContributionMaterializer(deps) {
850
850
  ) === "stale"
851
851
  );
852
852
  if (staleStamp !== void 0) {
853
- throw new chunkKCH7WQA5_cjs.ContributionRebuildUnsupportedError(
853
+ throw new chunkMRDBBHIZ_cjs.ContributionRebuildUnsupportedError(
854
854
  "shared-storage-in-use",
855
855
  {
856
856
  graphId,
@@ -875,13 +875,13 @@ function createContributionMaterializer(deps) {
875
875
  }
876
876
  if (!recreateStorage) {
877
877
  await tx.executeStatement(
878
- chunk2ZWM2RFH_cjs.asCompiledStatementSql(
879
- chunkZHOAZD7Q_cjs.buildFulltextGraphDelete(sharedTable, graphId)
878
+ chunkEDN4Y4ZG_cjs.asCompiledStatementSql(
879
+ chunkL3LQNR34_cjs.buildFulltextGraphDelete(sharedTable, graphId)
880
880
  )
881
881
  );
882
882
  }
883
883
  const stats = await repopulate(tx);
884
- const now = chunkBEB4OFZF_cjs.nowIso();
884
+ const now = chunkAMMWA76F_cjs.nowIso();
885
885
  for (const { contribution, signature } of stamps) {
886
886
  await record({
887
887
  ...identityOf(graphId, contribution),
@@ -943,7 +943,7 @@ var SQLITE_INDEX_MAT_TIMESTAMPS = {
943
943
  encode: (value) => value
944
944
  };
945
945
  var POSTGRES_INDEX_MAT_TIMESTAMPS = {
946
- decode: chunkBEB4OFZF_cjs.formatPostgresTimestamp,
946
+ decode: chunkAMMWA76F_cjs.formatPostgresTimestamp,
947
947
  encode: (value) => new Date(value)
948
948
  };
949
949
  function mapMaterializationRow(row, decode) {
@@ -1001,7 +1001,7 @@ var SQLITE_KIND_REMOVAL_TIMESTAMPS = {
1001
1001
  encode: (value) => value
1002
1002
  };
1003
1003
  var POSTGRES_KIND_REMOVAL_TIMESTAMPS = {
1004
- decode: chunkBEB4OFZF_cjs.formatPostgresTimestamp,
1004
+ decode: chunkAMMWA76F_cjs.formatPostgresTimestamp,
1005
1005
  encode: (value) => new Date(value)
1006
1006
  };
1007
1007
  function mapKindRemovalRow(row, decode) {
@@ -1197,12 +1197,12 @@ function present(value) {
1197
1197
  function mapHybridSearchRow(row, toNodeRow) {
1198
1198
  return {
1199
1199
  node: toNodeRow(row),
1200
- fusedScore: chunkBEB4OFZF_cjs.coerceNumericScore(row["fused_score"]),
1200
+ fusedScore: chunkAMMWA76F_cjs.coerceNumericScore(row["fused_score"]),
1201
1201
  ...present(row["vector_rank"]) ? { vectorRank: Number(row["vector_rank"]) } : {},
1202
- ...present(row["vector_score"]) ? { vectorScore: chunkBEB4OFZF_cjs.coerceNumericScore(row["vector_score"]) } : {},
1202
+ ...present(row["vector_score"]) ? { vectorScore: chunkAMMWA76F_cjs.coerceNumericScore(row["vector_score"]) } : {},
1203
1203
  ...present(row["fulltext_rank"]) ? { fulltextRank: Number(row["fulltext_rank"]) } : {},
1204
1204
  ...present(row["fulltext_score"]) ? {
1205
- fulltextScore: chunkBEB4OFZF_cjs.coerceNumericScore(
1205
+ fulltextScore: chunkAMMWA76F_cjs.coerceNumericScore(
1206
1206
  row["fulltext_score"]
1207
1207
  )
1208
1208
  } : {},
@@ -1214,7 +1214,7 @@ function buildClearGraph(tables, graphId) {
1214
1214
  // The fulltext table is shared by every graph in the database, so its
1215
1215
  // graph-scoped delete is owned by one builder the destructive
1216
1216
  // contribution rebuild calls too — see `buildFulltextGraphDelete`.
1217
- { query: chunkZHOAZD7Q_cjs.buildFulltextGraphDelete(tables.fulltextTableName, graphId) },
1217
+ { query: chunkL3LQNR34_cjs.buildFulltextGraphDelete(tables.fulltextTableName, graphId) },
1218
1218
  {
1219
1219
  query: drizzleOrm.sql`DELETE FROM ${tables.recordedIdentityAssertions} WHERE ${tables.recordedIdentityAssertions.graphId} = ${graphId}`,
1220
1220
  ignoreMissingTable: true,
@@ -1609,6 +1609,8 @@ function buildUpdateEdge(tables, params, timestamp) {
1609
1609
  drizzleOrm.sql`${quotedColumn(edges.validFrom)} = ${sqlNull(resolveValidFrom(params.validFrom, timestamp))}`,
1610
1610
  drizzleOrm.sql`${quotedColumn(edges.validTo)} = ${sqlNull(params.validTo)}`
1611
1611
  );
1612
+ } else if (params.clearValidTo === true) {
1613
+ setParts.push(drizzleOrm.sql`${quotedColumn(edges.validTo)} = NULL`);
1612
1614
  } else if (params.validTo !== void 0) {
1613
1615
  setParts.push(drizzleOrm.sql`${quotedColumn(edges.validTo)} = ${params.validTo}`);
1614
1616
  }
@@ -1621,12 +1623,16 @@ function buildUpdateEdge(tables, params, timestamp) {
1621
1623
  edges.validFrom,
1622
1624
  params.expectedValidFrom
1623
1625
  );
1626
+ const expectedValidTo = expectedValidFromPredicate(
1627
+ edges.validTo,
1628
+ params.expectedValidTo
1629
+ );
1624
1630
  if (params.clearDeleted) {
1625
1631
  return drizzleOrm.sql`
1626
1632
  UPDATE ${edges}
1627
1633
  SET ${setClause}
1628
1634
  WHERE ${edges.graphId} = ${params.graphId}
1629
- AND ${edges.id} = ${params.id}${expectedIdentity}${expectedValidFrom}
1635
+ AND ${edges.id} = ${params.id}${expectedIdentity}${expectedValidFrom}${expectedValidTo}
1630
1636
  RETURNING *
1631
1637
  `;
1632
1638
  }
@@ -1634,7 +1640,7 @@ function buildUpdateEdge(tables, params, timestamp) {
1634
1640
  UPDATE ${edges}
1635
1641
  SET ${setClause}
1636
1642
  WHERE ${edges.graphId} = ${params.graphId}
1637
- AND ${edges.id} = ${params.id}${expectedIdentity}${expectedValidFrom}
1643
+ AND ${edges.id} = ${params.id}${expectedIdentity}${expectedValidFrom}${expectedValidTo}
1638
1644
  AND ${edges.deletedAt} IS NULL
1639
1645
  RETURNING *
1640
1646
  `;
@@ -1755,11 +1761,11 @@ function buildFulltextSearch(tableName, params, strategy, dialect, candidates) {
1755
1761
  assertValidSearchParams(params);
1756
1762
  const mode = resolveMode(params.mode);
1757
1763
  const table = quotedTableName(tableName);
1758
- const matchCondition = chunkDYPRZ53S_cjs.toDrizzleSql(
1764
+ const matchCondition = chunkWODMN3Q2_cjs.toDrizzleSql(
1759
1765
  strategy.matchCondition(tableName, params.query, mode, params.language),
1760
1766
  dialect
1761
1767
  );
1762
- const rankExpression = chunkDYPRZ53S_cjs.toDrizzleSql(
1768
+ const rankExpression = chunkWODMN3Q2_cjs.toDrizzleSql(
1763
1769
  strategy.rankExpression(tableName, params.query, mode, params.language),
1764
1770
  dialect
1765
1771
  );
@@ -1772,10 +1778,10 @@ function buildFulltextSearch(tableName, params, strategy, dialect, candidates) {
1772
1778
  conditions.push(drizzleOrm.sql`${rankExpression} >= ${params.minScore}`);
1773
1779
  }
1774
1780
  if (candidates !== void 0) {
1775
- const candidateSql = chunk2ZWM2RFH_cjs.isSqlFragment(candidates) ? chunkDYPRZ53S_cjs.toDrizzleSql(candidates, dialect) : candidates;
1781
+ const candidateSql = chunkEDN4Y4ZG_cjs.isSqlFragment(candidates) ? chunkWODMN3Q2_cjs.toDrizzleSql(candidates, dialect) : candidates;
1776
1782
  conditions.push(drizzleOrm.sql`"node_id" IN (${candidateSql})`);
1777
1783
  }
1778
- const snippetExpr = params.includeSnippets === true && strategy.supportsSnippets ? chunkDYPRZ53S_cjs.toDrizzleSql(
1784
+ const snippetExpr = params.includeSnippets === true && strategy.supportsSnippets ? chunkWODMN3Q2_cjs.toDrizzleSql(
1779
1785
  strategy.snippetExpression(
1780
1786
  tableName,
1781
1787
  params.query,
@@ -1896,6 +1902,8 @@ function buildUpdateNode(tables, params, timestamp) {
1896
1902
  drizzleOrm.sql`${quotedColumn(nodes.validFrom)} = ${sqlNull(resolveValidFrom(params.validFrom, timestamp))}`,
1897
1903
  drizzleOrm.sql`${quotedColumn(nodes.validTo)} = ${sqlNull(params.validTo)}`
1898
1904
  );
1905
+ } else if (params.clearValidTo === true) {
1906
+ setParts.push(drizzleOrm.sql`${quotedColumn(nodes.validTo)} = NULL`);
1899
1907
  } else if (params.validTo !== void 0) {
1900
1908
  setParts.push(drizzleOrm.sql`${quotedColumn(nodes.validTo)} = ${params.validTo}`);
1901
1909
  }
@@ -1930,18 +1938,18 @@ function buildUpdateNode(tables, params, timestamp) {
1930
1938
  }
1931
1939
  function buildUpdateNodeSet(tables, dialect, params, timestamp) {
1932
1940
  const { nodes } = tables;
1933
- const adapter = chunkZHOAZD7Q_cjs.getDialect(dialect);
1934
- const patchedProps = chunkDYPRZ53S_cjs.toDrizzleSql(
1941
+ const adapter = chunkL3LQNR34_cjs.getDialect(dialect);
1942
+ const patchedProps = chunkWODMN3Q2_cjs.toDrizzleSql(
1935
1943
  adapter.jsonSetProperties(
1936
- chunk2ZWM2RFH_cjs.sql.identifier(nodes.props.name),
1944
+ chunkEDN4Y4ZG_cjs.sql.identifier(nodes.props.name),
1937
1945
  params.patch,
1938
1946
  params.unsetProperties ?? []
1939
1947
  ),
1940
1948
  dialect
1941
1949
  );
1942
- const candidateIds = chunkDYPRZ53S_cjs.toDrizzleSql(params.candidateIds, dialect);
1943
- const candidateIdColumn = chunkDYPRZ53S_cjs.toDrizzleSql(
1944
- chunk2ZWM2RFH_cjs.sql.identifier(params.candidateIdColumn),
1950
+ const candidateIds = chunkWODMN3Q2_cjs.toDrizzleSql(params.candidateIds, dialect);
1951
+ const candidateIdColumn = chunkWODMN3Q2_cjs.toDrizzleSql(
1952
+ chunkEDN4Y4ZG_cjs.sql.identifier(params.candidateIdColumn),
1945
1953
  dialect
1946
1954
  );
1947
1955
  return drizzleOrm.sql`
@@ -2319,15 +2327,15 @@ function createCommonOperationStrategy(tables, dialect, fulltextStrategy) {
2319
2327
  const fulltextTable = tables.fulltextTableName;
2320
2328
  const contributionMaterializations = tables.contributionMaterializations;
2321
2329
  const fulltextBuilders = {
2322
- buildUpsertFulltext: (params, timestamp) => fulltextStrategy.buildUpsert(fulltextTable, params, timestamp).map((statement) => chunkDYPRZ53S_cjs.toDrizzleSql(statement, dialect)),
2323
- buildDeleteFulltext: (params) => fulltextStrategy.buildDelete(fulltextTable, params).map((statement) => chunkDYPRZ53S_cjs.toDrizzleSql(statement, dialect)),
2330
+ buildUpsertFulltext: (params, timestamp) => fulltextStrategy.buildUpsert(fulltextTable, params, timestamp).map((statement) => chunkWODMN3Q2_cjs.toDrizzleSql(statement, dialect)),
2331
+ buildDeleteFulltext: (params) => fulltextStrategy.buildDelete(fulltextTable, params).map((statement) => chunkWODMN3Q2_cjs.toDrizzleSql(statement, dialect)),
2324
2332
  buildDeleteFulltextByNode: (graphId, nodeKind, nodeId) => fulltextStrategy.buildDelete(fulltextTable, {
2325
2333
  graphId,
2326
2334
  nodeKind,
2327
2335
  nodeId
2328
- }).map((statement) => chunkDYPRZ53S_cjs.toDrizzleSql(statement, dialect)),
2329
- buildUpsertFulltextBatch: (params, timestamp) => fulltextStrategy.buildBatchUpsert(fulltextTable, params, timestamp).map((statement) => chunkDYPRZ53S_cjs.toDrizzleSql(statement, dialect)),
2330
- buildDeleteFulltextBatch: (params) => fulltextStrategy.buildBatchDelete(fulltextTable, params).map((statement) => chunkDYPRZ53S_cjs.toDrizzleSql(statement, dialect)),
2336
+ }).map((statement) => chunkWODMN3Q2_cjs.toDrizzleSql(statement, dialect)),
2337
+ buildUpsertFulltextBatch: (params, timestamp) => fulltextStrategy.buildBatchUpsert(fulltextTable, params, timestamp).map((statement) => chunkWODMN3Q2_cjs.toDrizzleSql(statement, dialect)),
2338
+ buildDeleteFulltextBatch: (params) => fulltextStrategy.buildBatchDelete(fulltextTable, params).map((statement) => chunkWODMN3Q2_cjs.toDrizzleSql(statement, dialect)),
2331
2339
  buildFulltextSearch: (params) => buildFulltextSearch(
2332
2340
  fulltextTable,
2333
2341
  params,
@@ -2339,7 +2347,7 @@ function createCommonOperationStrategy(tables, dialect, fulltextStrategy) {
2339
2347
  tables.nodes,
2340
2348
  params.graphId,
2341
2349
  params.nodeKind,
2342
- chunkBEB4OFZF_cjs.nowIso()
2350
+ chunkAMMWA76F_cjs.nowIso()
2343
2351
  )
2344
2352
  ),
2345
2353
  buildHybridSearch: (params, vectorSql, vectorScoreDescending) => {
@@ -2347,7 +2355,7 @@ function createCommonOperationStrategy(tables, dialect, fulltextStrategy) {
2347
2355
  tables.nodes,
2348
2356
  params.graphId,
2349
2357
  params.nodeKind,
2350
- chunkBEB4OFZF_cjs.nowIso()
2358
+ chunkAMMWA76F_cjs.nowIso()
2351
2359
  );
2352
2360
  const fulltextSql = buildFulltextSearch(
2353
2361
  fulltextTable,
@@ -2368,7 +2376,7 @@ function createCommonOperationStrategy(tables, dialect, fulltextStrategy) {
2368
2376
  hybridCandidatesRef()
2369
2377
  );
2370
2378
  return buildHybridSearchStatement({
2371
- candidatesSql: chunk2ZWM2RFH_cjs.isSqlFragment(candidates) ? chunkDYPRZ53S_cjs.toDrizzleSql(candidates, dialect) : candidates,
2379
+ candidatesSql: chunkEDN4Y4ZG_cjs.isSqlFragment(candidates) ? chunkWODMN3Q2_cjs.toDrizzleSql(candidates, dialect) : candidates,
2372
2380
  vectorSql,
2373
2381
  vectorScoreDescending,
2374
2382
  fulltextSql,
@@ -2498,7 +2506,7 @@ var DRIZZLE_DIALECT_LABELS = {
2498
2506
  function assertAdoptedDialect(externalTx, brand, backend) {
2499
2507
  if (drizzleOrm.is(externalTx, brand)) return;
2500
2508
  const label = DRIZZLE_DIALECT_LABELS[backend];
2501
- throw new chunkKCH7WQA5_cjs.ConfigurationError(
2509
+ throw new chunkMRDBBHIZ_cjs.ConfigurationError(
2502
2510
  `adoptTransaction received a handle that is not a ${label} Drizzle transaction. Pass the \`tx\` from a ${label} \`db.transaction(...)\` opened on this backend's connection.`,
2503
2511
  { backend, capability: "adoptTransaction" }
2504
2512
  );
@@ -2507,8 +2515,8 @@ async function withDuplicateKeyClassification(run, context) {
2507
2515
  try {
2508
2516
  return await run();
2509
2517
  } catch (error) {
2510
- if (!chunkGVAMRRZR_cjs.isDuplicatePrimaryKeyError(error, context.relation)) throw error;
2511
- throw new chunkKCH7WQA5_cjs.DatabaseOperationError(
2518
+ if (!chunkJR6SX5RH_cjs.isDuplicatePrimaryKeyError(error, context.relation)) throw error;
2519
+ throw new chunkMRDBBHIZ_cjs.DatabaseOperationError(
2512
2520
  `Insert ${context.entity} failed: a row with this identity already exists`,
2513
2521
  {
2514
2522
  operation: "insert",
@@ -2529,7 +2537,7 @@ function verifyExpectedActiveVersion(graphId, expected, actualActiveVersion) {
2529
2537
  }
2530
2538
  function assertActiveSchemaVersion(graphId, expectedVersion, actualActiveVersion) {
2531
2539
  if (actualActiveVersion !== expectedVersion) {
2532
- throw new chunkKCH7WQA5_cjs.StaleVersionError({
2540
+ throw new chunkMRDBBHIZ_cjs.StaleVersionError({
2533
2541
  graphId,
2534
2542
  expected: expectedVersion,
2535
2543
  actual: actualActiveVersion
@@ -2579,7 +2587,7 @@ function createCommonOperationBackend(options) {
2579
2587
  operationStrategy,
2580
2588
  rowMappers
2581
2589
  } = options;
2582
- const nowIso2 = options.nowIso ?? chunkBEB4OFZF_cjs.nowIso;
2590
+ const nowIso2 = options.nowIso ?? chunkAMMWA76F_cjs.nowIso;
2583
2591
  const tableExists = createCachedTableExistence(
2584
2592
  (tableName) => execution.execGet(
2585
2593
  operationStrategy.buildTableExists(tableName)
@@ -2601,7 +2609,7 @@ function createCommonOperationBackend(options) {
2601
2609
  return {
2602
2610
  tableExists,
2603
2611
  async executeSchemaDdl(ddl) {
2604
- await execution.execRun(chunk2ZWM2RFH_cjs.asCompiledStatementSql(chunk2ZWM2RFH_cjs.sql.raw(ddl)));
2612
+ await execution.execRun(chunkEDN4Y4ZG_cjs.asCompiledStatementSql(chunkEDN4Y4ZG_cjs.sql.raw(ddl)));
2605
2613
  },
2606
2614
  async executeStatement(query) {
2607
2615
  await execution.execRun(query);
@@ -2621,7 +2629,7 @@ function createCommonOperationBackend(options) {
2621
2629
  }
2622
2630
  );
2623
2631
  if (!row)
2624
- throw new chunkKCH7WQA5_cjs.DatabaseOperationError(
2632
+ throw new chunkMRDBBHIZ_cjs.DatabaseOperationError(
2625
2633
  "Insert node failed: no row returned",
2626
2634
  {
2627
2635
  operation: "insert",
@@ -2648,7 +2656,7 @@ function createCommonOperationBackend(options) {
2648
2656
  return;
2649
2657
  }
2650
2658
  const timestamp = nowIso2();
2651
- for (const chunk2 of chunkGVAMRRZR_cjs.chunk(params, batchConfig.nodeInsertBatchSize)) {
2659
+ for (const chunk2 of chunkJR6SX5RH_cjs.chunk(params, batchConfig.nodeInsertBatchSize)) {
2652
2660
  const query = operationStrategy.buildInsertNodesBatch(chunk2, timestamp);
2653
2661
  await withDuplicateKeyClassification(() => execution.execRun(query), {
2654
2662
  entity: "node",
@@ -2663,7 +2671,7 @@ function createCommonOperationBackend(options) {
2663
2671
  }
2664
2672
  const timestamp = nowIso2();
2665
2673
  const allRows = [];
2666
- for (const chunk2 of chunkGVAMRRZR_cjs.chunk(params, batchConfig.nodeInsertBatchSize)) {
2674
+ for (const chunk2 of chunkJR6SX5RH_cjs.chunk(params, batchConfig.nodeInsertBatchSize)) {
2667
2675
  const query = operationStrategy.buildInsertNodesBatchReturning(
2668
2676
  chunk2,
2669
2677
  timestamp
@@ -2688,7 +2696,7 @@ function createCommonOperationBackend(options) {
2688
2696
  async getNodes(graphId, kind, ids) {
2689
2697
  if (ids.length === 0) return [];
2690
2698
  const allRows = [];
2691
- for (const chunk2 of chunkGVAMRRZR_cjs.chunk(ids, batchConfig.getNodesChunkSize)) {
2699
+ for (const chunk2 of chunkJR6SX5RH_cjs.chunk(ids, batchConfig.getNodesChunkSize)) {
2692
2700
  const query = operationStrategy.buildGetNodes(graphId, kind, chunk2);
2693
2701
  const rows = await execution.execAll(query);
2694
2702
  allRows.push(...rows.map((row) => rowMappers.toNodeRow(row)));
@@ -2700,7 +2708,7 @@ function createCommonOperationBackend(options) {
2700
2708
  const query = operationStrategy.buildUpdateNode(params, timestamp);
2701
2709
  const row = await execution.execGet(query);
2702
2710
  if (!row)
2703
- throw new chunkKCH7WQA5_cjs.DatabaseOperationError(
2711
+ throw new chunkMRDBBHIZ_cjs.DatabaseOperationError(
2704
2712
  "Update node failed: no row returned",
2705
2713
  {
2706
2714
  operation: "update",
@@ -2712,13 +2720,13 @@ function createCommonOperationBackend(options) {
2712
2720
  },
2713
2721
  async updateNodeSet(params) {
2714
2722
  if (Object.keys(params.patch).length === 0 && (params.unsetProperties?.length ?? 0) === 0) {
2715
- throw new chunkKCH7WQA5_cjs.ConfigurationError(
2723
+ throw new chunkMRDBBHIZ_cjs.ConfigurationError(
2716
2724
  "Set-based node update requires at least one property",
2717
2725
  { operation: "updateNodeSet", kind: params.kind }
2718
2726
  );
2719
2727
  }
2720
2728
  if (params.candidateIdColumn.length === 0) {
2721
- throw new chunkKCH7WQA5_cjs.ConfigurationError(
2729
+ throw new chunkMRDBBHIZ_cjs.ConfigurationError(
2722
2730
  "Set-based node update requires a candidate id column",
2723
2731
  { operation: "updateNodeSet", kind: params.kind }
2724
2732
  );
@@ -2779,7 +2787,7 @@ function createCommonOperationBackend(options) {
2779
2787
  }
2780
2788
  );
2781
2789
  if (!row)
2782
- throw new chunkKCH7WQA5_cjs.DatabaseOperationError(
2790
+ throw new chunkMRDBBHIZ_cjs.DatabaseOperationError(
2783
2791
  "Insert edge failed: no row returned",
2784
2792
  {
2785
2793
  operation: "insert",
@@ -2806,7 +2814,7 @@ function createCommonOperationBackend(options) {
2806
2814
  return;
2807
2815
  }
2808
2816
  const timestamp = nowIso2();
2809
- for (const chunk2 of chunkGVAMRRZR_cjs.chunk(params, batchConfig.edgeInsertBatchSize)) {
2817
+ for (const chunk2 of chunkJR6SX5RH_cjs.chunk(params, batchConfig.edgeInsertBatchSize)) {
2810
2818
  const query = operationStrategy.buildInsertEdgesBatch(chunk2, timestamp);
2811
2819
  await withDuplicateKeyClassification(() => execution.execRun(query), {
2812
2820
  entity: "edge",
@@ -2821,7 +2829,7 @@ function createCommonOperationBackend(options) {
2821
2829
  }
2822
2830
  const timestamp = nowIso2();
2823
2831
  const allRows = [];
2824
- for (const chunk2 of chunkGVAMRRZR_cjs.chunk(params, batchConfig.edgeInsertBatchSize)) {
2832
+ for (const chunk2 of chunkJR6SX5RH_cjs.chunk(params, batchConfig.edgeInsertBatchSize)) {
2825
2833
  const query = operationStrategy.buildInsertEdgesBatchReturning(
2826
2834
  chunk2,
2827
2835
  timestamp
@@ -2846,7 +2854,7 @@ function createCommonOperationBackend(options) {
2846
2854
  async getEdges(graphId, ids) {
2847
2855
  if (ids.length === 0) return [];
2848
2856
  const allRows = [];
2849
- for (const chunk2 of chunkGVAMRRZR_cjs.chunk(ids, batchConfig.getEdgesChunkSize)) {
2857
+ for (const chunk2 of chunkJR6SX5RH_cjs.chunk(ids, batchConfig.getEdgesChunkSize)) {
2850
2858
  const query = operationStrategy.buildGetEdges(graphId, chunk2);
2851
2859
  const rows = await execution.execAll(query);
2852
2860
  allRows.push(...rows.map((row) => rowMappers.toEdgeRow(row)));
@@ -2858,7 +2866,7 @@ function createCommonOperationBackend(options) {
2858
2866
  const query = operationStrategy.buildUpdateEdge(params, timestamp);
2859
2867
  const row = await execution.execGet(query);
2860
2868
  if (!row)
2861
- throw new chunkKCH7WQA5_cjs.DatabaseOperationError(
2869
+ throw new chunkMRDBBHIZ_cjs.DatabaseOperationError(
2862
2870
  "Update edge failed: no row returned",
2863
2871
  {
2864
2872
  operation: "update",
@@ -2884,7 +2892,7 @@ function createCommonOperationBackend(options) {
2884
2892
  1,
2885
2893
  batchConfig.getEdgesChunkSize - 1
2886
2894
  );
2887
- for (const chunk2 of chunkGVAMRRZR_cjs.chunk(params.ids, softDeleteChunkSize)) {
2895
+ for (const chunk2 of chunkJR6SX5RH_cjs.chunk(params.ids, softDeleteChunkSize)) {
2888
2896
  const query = operationStrategy.buildDeleteEdgesBatch(
2889
2897
  { graphId: params.graphId, ids: chunk2 },
2890
2898
  timestamp
@@ -2894,7 +2902,7 @@ function createCommonOperationBackend(options) {
2894
2902
  },
2895
2903
  async hardDeleteEdgesBatch(params) {
2896
2904
  if (params.ids.length === 0) return;
2897
- for (const chunk2 of chunkGVAMRRZR_cjs.chunk(
2905
+ for (const chunk2 of chunkJR6SX5RH_cjs.chunk(
2898
2906
  params.ids,
2899
2907
  batchConfig.getEdgesChunkSize
2900
2908
  )) {
@@ -2938,7 +2946,7 @@ function createCommonOperationBackend(options) {
2938
2946
  async findEdgesByEndpointSet(params) {
2939
2947
  const ids = resolveEdgeEndpointIds(params);
2940
2948
  const edgeRows = [];
2941
- for (const idChunk of chunkGVAMRRZR_cjs.chunk(
2949
+ for (const idChunk of chunkJR6SX5RH_cjs.chunk(
2942
2950
  ids,
2943
2951
  batchConfig.findEdgesEndpointChunkSize
2944
2952
  )) {
@@ -2955,7 +2963,7 @@ function createCommonOperationBackend(options) {
2955
2963
  const { edgeKinds, endpoints, endpointChunkSize } = resolveHeterogeneousEdgeRead(params, maxBindParameters);
2956
2964
  if (edgeKinds.length === 0 || endpoints.length === 0) return [];
2957
2965
  const edgeRows = [];
2958
- for (const endpointChunk of chunkGVAMRRZR_cjs.chunk(endpoints, endpointChunkSize)) {
2966
+ for (const endpointChunk of chunkJR6SX5RH_cjs.chunk(endpoints, endpointChunkSize)) {
2959
2967
  const query = operationStrategy.buildFindEdgesByHeterogeneousEndpointSet(
2960
2968
  params,
2961
2969
  endpointChunk,
@@ -2975,7 +2983,7 @@ function createCommonOperationBackend(options) {
2975
2983
  const query = operationStrategy.buildInsertUnique(params);
2976
2984
  const result = await execution.execGet(query);
2977
2985
  if (result && result.node_id !== params.nodeId) {
2978
- throw new chunkKCH7WQA5_cjs.UniquenessError({
2986
+ throw new chunkMRDBBHIZ_cjs.UniquenessError({
2979
2987
  constraintName: params.constraintName,
2980
2988
  kind: params.nodeKind,
2981
2989
  existingId: result.node_id,
@@ -2995,7 +3003,7 @@ function createCommonOperationBackend(options) {
2995
3003
  continue;
2996
3004
  }
2997
3005
  if (existing.nodeId !== entry.nodeId) {
2998
- throw new chunkKCH7WQA5_cjs.UniquenessError({
3006
+ throw new chunkMRDBBHIZ_cjs.UniquenessError({
2999
3007
  constraintName: entry.constraintName,
3000
3008
  kind: entry.nodeKind,
3001
3009
  existingId: existing.nodeId,
@@ -3005,7 +3013,7 @@ function createCommonOperationBackend(options) {
3005
3013
  }
3006
3014
  }
3007
3015
  const deduped = [...byTarget.values()];
3008
- for (const chunk2 of chunkGVAMRRZR_cjs.chunk(
3016
+ for (const chunk2 of chunkJR6SX5RH_cjs.chunk(
3009
3017
  deduped,
3010
3018
  batchConfig.uniqueInsertBatchSize
3011
3019
  )) {
@@ -3020,7 +3028,7 @@ function createCommonOperationBackend(options) {
3020
3028
  for (const entry of chunk2) {
3021
3029
  const owner = ownerByTarget.get(targetKey(entry));
3022
3030
  if (owner !== void 0 && owner !== entry.nodeId) {
3023
- throw new chunkKCH7WQA5_cjs.UniquenessError({
3031
+ throw new chunkMRDBBHIZ_cjs.UniquenessError({
3024
3032
  constraintName: entry.constraintName,
3025
3033
  kind: entry.nodeKind,
3026
3034
  existingId: owner,
@@ -3038,7 +3046,7 @@ function createCommonOperationBackend(options) {
3038
3046
  },
3039
3047
  async hardDeleteUniquesByNodeIds(params) {
3040
3048
  const nodeIds = [...new Set(params.nodeIds)];
3041
- for (const chunk2 of chunkGVAMRRZR_cjs.chunk(
3049
+ for (const chunk2 of chunkJR6SX5RH_cjs.chunk(
3042
3050
  nodeIds,
3043
3051
  batchConfig.uniqueDeleteChunkSize
3044
3052
  )) {
@@ -3057,7 +3065,7 @@ function createCommonOperationBackend(options) {
3057
3065
  async checkUniqueBatch(params) {
3058
3066
  if (params.keys.length === 0) return [];
3059
3067
  const allRows = [];
3060
- for (const chunk2 of chunkGVAMRRZR_cjs.chunk(
3068
+ for (const chunk2 of chunkJR6SX5RH_cjs.chunk(
3061
3069
  params.keys,
3062
3070
  batchConfig.checkUniqueBatchChunkSize
3063
3071
  )) {
@@ -3088,7 +3096,7 @@ function createCommonOperationBackend(options) {
3088
3096
  if (existingRaw !== void 0) {
3089
3097
  const existing = rowMappers.toSchemaVersionRow(existingRaw);
3090
3098
  if (existing.schema_hash !== params.schemaHash) {
3091
- throw new chunkKCH7WQA5_cjs.SchemaContentConflictError({
3099
+ throw new chunkMRDBBHIZ_cjs.SchemaContentConflictError({
3092
3100
  graphId: params.graphId,
3093
3101
  version: params.version,
3094
3102
  existingHash: existing.schema_hash,
@@ -3136,7 +3144,7 @@ function createCommonOperationBackend(options) {
3136
3144
  );
3137
3145
  const insertedRaw = await execution.execGet(insertQuery);
3138
3146
  if (!insertedRaw) {
3139
- throw new chunkKCH7WQA5_cjs.DatabaseOperationError(
3147
+ throw new chunkMRDBBHIZ_cjs.DatabaseOperationError(
3140
3148
  "Insert schema failed: no row returned",
3141
3149
  { operation: "insert", entity: "schema" }
3142
3150
  );
@@ -3154,7 +3162,7 @@ function createCommonOperationBackend(options) {
3154
3162
  operationStrategy.buildGetSchemaVersion(params.graphId, params.version)
3155
3163
  );
3156
3164
  if (!targetRaw) {
3157
- throw new chunkKCH7WQA5_cjs.MigrationError(
3165
+ throw new chunkMRDBBHIZ_cjs.MigrationError(
3158
3166
  `Cannot activate version ${params.version}: version does not exist for graph "${params.graphId}".`,
3159
3167
  {
3160
3168
  graphId: params.graphId,
@@ -3187,7 +3195,7 @@ function quoteSqlIdentifier(identifier) {
3187
3195
  }
3188
3196
  function requireRawExecution(backend) {
3189
3197
  if (backend.executeRaw === void 0) {
3190
- throw new chunkKCH7WQA5_cjs.TrustedImportError(
3198
+ throw new chunkMRDBBHIZ_cjs.TrustedImportError(
3191
3199
  "This backend cannot execute the raw statements required by trusted import.",
3192
3200
  "backend_unsupported"
3193
3201
  );
@@ -3196,7 +3204,7 @@ function requireRawExecution(backend) {
3196
3204
  }
3197
3205
  function requireStatementExecution(backend) {
3198
3206
  if (backend.executeStatement === void 0) {
3199
- throw new chunkKCH7WQA5_cjs.TrustedImportError(
3207
+ throw new chunkMRDBBHIZ_cjs.TrustedImportError(
3200
3208
  "This backend cannot execute the index lifecycle required by trusted import.",
3201
3209
  "backend_unsupported"
3202
3210
  );
@@ -3218,7 +3226,7 @@ async function assertTrustedImportDatabaseEmpty(backend, tableNames) {
3218
3226
  []
3219
3227
  );
3220
3228
  if (!rowIndicatesExistingData(rows[0])) return;
3221
- throw new chunkKCH7WQA5_cjs.TrustedImportError(
3229
+ throw new chunkMRDBBHIZ_cjs.TrustedImportError(
3222
3230
  "Trusted import requires globally empty TypeGraph node and edge tables.",
3223
3231
  "database_not_empty",
3224
3232
  { tables: [tableNames.nodes, tableNames.edges] },
@@ -3230,8 +3238,8 @@ async function assertTrustedImportDatabaseEmpty(backend, tableNames) {
3230
3238
  async function lockPostgresTrustedImportTables(backend, tableNames) {
3231
3239
  const executeStatement = requireStatementExecution(backend);
3232
3240
  await executeStatement(
3233
- chunk2ZWM2RFH_cjs.asCompiledStatementSql(
3234
- chunk2ZWM2RFH_cjs.sql.raw(
3241
+ chunkEDN4Y4ZG_cjs.asCompiledStatementSql(
3242
+ chunkEDN4Y4ZG_cjs.sql.raw(
3235
3243
  `LOCK TABLE ${quoteSqlIdentifier(tableNames.nodes)}, ${quoteSqlIdentifier(tableNames.edges)} IN ACCESS EXCLUSIVE MODE`
3236
3244
  )
3237
3245
  )
@@ -3251,8 +3259,8 @@ async function suspendSqliteSecondaryIndexes(backend, tableNames) {
3251
3259
  );
3252
3260
  for (const definition of definitions) {
3253
3261
  await executeStatement(
3254
- chunk2ZWM2RFH_cjs.asCompiledStatementSql(
3255
- chunk2ZWM2RFH_cjs.sql.raw(`DROP INDEX ${quoteSqlIdentifier(definition.index_name)}`)
3262
+ chunkEDN4Y4ZG_cjs.asCompiledStatementSql(
3263
+ chunkEDN4Y4ZG_cjs.sql.raw(`DROP INDEX ${quoteSqlIdentifier(definition.index_name)}`)
3256
3264
  )
3257
3265
  );
3258
3266
  }
@@ -3282,8 +3290,8 @@ async function suspendPostgresSecondaryIndexes(backend, tableNames) {
3282
3290
  );
3283
3291
  for (const definition of definitions) {
3284
3292
  await executeStatement(
3285
- chunk2ZWM2RFH_cjs.asCompiledStatementSql(
3286
- chunk2ZWM2RFH_cjs.sql.raw(`DROP INDEX ${quoteSqlIdentifier(definition.index_name)}`)
3293
+ chunkEDN4Y4ZG_cjs.asCompiledStatementSql(
3294
+ chunkEDN4Y4ZG_cjs.sql.raw(`DROP INDEX ${quoteSqlIdentifier(definition.index_name)}`)
3287
3295
  )
3288
3296
  );
3289
3297
  }
@@ -3293,20 +3301,20 @@ async function restoreSecondaryIndexes(backend, definitions) {
3293
3301
  const executeStatement = requireStatementExecution(backend);
3294
3302
  for (const definition of definitions) {
3295
3303
  await executeStatement(
3296
- chunk2ZWM2RFH_cjs.asCompiledStatementSql(chunk2ZWM2RFH_cjs.sql.raw(definition.index_definition))
3304
+ chunkEDN4Y4ZG_cjs.asCompiledStatementSql(chunkEDN4Y4ZG_cjs.sql.raw(definition.index_definition))
3297
3305
  );
3298
3306
  }
3299
3307
  }
3300
3308
  async function analyzeImportedTables(backend, tableNames) {
3301
3309
  const executeStatement = requireStatementExecution(backend);
3302
3310
  await executeStatement(
3303
- chunk2ZWM2RFH_cjs.asCompiledStatementSql(
3304
- chunk2ZWM2RFH_cjs.sql.raw(`ANALYZE ${quoteSqlIdentifier(tableNames.nodes)}`)
3311
+ chunkEDN4Y4ZG_cjs.asCompiledStatementSql(
3312
+ chunkEDN4Y4ZG_cjs.sql.raw(`ANALYZE ${quoteSqlIdentifier(tableNames.nodes)}`)
3305
3313
  )
3306
3314
  );
3307
3315
  await executeStatement(
3308
- chunk2ZWM2RFH_cjs.asCompiledStatementSql(
3309
- chunk2ZWM2RFH_cjs.sql.raw(`ANALYZE ${quoteSqlIdentifier(tableNames.edges)}`)
3316
+ chunkEDN4Y4ZG_cjs.asCompiledStatementSql(
3317
+ chunkEDN4Y4ZG_cjs.sql.raw(`ANALYZE ${quoteSqlIdentifier(tableNames.edges)}`)
3310
3318
  )
3311
3319
  );
3312
3320
  }
@@ -3321,7 +3329,7 @@ function postgresArray(values) {
3321
3329
  function createSqliteTrustedImportSession(executionAdapter, tableNames) {
3322
3330
  const executePreparedRunBatch = executionAdapter.executePreparedRunBatch;
3323
3331
  if (executePreparedRunBatch === void 0) {
3324
- throw new chunkKCH7WQA5_cjs.TrustedImportError(
3332
+ throw new chunkMRDBBHIZ_cjs.TrustedImportError(
3325
3333
  "Trusted import requires a synchronous SQLite driver with prepared statement support.",
3326
3334
  "backend_unsupported"
3327
3335
  );
@@ -3493,5 +3501,5 @@ exports.tableExistsFromRow = tableExistsFromRow;
3493
3501
  exports.vectorSlotFromCreateIndexParams = vectorSlotFromCreateIndexParams;
3494
3502
  exports.vectorSlotFromDropIndexParams = vectorSlotFromDropIndexParams;
3495
3503
  exports.vectorSlotFromParams = vectorSlotFromParams;
3496
- //# sourceMappingURL=chunk-RHDOAQCT.cjs.map
3497
- //# sourceMappingURL=chunk-RHDOAQCT.cjs.map
3504
+ //# sourceMappingURL=chunk-UPAJHMW3.cjs.map
3505
+ //# sourceMappingURL=chunk-UPAJHMW3.cjs.map