@nicia-ai/typegraph 0.42.1 → 0.44.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 (289) hide show
  1. package/dist/backend/drizzle/indexes.cjs +9 -9
  2. package/dist/backend/drizzle/indexes.d.cts +1 -1
  3. package/dist/backend/drizzle/indexes.d.ts +1 -1
  4. package/dist/backend/drizzle/indexes.js +5 -5
  5. package/dist/backend/index.cjs +50 -50
  6. package/dist/backend/index.d.cts +3 -3
  7. package/dist/backend/index.d.ts +3 -3
  8. package/dist/backend/index.js +11 -11
  9. package/dist/backend/postgres/index.cjs +26 -26
  10. package/dist/backend/postgres/index.d.cts +6 -5
  11. package/dist/backend/postgres/index.d.ts +6 -5
  12. package/dist/backend/postgres/index.js +13 -13
  13. package/dist/backend/postgres/pglite-store.cjs +33 -33
  14. package/dist/backend/postgres/pglite-store.cjs.map +1 -1
  15. package/dist/backend/postgres/pglite-store.d.cts +7 -7
  16. package/dist/backend/postgres/pglite-store.d.ts +7 -7
  17. package/dist/backend/postgres/pglite-store.js +29 -29
  18. package/dist/backend/postgres/pglite-store.js.map +1 -1
  19. package/dist/backend/postgres/pglite.cjs +15 -15
  20. package/dist/backend/postgres/pglite.d.cts +3 -2
  21. package/dist/backend/postgres/pglite.d.ts +3 -2
  22. package/dist/backend/postgres/pglite.js +14 -14
  23. package/dist/backend/sqlite/index.cjs +23 -23
  24. package/dist/backend/sqlite/index.d.cts +7 -6
  25. package/dist/backend/sqlite/index.d.ts +7 -6
  26. package/dist/backend/sqlite/index.js +11 -11
  27. package/dist/backend/sqlite/libsql.cjs +17 -17
  28. package/dist/backend/sqlite/libsql.cjs.map +1 -1
  29. package/dist/backend/sqlite/libsql.d.cts +3 -2
  30. package/dist/backend/sqlite/libsql.d.ts +3 -2
  31. package/dist/backend/sqlite/libsql.js +13 -13
  32. package/dist/backend/sqlite/libsql.js.map +1 -1
  33. package/dist/backend/sqlite/local-store.cjs +34 -34
  34. package/dist/backend/sqlite/local-store.cjs.map +1 -1
  35. package/dist/backend/sqlite/local-store.d.cts +8 -7
  36. package/dist/backend/sqlite/local-store.d.ts +8 -7
  37. package/dist/backend/sqlite/local-store.js +30 -30
  38. package/dist/backend/sqlite/local-store.js.map +1 -1
  39. package/dist/backend/sqlite/local.cjs +16 -16
  40. package/dist/backend/sqlite/local.d.cts +3 -2
  41. package/dist/backend/sqlite/local.d.ts +3 -2
  42. package/dist/backend/sqlite/local.js +14 -14
  43. package/dist/{chunk-3RPQDGUE.cjs → chunk-2BIG7U6E.cjs} +5 -5
  44. package/dist/{chunk-3RPQDGUE.cjs.map → chunk-2BIG7U6E.cjs.map} +1 -1
  45. package/dist/{chunk-2OOY4OYT.js → chunk-2L54C2C2.js} +4 -4
  46. package/dist/{chunk-2OOY4OYT.js.map → chunk-2L54C2C2.js.map} +1 -1
  47. package/dist/{chunk-V2GZBPY2.cjs → chunk-2VLBGQBY.cjs} +310 -61
  48. package/dist/chunk-2VLBGQBY.cjs.map +1 -0
  49. package/dist/{chunk-RXOAXO3R.js → chunk-2WDD2NO3.js} +3 -3
  50. package/dist/{chunk-RXOAXO3R.js.map → chunk-2WDD2NO3.js.map} +1 -1
  51. package/dist/{chunk-2HKIID5K.js → chunk-2Y4IFKW7.js} +5 -5
  52. package/dist/{chunk-2HKIID5K.js.map → chunk-2Y4IFKW7.js.map} +1 -1
  53. package/dist/{chunk-ECU53PMN.cjs → chunk-3PRKZW6D.cjs} +5 -5
  54. package/dist/chunk-3PRKZW6D.cjs.map +1 -0
  55. package/dist/{chunk-2G6ZEGYO.js → chunk-46GDII45.js} +4 -4
  56. package/dist/{chunk-2G6ZEGYO.js.map → chunk-46GDII45.js.map} +1 -1
  57. package/dist/{chunk-OYJSYDIH.js → chunk-4MB3AQAQ.js} +13 -3
  58. package/dist/chunk-4MB3AQAQ.js.map +1 -0
  59. package/dist/chunk-4SZ6XPTG.cjs +12 -0
  60. package/dist/{chunk-VGMNGWBR.cjs.map → chunk-4SZ6XPTG.cjs.map} +1 -1
  61. package/dist/{chunk-FY4VY5EV.cjs → chunk-5MUSU4ZP.cjs} +20 -20
  62. package/dist/chunk-5MUSU4ZP.cjs.map +1 -0
  63. package/dist/{chunk-ZIRC2U6G.js → chunk-63KCKSSH.js} +78 -16
  64. package/dist/chunk-63KCKSSH.js.map +1 -0
  65. package/dist/{chunk-7Y6BV3TK.cjs → chunk-66UVLHQA.cjs} +100 -100
  66. package/dist/{chunk-7Y6BV3TK.cjs.map → chunk-66UVLHQA.cjs.map} +1 -1
  67. package/dist/{chunk-M4GYQF2H.js → chunk-6DCB664D.js} +7 -4
  68. package/dist/chunk-6DCB664D.js.map +1 -0
  69. package/dist/{chunk-OMQ2NBOR.cjs → chunk-6JZUSDY2.cjs} +27 -27
  70. package/dist/{chunk-OMQ2NBOR.cjs.map → chunk-6JZUSDY2.cjs.map} +1 -1
  71. package/dist/{chunk-Z3WIL6S3.js → chunk-7G32LIQM.js} +5 -5
  72. package/dist/{chunk-Z3WIL6S3.js.map → chunk-7G32LIQM.js.map} +1 -1
  73. package/dist/{chunk-2SO5I5AI.cjs → chunk-7V2FGGI2.cjs} +250 -198
  74. package/dist/chunk-7V2FGGI2.cjs.map +1 -0
  75. package/dist/{chunk-I73ATSAH.cjs → chunk-A2I2XO52.cjs} +4 -4
  76. package/dist/{chunk-I73ATSAH.cjs.map → chunk-A2I2XO52.cjs.map} +1 -1
  77. package/dist/{chunk-O2GZM7UK.cjs → chunk-A4PBRX4C.cjs} +7 -7
  78. package/dist/{chunk-O2GZM7UK.cjs.map → chunk-A4PBRX4C.cjs.map} +1 -1
  79. package/dist/{chunk-5P6IPIT6.cjs → chunk-ALFUGRYB.cjs} +75 -65
  80. package/dist/chunk-ALFUGRYB.cjs.map +1 -0
  81. package/dist/{chunk-NXIZL7ZZ.js → chunk-ATLN63JA.js} +6 -6
  82. package/dist/chunk-ATLN63JA.js.map +1 -0
  83. package/dist/{chunk-CUPJL6TS.js → chunk-B75XRV3O.js} +3 -3
  84. package/dist/{chunk-CUPJL6TS.js.map → chunk-B75XRV3O.js.map} +1 -1
  85. package/dist/{chunk-DP7KC6CL.js → chunk-BCP7LLOY.js} +754 -476
  86. package/dist/chunk-BCP7LLOY.js.map +1 -0
  87. package/dist/{chunk-RAWG2FEU.js → chunk-BEFM74L2.js} +264 -18
  88. package/dist/chunk-BEFM74L2.js.map +1 -0
  89. package/dist/{chunk-LQLVJWUH.js → chunk-BNUFUFAU.js} +7 -7
  90. package/dist/chunk-BNUFUFAU.js.map +1 -0
  91. package/dist/{chunk-KTBTSHU6.cjs → chunk-C4F7VJ5D.cjs} +13 -3
  92. package/dist/chunk-C4F7VJ5D.cjs.map +1 -0
  93. package/dist/{chunk-CVK4T34X.cjs → chunk-CPEL3YIR.cjs} +22 -22
  94. package/dist/{chunk-CVK4T34X.cjs.map → chunk-CPEL3YIR.cjs.map} +1 -1
  95. package/dist/{chunk-O3USVVWS.js → chunk-DK2S42XB.js} +3 -3
  96. package/dist/{chunk-O3USVVWS.js.map → chunk-DK2S42XB.js.map} +1 -1
  97. package/dist/{chunk-DMZEVJGL.cjs → chunk-EE7N5XXQ.cjs} +13 -13
  98. package/dist/{chunk-DMZEVJGL.cjs.map → chunk-EE7N5XXQ.cjs.map} +1 -1
  99. package/dist/{chunk-ZGOUVMVS.js → chunk-EFELJVLA.js} +5 -5
  100. package/dist/{chunk-ZGOUVMVS.js.map → chunk-EFELJVLA.js.map} +1 -1
  101. package/dist/chunk-EPTSMFH7.cjs +12 -0
  102. package/dist/{chunk-U3YRCZ5L.cjs.map → chunk-EPTSMFH7.cjs.map} +1 -1
  103. package/dist/{chunk-FSCJOTHF.cjs → chunk-EQ7JKLZO.cjs} +10 -10
  104. package/dist/{chunk-FSCJOTHF.cjs.map → chunk-EQ7JKLZO.cjs.map} +1 -1
  105. package/dist/{chunk-5Q3P6OIC.cjs → chunk-FGO5JFVJ.cjs} +12 -12
  106. package/dist/chunk-FGO5JFVJ.cjs.map +1 -0
  107. package/dist/{chunk-VC26BUNP.js → chunk-FMGEZBAQ.js} +5 -5
  108. package/dist/{chunk-VC26BUNP.js.map → chunk-FMGEZBAQ.js.map} +1 -1
  109. package/dist/{chunk-UZLEQFTV.js → chunk-FMMIX6N4.js} +4 -4
  110. package/dist/chunk-FMMIX6N4.js.map +1 -0
  111. package/dist/{chunk-5C75HQYQ.js → chunk-FRHHDHKH.js} +5 -5
  112. package/dist/{chunk-5C75HQYQ.js.map → chunk-FRHHDHKH.js.map} +1 -1
  113. package/dist/{chunk-EVFL2ZY5.js → chunk-FSXTPBRN.js} +63 -12
  114. package/dist/chunk-FSXTPBRN.js.map +1 -0
  115. package/dist/{chunk-TRC646QQ.cjs → chunk-GFRGG2US.cjs} +7 -7
  116. package/dist/{chunk-TRC646QQ.cjs.map → chunk-GFRGG2US.cjs.map} +1 -1
  117. package/dist/{chunk-UJRWOV5B.js → chunk-GWEDD3DH.js} +5 -5
  118. package/dist/{chunk-UJRWOV5B.js.map → chunk-GWEDD3DH.js.map} +1 -1
  119. package/dist/{chunk-AQR6BHB3.cjs → chunk-HJH3RMXG.cjs} +10 -10
  120. package/dist/{chunk-AQR6BHB3.cjs.map → chunk-HJH3RMXG.cjs.map} +1 -1
  121. package/dist/{chunk-F7TDKSVB.cjs → chunk-HOHAJ2NR.cjs} +4 -4
  122. package/dist/{chunk-F7TDKSVB.cjs.map → chunk-HOHAJ2NR.cjs.map} +1 -1
  123. package/dist/{chunk-YPVQYM3L.js → chunk-HOIFFY4M.js} +100 -20
  124. package/dist/chunk-HOIFFY4M.js.map +1 -0
  125. package/dist/{chunk-LDCWO5B6.js → chunk-IIMQJYAM.js} +3 -3
  126. package/dist/{chunk-LDCWO5B6.js.map → chunk-IIMQJYAM.js.map} +1 -1
  127. package/dist/{chunk-OM6RIOA5.cjs → chunk-IIT5K7SK.cjs} +13 -13
  128. package/dist/{chunk-OM6RIOA5.cjs.map → chunk-IIT5K7SK.cjs.map} +1 -1
  129. package/dist/{chunk-EQOQOT55.js → chunk-IJTLXNGJ.js} +5 -5
  130. package/dist/{chunk-EQOQOT55.js.map → chunk-IJTLXNGJ.js.map} +1 -1
  131. package/dist/{chunk-4XRP2N6B.js → chunk-JRP3VGHS.js} +3 -3
  132. package/dist/{chunk-4XRP2N6B.js.map → chunk-JRP3VGHS.js.map} +1 -1
  133. package/dist/{chunk-42XYPKZU.js → chunk-K3BUWSFR.js} +41 -3
  134. package/dist/chunk-K3BUWSFR.js.map +1 -0
  135. package/dist/{chunk-GT7NEXSU.js → chunk-KCO5EFJU.js} +3 -3
  136. package/dist/{chunk-GT7NEXSU.js.map → chunk-KCO5EFJU.js.map} +1 -1
  137. package/dist/{chunk-ARN3ZODS.cjs → chunk-KKYELPZ2.cjs} +6 -6
  138. package/dist/{chunk-ARN3ZODS.cjs.map → chunk-KKYELPZ2.cjs.map} +1 -1
  139. package/dist/{chunk-33PAKPED.cjs → chunk-MCHP7RHZ.cjs} +41 -41
  140. package/dist/{chunk-33PAKPED.cjs.map → chunk-MCHP7RHZ.cjs.map} +1 -1
  141. package/dist/{chunk-CDYRPI5U.js → chunk-MIJKEVV7.js} +4 -4
  142. package/dist/{chunk-CDYRPI5U.js.map → chunk-MIJKEVV7.js.map} +1 -1
  143. package/dist/{chunk-K2HHCWZO.cjs → chunk-NCX65HBY.cjs} +137 -108
  144. package/dist/chunk-NCX65HBY.cjs.map +1 -0
  145. package/dist/{chunk-6TJ6PKPS.cjs → chunk-NN3QSOVS.cjs} +27 -27
  146. package/dist/{chunk-6TJ6PKPS.cjs.map → chunk-NN3QSOVS.cjs.map} +1 -1
  147. package/dist/{chunk-F2KVJ6FF.cjs → chunk-OSZPLZIV.cjs} +179 -117
  148. package/dist/chunk-OSZPLZIV.cjs.map +1 -0
  149. package/dist/{chunk-UTTW2Q3M.cjs → chunk-OVUUTCPJ.cjs} +171 -133
  150. package/dist/chunk-OVUUTCPJ.cjs.map +1 -0
  151. package/dist/{chunk-FMPZPOUD.js → chunk-PAW2XUZN.js} +3 -3
  152. package/dist/{chunk-FMPZPOUD.js.map → chunk-PAW2XUZN.js.map} +1 -1
  153. package/dist/{chunk-5ZPRE4CV.cjs → chunk-PDGEXGS6.cjs} +204 -124
  154. package/dist/chunk-PDGEXGS6.cjs.map +1 -0
  155. package/dist/{chunk-CVNGKTHO.js → chunk-PHXITZE4.js} +4 -4
  156. package/dist/{chunk-CVNGKTHO.js.map → chunk-PHXITZE4.js.map} +1 -1
  157. package/dist/{chunk-ZPCKPLMX.cjs → chunk-QB6VMOJ2.cjs} +8 -8
  158. package/dist/{chunk-ZPCKPLMX.cjs.map → chunk-QB6VMOJ2.cjs.map} +1 -1
  159. package/dist/{chunk-5AERZSHC.cjs → chunk-QGKILWGZ.cjs} +4 -4
  160. package/dist/{chunk-5AERZSHC.cjs.map → chunk-QGKILWGZ.cjs.map} +1 -1
  161. package/dist/{chunk-ZOHCFYXE.js → chunk-QT6V3YRH.js} +3 -3
  162. package/dist/{chunk-ZOHCFYXE.js.map → chunk-QT6V3YRH.js.map} +1 -1
  163. package/dist/{chunk-XDMPDUKL.cjs → chunk-QYWINYEA.cjs} +9 -9
  164. package/dist/{chunk-XDMPDUKL.cjs.map → chunk-QYWINYEA.cjs.map} +1 -1
  165. package/dist/{chunk-3V6D5DEC.js → chunk-S4KQ5LV4.js} +3 -3
  166. package/dist/{chunk-3V6D5DEC.js.map → chunk-S4KQ5LV4.js.map} +1 -1
  167. package/dist/{chunk-6NB73BXV.js → chunk-SBPC5IP3.js} +40 -12
  168. package/dist/chunk-SBPC5IP3.js.map +1 -0
  169. package/dist/{chunk-HHBKGPEI.js → chunk-SQRD2CYF.js} +264 -21
  170. package/dist/chunk-SQRD2CYF.js.map +1 -0
  171. package/dist/{chunk-O7XVCLXW.cjs → chunk-ST3LPB2V.cjs} +324 -77
  172. package/dist/chunk-ST3LPB2V.cjs.map +1 -0
  173. package/dist/{chunk-FFQGI67R.cjs → chunk-STQ3BSED.cjs} +44 -44
  174. package/dist/{chunk-FFQGI67R.cjs.map → chunk-STQ3BSED.cjs.map} +1 -1
  175. package/dist/{chunk-JOYPNY33.js → chunk-TCRIQMBU.js} +9 -9
  176. package/dist/{chunk-JOYPNY33.js.map → chunk-TCRIQMBU.js.map} +1 -1
  177. package/dist/{chunk-ZP2KPDNN.js → chunk-TFMVL4QH.js} +3 -3
  178. package/dist/{chunk-ZP2KPDNN.js.map → chunk-TFMVL4QH.js.map} +1 -1
  179. package/dist/{chunk-4WYFRACU.js → chunk-TVLKA4AY.js} +3 -3
  180. package/dist/{chunk-4WYFRACU.js.map → chunk-TVLKA4AY.js.map} +1 -1
  181. package/dist/{chunk-X2XOQZT3.cjs → chunk-U5W4LKZV.cjs} +13 -9
  182. package/dist/chunk-U5W4LKZV.cjs.map +1 -0
  183. package/dist/{chunk-WYQILW5V.js → chunk-VITTKBWF.js} +43 -33
  184. package/dist/chunk-VITTKBWF.js.map +1 -0
  185. package/dist/{chunk-AO2WPYFZ.cjs → chunk-WBUFJ7BS.cjs} +4 -4
  186. package/dist/{chunk-AO2WPYFZ.cjs.map → chunk-WBUFJ7BS.cjs.map} +1 -1
  187. package/dist/{chunk-CI5NPLXX.js → chunk-XMYJY7NI.js} +3 -3
  188. package/dist/{chunk-CI5NPLXX.js.map → chunk-XMYJY7NI.js.map} +1 -1
  189. package/dist/{chunk-277UZV7X.cjs → chunk-XR4YZFKW.cjs} +1803 -1525
  190. package/dist/chunk-XR4YZFKW.cjs.map +1 -0
  191. package/dist/{chunk-5GV4JQNA.cjs → chunk-YNULOIR5.cjs} +43 -43
  192. package/dist/{chunk-5GV4JQNA.cjs.map → chunk-YNULOIR5.cjs.map} +1 -1
  193. package/dist/{chunk-ZBV4LQD2.cjs → chunk-ZTAJL4DT.cjs} +4 -4
  194. package/dist/{chunk-ZBV4LQD2.cjs.map → chunk-ZTAJL4DT.cjs.map} +1 -1
  195. package/dist/core/index.cjs +28 -28
  196. package/dist/core/index.d.cts +5 -5
  197. package/dist/core/index.d.ts +5 -5
  198. package/dist/core/index.js +8 -8
  199. package/dist/{ddl-Bc4Dl8fu.d.ts → ddl-D5369kOY.d.ts} +3 -3
  200. package/dist/{ddl-3unqC-kg.d.cts → ddl-eWg7hx6R.d.cts} +3 -3
  201. package/dist/{define-graph-Byslw2OO.d.cts → define-graph-DVF-oN1i.d.cts} +1 -1
  202. package/dist/{define-graph-DBFnc7u_.d.ts → define-graph-SvYXOl78.d.ts} +1 -1
  203. package/dist/graph-extension/index.cjs +20 -20
  204. package/dist/graph-extension/index.d.cts +4 -4
  205. package/dist/graph-extension/index.d.ts +4 -4
  206. package/dist/graph-extension/index.js +5 -5
  207. package/dist/graph-merge/index.cjs +104 -104
  208. package/dist/graph-merge/index.d.cts +9 -8
  209. package/dist/graph-merge/index.d.ts +9 -8
  210. package/dist/graph-merge/index.js +24 -24
  211. package/dist/{index-DQzVJBHa.d.ts → index-By89Sezh.d.ts} +37 -7
  212. package/dist/{index-DHXw7QAl.d.cts → index-DcQ3Sxs-.d.cts} +37 -7
  213. package/dist/index.cjs +210 -202
  214. package/dist/index.d.cts +13 -13
  215. package/dist/index.d.ts +13 -13
  216. package/dist/index.js +34 -34
  217. package/dist/indexes/index.cjs +13 -13
  218. package/dist/indexes/index.d.cts +4 -4
  219. package/dist/indexes/index.d.ts +4 -4
  220. package/dist/indexes/index.js +6 -6
  221. package/dist/interchange/index.cjs +49 -41
  222. package/dist/interchange/index.cjs.map +1 -1
  223. package/dist/interchange/index.d.cts +11 -11
  224. package/dist/interchange/index.d.ts +11 -11
  225. package/dist/interchange/index.js +23 -15
  226. package/dist/interchange/index.js.map +1 -1
  227. package/dist/{manager-Dl0-er1G.d.ts → manager-B0KjKE93.d.ts} +44 -6
  228. package/dist/{manager-U9_zopqr.d.cts → manager-Cn0NFIhN.d.cts} +44 -6
  229. package/dist/{materialize-indexes-BM3u0aXE.d.ts → materialize-indexes-BD4V3svD.d.ts} +1 -1
  230. package/dist/{materialize-indexes-DzMCetZe.d.cts → materialize-indexes-DVRhd5h4.d.cts} +1 -1
  231. package/dist/{postgres-C5-WMKFA.d.ts → postgres-DaEWvN4x.d.cts} +1 -1
  232. package/dist/{postgres-DpJqtbSX.d.cts → postgres-u0a0HN2D.d.ts} +1 -1
  233. package/dist/profiler/index.d.cts +10 -9
  234. package/dist/profiler/index.d.ts +10 -9
  235. package/dist/provenance/index.cjs +38 -38
  236. package/dist/provenance/index.cjs.map +1 -1
  237. package/dist/provenance/index.d.cts +7 -7
  238. package/dist/provenance/index.d.ts +7 -7
  239. package/dist/provenance/index.js +8 -8
  240. package/dist/provenance/index.js.map +1 -1
  241. package/dist/schema/index.cjs +41 -41
  242. package/dist/schema/index.d.cts +7 -7
  243. package/dist/schema/index.d.ts +7 -7
  244. package/dist/schema/index.js +14 -14
  245. package/dist/{searchable-B4mUXZT6.d.cts → searchable-BT7j9_IK.d.cts} +2 -2
  246. package/dist/{searchable-C7jmPNLT.d.ts → searchable-CnYEancP.d.ts} +2 -2
  247. package/dist/{sqlite-Da7jiYu9.d.cts → sqlite-BrMoSsI7.d.cts} +1 -1
  248. package/dist/{sqlite-Ch5tSYQY.d.ts → sqlite-CHhZUyO5.d.ts} +1 -1
  249. package/dist/{store-view-CNcOG8bQ.d.cts → store-view-Bvdku0Ht.d.ts} +199 -35
  250. package/dist/{store-view-6C2vTWqf.d.ts → store-view-w-md0nQ4.d.cts} +199 -35
  251. package/dist/{temporal-BtrTYTiB.d.ts → temporal--x9T8K4S.d.ts} +1 -1
  252. package/dist/{temporal-CMpigMCW.d.cts → temporal-BCORwUau.d.cts} +1 -1
  253. package/dist/{types-G4sVM-76.d.cts → types-6-WJmSD4.d.cts} +1 -1
  254. package/dist/{types-D2rU5Taq.d.ts → types-COODtTJU.d.ts} +1 -1
  255. package/dist/{types-Dh-EgT-w.d.ts → types-Cjvkj0jA.d.cts} +351 -12
  256. package/dist/{types-Dh-EgT-w.d.cts → types-Cjvkj0jA.d.ts} +351 -12
  257. package/dist/{where-B8Y21kig.d.ts → where-5xVawAwL.d.ts} +1 -1
  258. package/dist/{where-DbZ9XDOI.d.cts → where-CUQmCR6d.d.cts} +1 -1
  259. package/package.json +1 -1
  260. package/dist/chunk-277UZV7X.cjs.map +0 -1
  261. package/dist/chunk-2SO5I5AI.cjs.map +0 -1
  262. package/dist/chunk-42XYPKZU.js.map +0 -1
  263. package/dist/chunk-5P6IPIT6.cjs.map +0 -1
  264. package/dist/chunk-5Q3P6OIC.cjs.map +0 -1
  265. package/dist/chunk-5ZPRE4CV.cjs.map +0 -1
  266. package/dist/chunk-6NB73BXV.js.map +0 -1
  267. package/dist/chunk-DP7KC6CL.js.map +0 -1
  268. package/dist/chunk-ECU53PMN.cjs.map +0 -1
  269. package/dist/chunk-EVFL2ZY5.js.map +0 -1
  270. package/dist/chunk-F2KVJ6FF.cjs.map +0 -1
  271. package/dist/chunk-FY4VY5EV.cjs.map +0 -1
  272. package/dist/chunk-HHBKGPEI.js.map +0 -1
  273. package/dist/chunk-K2HHCWZO.cjs.map +0 -1
  274. package/dist/chunk-KTBTSHU6.cjs.map +0 -1
  275. package/dist/chunk-LQLVJWUH.js.map +0 -1
  276. package/dist/chunk-M4GYQF2H.js.map +0 -1
  277. package/dist/chunk-NXIZL7ZZ.js.map +0 -1
  278. package/dist/chunk-O7XVCLXW.cjs.map +0 -1
  279. package/dist/chunk-OYJSYDIH.js.map +0 -1
  280. package/dist/chunk-RAWG2FEU.js.map +0 -1
  281. package/dist/chunk-U3YRCZ5L.cjs +0 -12
  282. package/dist/chunk-UTTW2Q3M.cjs.map +0 -1
  283. package/dist/chunk-UZLEQFTV.js.map +0 -1
  284. package/dist/chunk-V2GZBPY2.cjs.map +0 -1
  285. package/dist/chunk-VGMNGWBR.cjs +0 -12
  286. package/dist/chunk-WYQILW5V.js.map +0 -1
  287. package/dist/chunk-X2XOQZT3.cjs.map +0 -1
  288. package/dist/chunk-YPVQYM3L.js.map +0 -1
  289. package/dist/chunk-ZIRC2U6G.js.map +0 -1
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
- var chunkOMQ2NBOR_cjs = require('./chunk-OMQ2NBOR.cjs');
4
- var chunkCVK4T34X_cjs = require('./chunk-CVK4T34X.cjs');
5
- var chunkFSCJOTHF_cjs = require('./chunk-FSCJOTHF.cjs');
6
- var chunkZBV4LQD2_cjs = require('./chunk-ZBV4LQD2.cjs');
7
- var chunkUTTW2Q3M_cjs = require('./chunk-UTTW2Q3M.cjs');
8
- var chunkX2XOQZT3_cjs = require('./chunk-X2XOQZT3.cjs');
9
- var chunkKTBTSHU6_cjs = require('./chunk-KTBTSHU6.cjs');
3
+ var chunk6JZUSDY2_cjs = require('./chunk-6JZUSDY2.cjs');
4
+ var chunkCPEL3YIR_cjs = require('./chunk-CPEL3YIR.cjs');
5
+ var chunkEQ7JKLZO_cjs = require('./chunk-EQ7JKLZO.cjs');
6
+ var chunkZTAJL4DT_cjs = require('./chunk-ZTAJL4DT.cjs');
7
+ var chunkOVUUTCPJ_cjs = require('./chunk-OVUUTCPJ.cjs');
8
+ var chunkU5W4LKZV_cjs = require('./chunk-U5W4LKZV.cjs');
9
+ var chunkC4F7VJ5D_cjs = require('./chunk-C4F7VJ5D.cjs');
10
10
 
11
11
  // src/backend/migrate-recorded-time.ts
12
12
  var LEGACY_RECORDED_MAX = "9999-12-31T23:59:59.999Z";
@@ -53,24 +53,24 @@ var RECORDED_EDGE_COLUMNS = [
53
53
  "meta"
54
54
  ];
55
55
  function resolvedTableNames(backend, override) {
56
- return chunkCVK4T34X_cjs.createSqlSchema(override ?? backend.tableNames ?? {}).tables;
56
+ return chunkCPEL3YIR_cjs.createSqlSchema(override ?? backend.tableNames ?? {}).tables;
57
57
  }
58
58
  function shortenedIdentifier(value) {
59
59
  if (value.length <= 63) return value;
60
- return `${value.slice(0, 50)}_${chunkUTTW2Q3M_cjs.shortHash(value)}`;
60
+ return `${value.slice(0, 50)}_${chunkOVUUTCPJ_cjs.shortHash(value)}`;
61
61
  }
62
62
  function mappingTableName(tables, override) {
63
63
  const candidate = override ?? `${tables.recordedClock}_${MIGRATION_SUFFIX}`;
64
- return chunkCVK4T34X_cjs.createSqlSchema({
64
+ return chunkCPEL3YIR_cjs.createSqlSchema({
65
65
  recordedClock: shortenedIdentifier(candidate)
66
66
  }).tables.recordedClock;
67
67
  }
68
68
  function temporaryTableName(tableName, role) {
69
- return shortenedIdentifier(`__tg_${role}_${chunkUTTW2Q3M_cjs.shortHash(tableName)}`);
69
+ return shortenedIdentifier(`__tg_${role}_${chunkOVUUTCPJ_cjs.shortHash(tableName)}`);
70
70
  }
71
71
  function requireStatements(target) {
72
72
  if (target.executeStatement === void 0) {
73
- throw new chunkKTBTSHU6_cjs.ConfigurationError(
73
+ throw new chunkC4F7VJ5D_cjs.ConfigurationError(
74
74
  "Recorded-time migration requires executeStatement support.",
75
75
  { dialect: target.dialect },
76
76
  { suggestion: "Use a built-in SQLite or PostgreSQL backend." }
@@ -79,15 +79,15 @@ function requireStatements(target) {
79
79
  return target.executeStatement;
80
80
  }
81
81
  async function executeStatement(target, statement) {
82
- await requireStatements(target)(chunkX2XOQZT3_cjs.asCompiledStatementSql(statement));
82
+ await requireStatements(target)(chunkU5W4LKZV_cjs.asCompiledStatementSql(statement));
83
83
  }
84
84
  async function executeDdl(target, ddl) {
85
- await executeStatement(target, chunkX2XOQZT3_cjs.sql.raw(ddl));
85
+ await executeStatement(target, chunkU5W4LKZV_cjs.sql.raw(ddl));
86
86
  }
87
87
  function canonicalLegacyInstant(value) {
88
- const canonical = chunkZBV4LQD2_cjs.canonicalizeDatabaseTimestamp(value);
88
+ const canonical = chunkZTAJL4DT_cjs.canonicalizeDatabaseTimestamp(value);
89
89
  if (canonical === void 0) {
90
- throw new chunkKTBTSHU6_cjs.ConfigurationError(
90
+ throw new chunkC4F7VJ5D_cjs.ConfigurationError(
91
91
  "Legacy recorded-time relation contained an invalid timestamp.",
92
92
  { value }
93
93
  );
@@ -96,8 +96,8 @@ function canonicalLegacyInstant(value) {
96
96
  }
97
97
  function safeRevision(value) {
98
98
  const revision = typeof value === "bigint" ? Number(value) : typeof value === "string" && /^\d+$/.test(value) ? Number(value) : value;
99
- if (typeof revision !== "number" || !Number.isSafeInteger(revision) || revision < 1 || revision >= chunkFSCJOTHF_cjs.RECORDED_MAX_REVISION) {
100
- throw new chunkKTBTSHU6_cjs.ConfigurationError(
99
+ if (typeof revision !== "number" || !Number.isSafeInteger(revision) || revision < 1 || revision >= chunkEQ7JKLZO_cjs.RECORDED_MAX_REVISION) {
100
+ throw new chunkC4F7VJ5D_cjs.ConfigurationError(
101
101
  "Recorded anchor mapping contained an invalid revision.",
102
102
  { value }
103
103
  );
@@ -106,9 +106,9 @@ function safeRevision(value) {
106
106
  }
107
107
  async function columnNames(target, tableName) {
108
108
  const rows = target.dialect === "sqlite" ? await target.execute(
109
- chunkX2XOQZT3_cjs.asCompiledRowsSql(chunkX2XOQZT3_cjs.sql`PRAGMA table_info(${chunkX2XOQZT3_cjs.sql.identifier(tableName)})`)
109
+ chunkU5W4LKZV_cjs.asCompiledRowsSql(chunkU5W4LKZV_cjs.sql`PRAGMA table_info(${chunkU5W4LKZV_cjs.sql.identifier(tableName)})`)
110
110
  ) : await target.execute(
111
- chunkX2XOQZT3_cjs.asCompiledRowsSql(chunkX2XOQZT3_cjs.sql`
111
+ chunkU5W4LKZV_cjs.asCompiledRowsSql(chunkU5W4LKZV_cjs.sql`
112
112
  SELECT column_name AS name
113
113
  FROM information_schema.columns
114
114
  WHERE table_schema = current_schema()
@@ -121,28 +121,28 @@ async function columnNames(target, tableName) {
121
121
  }
122
122
  async function readLegacyInstants(target, tables) {
123
123
  const rows = await target.execute(
124
- chunkX2XOQZT3_cjs.asCompiledRowsSql(chunkX2XOQZT3_cjs.sql`
124
+ chunkU5W4LKZV_cjs.asCompiledRowsSql(chunkU5W4LKZV_cjs.sql`
125
125
  SELECT graph_id, recorded_from AS recorded_at
126
- FROM ${chunkX2XOQZT3_cjs.sql.identifier(tables.recordedNodes)}
126
+ FROM ${chunkU5W4LKZV_cjs.sql.identifier(tables.recordedNodes)}
127
127
  UNION
128
128
  SELECT graph_id, recorded_to AS recorded_at
129
- FROM ${chunkX2XOQZT3_cjs.sql.identifier(tables.recordedNodes)}
129
+ FROM ${chunkU5W4LKZV_cjs.sql.identifier(tables.recordedNodes)}
130
130
  WHERE recorded_to <> ${LEGACY_RECORDED_MAX}
131
131
  UNION
132
132
  SELECT graph_id, recorded_from AS recorded_at
133
- FROM ${chunkX2XOQZT3_cjs.sql.identifier(tables.recordedEdges)}
133
+ FROM ${chunkU5W4LKZV_cjs.sql.identifier(tables.recordedEdges)}
134
134
  UNION
135
135
  SELECT graph_id, recorded_to AS recorded_at
136
- FROM ${chunkX2XOQZT3_cjs.sql.identifier(tables.recordedEdges)}
136
+ FROM ${chunkU5W4LKZV_cjs.sql.identifier(tables.recordedEdges)}
137
137
  WHERE recorded_to <> ${LEGACY_RECORDED_MAX}
138
138
  UNION
139
139
  SELECT graph_id, recorded_at
140
- FROM ${chunkX2XOQZT3_cjs.sql.identifier(tables.recordedClock)}
140
+ FROM ${chunkU5W4LKZV_cjs.sql.identifier(tables.recordedClock)}
141
141
  `)
142
142
  );
143
143
  const instants = rows.map((row) => {
144
144
  if (typeof row.graph_id !== "string") {
145
- throw new chunkKTBTSHU6_cjs.ConfigurationError(
145
+ throw new chunkC4F7VJ5D_cjs.ConfigurationError(
146
146
  "Legacy recorded-time relation contained an invalid graph id.",
147
147
  { graphId: row.graph_id }
148
148
  );
@@ -193,38 +193,38 @@ function migrationMapDdl(dialect, table) {
193
193
  );`;
194
194
  }
195
195
  async function writeMappingRows(target, tableName, rows) {
196
- await executeStatement(target, chunkX2XOQZT3_cjs.sql`DELETE FROM ${chunkX2XOQZT3_cjs.sql.identifier(tableName)}`);
196
+ await executeStatement(target, chunkU5W4LKZV_cjs.sql`DELETE FROM ${chunkU5W4LKZV_cjs.sql.identifier(tableName)}`);
197
197
  const rowsPerStatement = Math.max(
198
198
  1,
199
199
  Math.floor((target.capabilities.maxBindParameters ?? 900) / 4)
200
200
  );
201
201
  for (let start = 0; start < rows.length; start += rowsPerStatement) {
202
202
  const values = rows.slice(start, start + rowsPerStatement).map(
203
- (row) => chunkX2XOQZT3_cjs.sql`(${row.graphId}, ${row.legacyRecordedAt}, ${row.revision}, ${row.recordedAt})`
203
+ (row) => chunkU5W4LKZV_cjs.sql`(${row.graphId}, ${row.legacyRecordedAt}, ${row.revision}, ${row.recordedAt})`
204
204
  );
205
205
  await executeStatement(
206
206
  target,
207
- chunkX2XOQZT3_cjs.sql`
208
- INSERT INTO ${chunkX2XOQZT3_cjs.sql.identifier(tableName)}
207
+ chunkU5W4LKZV_cjs.sql`
208
+ INSERT INTO ${chunkU5W4LKZV_cjs.sql.identifier(tableName)}
209
209
  (graph_id, legacy_recorded_at, revision, recorded_at)
210
- VALUES ${chunkX2XOQZT3_cjs.sql.join(values, chunkX2XOQZT3_cjs.sql`, `)}
210
+ VALUES ${chunkU5W4LKZV_cjs.sql.join(values, chunkU5W4LKZV_cjs.sql`, `)}
211
211
  `
212
212
  );
213
213
  }
214
214
  }
215
215
  function tableDdl(dialect, tables, temporary) {
216
216
  if (dialect === "sqlite") {
217
- const temporaryTables2 = chunkOMQ2NBOR_cjs.createSqliteTables(temporary);
218
- const finalTables2 = chunkOMQ2NBOR_cjs.createSqliteTables(tables);
219
- const temporaryContributions = chunkOMQ2NBOR_cjs.sqliteContributions(temporaryTables2);
220
- const finalContributions = chunkOMQ2NBOR_cjs.sqliteContributions(finalTables2);
217
+ const temporaryTables2 = chunk6JZUSDY2_cjs.createSqliteTables(temporary);
218
+ const finalTables2 = chunk6JZUSDY2_cjs.createSqliteTables(tables);
219
+ const temporaryContributions = chunk6JZUSDY2_cjs.sqliteContributions(temporaryTables2);
220
+ const finalContributions = chunk6JZUSDY2_cjs.sqliteContributions(finalTables2);
221
221
  return ddlForRecordedTables(temporaryContributions, finalContributions);
222
222
  }
223
- const temporaryTables = chunkOMQ2NBOR_cjs.createPostgresTables(temporary);
224
- const finalTables = chunkOMQ2NBOR_cjs.createPostgresTables(tables);
223
+ const temporaryTables = chunk6JZUSDY2_cjs.createPostgresTables(temporary);
224
+ const finalTables = chunk6JZUSDY2_cjs.createPostgresTables(tables);
225
225
  return ddlForRecordedTables(
226
- chunkOMQ2NBOR_cjs.postgresContributions(temporaryTables),
227
- chunkOMQ2NBOR_cjs.postgresContributions(finalTables)
226
+ chunk6JZUSDY2_cjs.postgresContributions(temporaryTables),
227
+ chunk6JZUSDY2_cjs.postgresContributions(finalTables)
228
228
  );
229
229
  }
230
230
  function ddlForRecordedTables(temporary, final) {
@@ -236,13 +236,13 @@ function ddlForRecordedTables(temporary, final) {
236
236
  (entry) => entry.logicalName === logicalName
237
237
  )?.createDdl;
238
238
  if (temporaryDdl === void 0 || finalDdl === void 0) {
239
- throw new chunkKTBTSHU6_cjs.ConfigurationError(
239
+ throw new chunkC4F7VJ5D_cjs.ConfigurationError(
240
240
  `Could not generate migration DDL for ${logicalName}.`
241
241
  );
242
242
  }
243
243
  const createTable = temporaryDdl[0];
244
244
  if (createTable === void 0) {
245
- throw new chunkKTBTSHU6_cjs.ConfigurationError(
245
+ throw new chunkC4F7VJ5D_cjs.ConfigurationError(
246
246
  `Could not generate migration table DDL for ${logicalName}.`
247
247
  );
248
248
  }
@@ -255,27 +255,27 @@ function ddlForRecordedTables(temporary, final) {
255
255
  };
256
256
  }
257
257
  function migratedColumn(column, legacyAlias) {
258
- if (column === "recorded_from") return chunkX2XOQZT3_cjs.sql`from_map.revision`;
258
+ if (column === "recorded_from") return chunkU5W4LKZV_cjs.sql`from_map.revision`;
259
259
  if (column === "recorded_to") {
260
- return chunkX2XOQZT3_cjs.sql`
260
+ return chunkU5W4LKZV_cjs.sql`
261
261
  CASE
262
- WHEN ${chunkX2XOQZT3_cjs.sql.raw(legacyAlias)}.recorded_to = ${LEGACY_RECORDED_MAX}
263
- THEN ${chunkFSCJOTHF_cjs.RECORDED_MAX_REVISION}
262
+ WHEN ${chunkU5W4LKZV_cjs.sql.raw(legacyAlias)}.recorded_to = ${LEGACY_RECORDED_MAX}
263
+ THEN ${chunkEQ7JKLZO_cjs.RECORDED_MAX_REVISION}
264
264
  ELSE to_map.revision
265
265
  END
266
266
  `;
267
267
  }
268
- return chunkX2XOQZT3_cjs.sql`${chunkX2XOQZT3_cjs.sql.raw(legacyAlias)}.${chunkX2XOQZT3_cjs.sql.identifier(column)}`;
268
+ return chunkU5W4LKZV_cjs.sql`${chunkU5W4LKZV_cjs.sql.raw(legacyAlias)}.${chunkU5W4LKZV_cjs.sql.identifier(column)}`;
269
269
  }
270
270
  function mappingMatch(dialect, mappingAlias, legacyColumn) {
271
- const mapping = chunkX2XOQZT3_cjs.sql.raw(mappingAlias);
272
- const legacy = chunkX2XOQZT3_cjs.sql.raw(`legacy.${legacyColumn}`);
273
- return dialect === "postgres" ? chunkX2XOQZT3_cjs.sql`${mapping}.recorded_at = ${legacy}` : chunkX2XOQZT3_cjs.sql`${mapping}.legacy_recorded_at = ${legacy}`;
271
+ const mapping = chunkU5W4LKZV_cjs.sql.raw(mappingAlias);
272
+ const legacy = chunkU5W4LKZV_cjs.sql.raw(`legacy.${legacyColumn}`);
273
+ return dialect === "postgres" ? chunkU5W4LKZV_cjs.sql`${mapping}.recorded_at = ${legacy}` : chunkU5W4LKZV_cjs.sql`${mapping}.legacy_recorded_at = ${legacy}`;
274
274
  }
275
275
  function missingMappingCount(value, legacyTable) {
276
276
  const count = Number(value);
277
277
  if (!Number.isSafeInteger(count) || count < 0) {
278
- throw new chunkKTBTSHU6_cjs.ConfigurationError(
278
+ throw new chunkC4F7VJ5D_cjs.ConfigurationError(
279
279
  "Recorded-time migration returned an invalid integrity-check count.",
280
280
  { legacyTable, value }
281
281
  );
@@ -286,12 +286,12 @@ async function assertRecordedRelationMappings(target, options) {
286
286
  const fromMatch = mappingMatch(target.dialect, "from_map", "recorded_from");
287
287
  const toMatch = mappingMatch(target.dialect, "to_map", "recorded_to");
288
288
  const rows = await target.execute(
289
- chunkX2XOQZT3_cjs.asCompiledRowsSql(chunkX2XOQZT3_cjs.sql`
289
+ chunkU5W4LKZV_cjs.asCompiledRowsSql(chunkU5W4LKZV_cjs.sql`
290
290
  SELECT COUNT(*) AS missing
291
- FROM ${chunkX2XOQZT3_cjs.sql.identifier(options.legacyTable)} AS legacy
292
- LEFT JOIN ${chunkX2XOQZT3_cjs.sql.identifier(options.mappingTable)} AS from_map
291
+ FROM ${chunkU5W4LKZV_cjs.sql.identifier(options.legacyTable)} AS legacy
292
+ LEFT JOIN ${chunkU5W4LKZV_cjs.sql.identifier(options.mappingTable)} AS from_map
293
293
  ON from_map.graph_id = legacy.graph_id AND ${fromMatch}
294
- LEFT JOIN ${chunkX2XOQZT3_cjs.sql.identifier(options.mappingTable)} AS to_map
294
+ LEFT JOIN ${chunkU5W4LKZV_cjs.sql.identifier(options.mappingTable)} AS to_map
295
295
  ON to_map.graph_id = legacy.graph_id AND ${toMatch}
296
296
  WHERE from_map.revision IS NULL
297
297
  OR (
@@ -302,7 +302,7 @@ async function assertRecordedRelationMappings(target, options) {
302
302
  );
303
303
  const missing = missingMappingCount(rows[0]?.missing, options.legacyTable);
304
304
  if (missing === 0) return;
305
- throw new chunkKTBTSHU6_cjs.ConfigurationError(
305
+ throw new chunkC4F7VJ5D_cjs.ConfigurationError(
306
306
  "Legacy recorded-time boundaries could not be mapped exactly.",
307
307
  { legacyTable: options.legacyTable, missingRows: missing },
308
308
  {
@@ -313,17 +313,17 @@ async function assertRecordedRelationMappings(target, options) {
313
313
  async function assertRecordedClockMappings(target, options) {
314
314
  const match = mappingMatch(target.dialect, "anchor_map", "recorded_at");
315
315
  const rows = await target.execute(
316
- chunkX2XOQZT3_cjs.asCompiledRowsSql(chunkX2XOQZT3_cjs.sql`
316
+ chunkU5W4LKZV_cjs.asCompiledRowsSql(chunkU5W4LKZV_cjs.sql`
317
317
  SELECT COUNT(*) AS missing
318
- FROM ${chunkX2XOQZT3_cjs.sql.identifier(options.legacyTable)} AS legacy
319
- LEFT JOIN ${chunkX2XOQZT3_cjs.sql.identifier(options.mappingTable)} AS anchor_map
318
+ FROM ${chunkU5W4LKZV_cjs.sql.identifier(options.legacyTable)} AS legacy
319
+ LEFT JOIN ${chunkU5W4LKZV_cjs.sql.identifier(options.mappingTable)} AS anchor_map
320
320
  ON anchor_map.graph_id = legacy.graph_id AND ${match}
321
321
  WHERE anchor_map.revision IS NULL
322
322
  `)
323
323
  );
324
324
  const missing = missingMappingCount(rows[0]?.missing, options.legacyTable);
325
325
  if (missing === 0) return;
326
- throw new chunkKTBTSHU6_cjs.ConfigurationError(
326
+ throw new chunkC4F7VJ5D_cjs.ConfigurationError(
327
327
  "Legacy recorded clock values could not be mapped exactly.",
328
328
  { legacyTable: options.legacyTable, missingRows: missing },
329
329
  {
@@ -332,7 +332,7 @@ async function assertRecordedClockMappings(target, options) {
332
332
  );
333
333
  }
334
334
  async function copyRecordedRelation(target, options) {
335
- const columnList = options.columns.map((column) => chunkX2XOQZT3_cjs.sql.identifier(column));
335
+ const columnList = options.columns.map((column) => chunkU5W4LKZV_cjs.sql.identifier(column));
336
336
  const values = options.columns.map(
337
337
  (column) => migratedColumn(column, "legacy")
338
338
  );
@@ -341,16 +341,16 @@ async function copyRecordedRelation(target, options) {
341
341
  const toMatch = mappingMatch(target.dialect, "to_map", "recorded_to");
342
342
  await executeStatement(
343
343
  target,
344
- chunkX2XOQZT3_cjs.sql`
345
- INSERT INTO ${chunkX2XOQZT3_cjs.sql.identifier(options.temporaryTable)}
346
- (${chunkX2XOQZT3_cjs.sql.join(columnList, chunkX2XOQZT3_cjs.sql`, `)})
347
- SELECT ${chunkX2XOQZT3_cjs.sql.join(values, chunkX2XOQZT3_cjs.sql`, `)}
348
- FROM ${chunkX2XOQZT3_cjs.sql.identifier(options.legacyTable)} AS legacy
344
+ chunkU5W4LKZV_cjs.sql`
345
+ INSERT INTO ${chunkU5W4LKZV_cjs.sql.identifier(options.temporaryTable)}
346
+ (${chunkU5W4LKZV_cjs.sql.join(columnList, chunkU5W4LKZV_cjs.sql`, `)})
347
+ SELECT ${chunkU5W4LKZV_cjs.sql.join(values, chunkU5W4LKZV_cjs.sql`, `)}
348
+ FROM ${chunkU5W4LKZV_cjs.sql.identifier(options.legacyTable)} AS legacy
349
349
  -- LEFT JOIN is deliberate: a missing mapping reaches the NOT NULL
350
350
  -- revision columns and fails loud instead of silently dropping history.
351
- LEFT JOIN ${chunkX2XOQZT3_cjs.sql.identifier(options.mappingTable)} AS from_map
351
+ LEFT JOIN ${chunkU5W4LKZV_cjs.sql.identifier(options.mappingTable)} AS from_map
352
352
  ON from_map.graph_id = legacy.graph_id AND ${fromMatch}
353
- LEFT JOIN ${chunkX2XOQZT3_cjs.sql.identifier(options.mappingTable)} AS to_map
353
+ LEFT JOIN ${chunkU5W4LKZV_cjs.sql.identifier(options.mappingTable)} AS to_map
354
354
  ON to_map.graph_id = legacy.graph_id AND ${toMatch}
355
355
  `
356
356
  );
@@ -360,13 +360,13 @@ async function copyRecordedClock(target, options) {
360
360
  const match = mappingMatch(target.dialect, "anchor_map", "recorded_at");
361
361
  await executeStatement(
362
362
  target,
363
- chunkX2XOQZT3_cjs.sql`
364
- INSERT INTO ${chunkX2XOQZT3_cjs.sql.identifier(options.temporaryTable)}
363
+ chunkU5W4LKZV_cjs.sql`
364
+ INSERT INTO ${chunkU5W4LKZV_cjs.sql.identifier(options.temporaryTable)}
365
365
  (graph_id, revision, recorded_at)
366
366
  SELECT legacy.graph_id, anchor_map.revision, legacy.recorded_at
367
- FROM ${chunkX2XOQZT3_cjs.sql.identifier(options.legacyTable)} AS legacy
367
+ FROM ${chunkU5W4LKZV_cjs.sql.identifier(options.legacyTable)} AS legacy
368
368
  -- Preserve fail-loud behavior if the preflight invariant changes later.
369
- LEFT JOIN ${chunkX2XOQZT3_cjs.sql.identifier(options.mappingTable)} AS anchor_map
369
+ LEFT JOIN ${chunkU5W4LKZV_cjs.sql.identifier(options.mappingTable)} AS anchor_map
370
370
  ON anchor_map.graph_id = legacy.graph_id AND ${match}
371
371
  `
372
372
  );
@@ -381,7 +381,7 @@ async function replaceLegacyTables(target, tables, mappingTable) {
381
381
  for (const table of Object.values(temporary)) {
382
382
  await executeStatement(
383
383
  target,
384
- chunkX2XOQZT3_cjs.sql`DROP TABLE IF EXISTS ${chunkX2XOQZT3_cjs.sql.identifier(table)}`
384
+ chunkU5W4LKZV_cjs.sql`DROP TABLE IF EXISTS ${chunkU5W4LKZV_cjs.sql.identifier(table)}`
385
385
  );
386
386
  }
387
387
  await executeDdl(target, requireCreateTable(ddl.nodes));
@@ -406,15 +406,15 @@ async function replaceLegacyTables(target, tables, mappingTable) {
406
406
  });
407
407
  await executeStatement(
408
408
  target,
409
- chunkX2XOQZT3_cjs.sql`DROP TABLE ${chunkX2XOQZT3_cjs.sql.identifier(tables.recordedNodes)}`
409
+ chunkU5W4LKZV_cjs.sql`DROP TABLE ${chunkU5W4LKZV_cjs.sql.identifier(tables.recordedNodes)}`
410
410
  );
411
411
  await executeStatement(
412
412
  target,
413
- chunkX2XOQZT3_cjs.sql`DROP TABLE ${chunkX2XOQZT3_cjs.sql.identifier(tables.recordedEdges)}`
413
+ chunkU5W4LKZV_cjs.sql`DROP TABLE ${chunkU5W4LKZV_cjs.sql.identifier(tables.recordedEdges)}`
414
414
  );
415
415
  await executeStatement(
416
416
  target,
417
- chunkX2XOQZT3_cjs.sql`DROP TABLE ${chunkX2XOQZT3_cjs.sql.identifier(tables.recordedClock)}`
417
+ chunkU5W4LKZV_cjs.sql`DROP TABLE ${chunkU5W4LKZV_cjs.sql.identifier(tables.recordedClock)}`
418
418
  );
419
419
  await renameTable(target, temporary.recordedNodes, tables.recordedNodes);
420
420
  await renameTable(target, temporary.recordedEdges, tables.recordedEdges);
@@ -446,17 +446,17 @@ async function renamePrimaryKeyConstraint(target, temporaryTable, finalTable) {
446
446
  if (target.dialect !== "postgres") return;
447
447
  await executeStatement(
448
448
  target,
449
- chunkX2XOQZT3_cjs.sql`
450
- ALTER TABLE ${chunkX2XOQZT3_cjs.sql.identifier(finalTable)}
451
- RENAME CONSTRAINT ${chunkX2XOQZT3_cjs.sql.identifier(`${temporaryTable}_pkey`)}
452
- TO ${chunkX2XOQZT3_cjs.sql.identifier(shortenedIdentifier(`${finalTable}_pkey`))}
449
+ chunkU5W4LKZV_cjs.sql`
450
+ ALTER TABLE ${chunkU5W4LKZV_cjs.sql.identifier(finalTable)}
451
+ RENAME CONSTRAINT ${chunkU5W4LKZV_cjs.sql.identifier(`${temporaryTable}_pkey`)}
452
+ TO ${chunkU5W4LKZV_cjs.sql.identifier(shortenedIdentifier(`${finalTable}_pkey`))}
453
453
  `
454
454
  );
455
455
  }
456
456
  function requireCreateTable(statements) {
457
457
  const statement = statements[0];
458
458
  if (statement === void 0) {
459
- throw new chunkKTBTSHU6_cjs.ConfigurationError("Recorded migration table DDL was empty.");
459
+ throw new chunkC4F7VJ5D_cjs.ConfigurationError("Recorded migration table DDL was empty.");
460
460
  }
461
461
  return statement;
462
462
  }
@@ -464,10 +464,10 @@ async function renameTable(target, from, to) {
464
464
  try {
465
465
  await executeStatement(
466
466
  target,
467
- chunkX2XOQZT3_cjs.sql`ALTER TABLE ${chunkX2XOQZT3_cjs.sql.identifier(from)} RENAME TO ${chunkX2XOQZT3_cjs.sql.identifier(to)}`
467
+ chunkU5W4LKZV_cjs.sql`ALTER TABLE ${chunkU5W4LKZV_cjs.sql.identifier(from)} RENAME TO ${chunkU5W4LKZV_cjs.sql.identifier(to)}`
468
468
  );
469
469
  } catch (error) {
470
- throw new chunkKTBTSHU6_cjs.ConfigurationError(
470
+ throw new chunkC4F7VJ5D_cjs.ConfigurationError(
471
471
  "Could not rename a migrated recorded-time table.",
472
472
  { from, to },
473
473
  { cause: error }
@@ -498,9 +498,9 @@ async function migrateLegacyRecordedTime(options) {
498
498
  };
499
499
  }
500
500
  const rows = await target.execute(
501
- chunkX2XOQZT3_cjs.asCompiledRowsSql(chunkX2XOQZT3_cjs.sql`
501
+ chunkU5W4LKZV_cjs.asCompiledRowsSql(chunkU5W4LKZV_cjs.sql`
502
502
  SELECT COUNT(*) AS anchors, COUNT(DISTINCT graph_id) AS graphs
503
- FROM ${chunkX2XOQZT3_cjs.sql.identifier(mapTable)}
503
+ FROM ${chunkU5W4LKZV_cjs.sql.identifier(mapTable)}
504
504
  `)
505
505
  );
506
506
  const anchors = Number(rows[0]?.anchors ?? 0);
@@ -515,7 +515,7 @@ async function migrateLegacyRecordedTime(options) {
515
515
  const nodeColumns = await columnNames(target, tables.recordedNodes);
516
516
  const edgeColumns = await columnNames(target, tables.recordedEdges);
517
517
  if (!nodeColumns.has("recorded_from") || !edgeColumns.has("recorded_from")) {
518
- throw new chunkKTBTSHU6_cjs.ConfigurationError(
518
+ throw new chunkC4F7VJ5D_cjs.ConfigurationError(
519
519
  "Legacy recorded-time schema is incomplete.",
520
520
  { tables }
521
521
  );
@@ -534,24 +534,24 @@ async function migrateLegacyRecordedTime(options) {
534
534
  }
535
535
  async function migrateRecordedAnchor(options) {
536
536
  try {
537
- return chunkFSCJOTHF_cjs.asRecordedInstant(options.anchor);
537
+ return chunkEQ7JKLZO_cjs.asRecordedInstant(options.anchor);
538
538
  } catch (error) {
539
- if (!(error instanceof chunkKTBTSHU6_cjs.ValidationError)) throw error;
539
+ if (!(error instanceof chunkC4F7VJ5D_cjs.ValidationError)) throw error;
540
540
  }
541
541
  const legacyRecordedAt = canonicalLegacyInstant(options.anchor);
542
542
  const tables = resolvedTableNames(options.backend, options.tableNames);
543
543
  const mapTable = mappingTableName(tables, options.mappingTableName);
544
544
  const rows = await options.backend.execute(
545
- chunkX2XOQZT3_cjs.asCompiledRowsSql(chunkX2XOQZT3_cjs.sql`
545
+ chunkU5W4LKZV_cjs.asCompiledRowsSql(chunkU5W4LKZV_cjs.sql`
546
546
  SELECT revision, recorded_at
547
- FROM ${chunkX2XOQZT3_cjs.sql.identifier(mapTable)}
547
+ FROM ${chunkU5W4LKZV_cjs.sql.identifier(mapTable)}
548
548
  WHERE graph_id = ${options.graphId}
549
549
  AND legacy_recorded_at = ${legacyRecordedAt}
550
550
  `)
551
551
  );
552
552
  const row = rows[0];
553
553
  if (row === void 0) {
554
- throw new chunkKTBTSHU6_cjs.ConfigurationError(
554
+ throw new chunkC4F7VJ5D_cjs.ConfigurationError(
555
555
  "No migrated recorded anchor matches this graph and legacy timestamp.",
556
556
  { anchor: options.anchor, graphId: options.graphId },
557
557
  {
@@ -559,14 +559,14 @@ async function migrateRecordedAnchor(options) {
559
559
  }
560
560
  );
561
561
  }
562
- return chunkFSCJOTHF_cjs.createRecordedInstant(
562
+ return chunkEQ7JKLZO_cjs.createRecordedInstant(
563
563
  safeRevision(row.revision),
564
564
  canonicalLegacyInstant(row.recorded_at)
565
565
  );
566
566
  }
567
567
  async function deleteLegacyRecordedAnchorMap(options) {
568
568
  if (options.backend.executeStatement === void 0) {
569
- throw new chunkKTBTSHU6_cjs.ConfigurationError(
569
+ throw new chunkC4F7VJ5D_cjs.ConfigurationError(
570
570
  "Deleting a recorded anchor migration map requires executeStatement support.",
571
571
  { dialect: options.backend.dialect }
572
572
  );
@@ -576,23 +576,23 @@ async function deleteLegacyRecordedAnchorMap(options) {
576
576
  await options.backend.transaction(async (target) => {
577
577
  await executeStatement(
578
578
  target,
579
- chunkX2XOQZT3_cjs.sql`
580
- DELETE FROM ${chunkX2XOQZT3_cjs.sql.identifier(mapTable)}
579
+ chunkU5W4LKZV_cjs.sql`
580
+ DELETE FROM ${chunkU5W4LKZV_cjs.sql.identifier(mapTable)}
581
581
  WHERE graph_id = ${options.graphId}
582
582
  `
583
583
  );
584
584
  if (options.dropWhenEmpty !== true) return;
585
585
  const rows = await target.execute(
586
- chunkX2XOQZT3_cjs.asCompiledRowsSql(chunkX2XOQZT3_cjs.sql`
586
+ chunkU5W4LKZV_cjs.asCompiledRowsSql(chunkU5W4LKZV_cjs.sql`
587
587
  SELECT COUNT(*) AS anchors, COUNT(DISTINCT graph_id) AS graphs
588
- FROM ${chunkX2XOQZT3_cjs.sql.identifier(mapTable)}
588
+ FROM ${chunkU5W4LKZV_cjs.sql.identifier(mapTable)}
589
589
  `)
590
590
  );
591
591
  const remaining = missingMappingCount(rows[0]?.anchors, mapTable);
592
592
  if (remaining === 0) {
593
593
  await executeStatement(
594
594
  target,
595
- chunkX2XOQZT3_cjs.sql`DROP TABLE ${chunkX2XOQZT3_cjs.sql.identifier(mapTable)}`
595
+ chunkU5W4LKZV_cjs.sql`DROP TABLE ${chunkU5W4LKZV_cjs.sql.identifier(mapTable)}`
596
596
  );
597
597
  }
598
598
  });
@@ -601,5 +601,5 @@ async function deleteLegacyRecordedAnchorMap(options) {
601
601
  exports.deleteLegacyRecordedAnchorMap = deleteLegacyRecordedAnchorMap;
602
602
  exports.migrateLegacyRecordedTime = migrateLegacyRecordedTime;
603
603
  exports.migrateRecordedAnchor = migrateRecordedAnchor;
604
- //# sourceMappingURL=chunk-7Y6BV3TK.cjs.map
605
- //# sourceMappingURL=chunk-7Y6BV3TK.cjs.map
604
+ //# sourceMappingURL=chunk-66UVLHQA.cjs.map
605
+ //# sourceMappingURL=chunk-66UVLHQA.cjs.map