@nicia-ai/typegraph 0.44.0 → 0.45.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 (265) hide show
  1. package/dist/backend/drizzle/indexes.cjs +7 -7
  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 +3 -3
  5. package/dist/backend/index.cjs +37 -37
  6. package/dist/backend/index.d.cts +3 -3
  7. package/dist/backend/index.d.ts +3 -3
  8. package/dist/backend/index.js +6 -6
  9. package/dist/backend/postgres/index.cjs +23 -23
  10. package/dist/backend/postgres/index.d.cts +6 -6
  11. package/dist/backend/postgres/index.d.ts +6 -6
  12. package/dist/backend/postgres/index.js +10 -10
  13. package/dist/backend/postgres/pglite-store.cjs +24 -25
  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 +20 -21
  18. package/dist/backend/postgres/pglite-store.js.map +1 -1
  19. package/dist/backend/postgres/pglite.cjs +12 -12
  20. package/dist/backend/postgres/pglite.d.cts +3 -3
  21. package/dist/backend/postgres/pglite.d.ts +3 -3
  22. package/dist/backend/postgres/pglite.js +11 -11
  23. package/dist/backend/sqlite/index.cjs +21 -21
  24. package/dist/backend/sqlite/index.d.cts +6 -6
  25. package/dist/backend/sqlite/index.d.ts +6 -6
  26. package/dist/backend/sqlite/index.js +9 -9
  27. package/dist/backend/sqlite/libsql.cjs +14 -14
  28. package/dist/backend/sqlite/libsql.cjs.map +1 -1
  29. package/dist/backend/sqlite/libsql.d.cts +3 -3
  30. package/dist/backend/sqlite/libsql.d.ts +3 -3
  31. package/dist/backend/sqlite/libsql.js +10 -10
  32. package/dist/backend/sqlite/libsql.js.map +1 -1
  33. package/dist/backend/sqlite/local-store.cjs +25 -26
  34. package/dist/backend/sqlite/local-store.cjs.map +1 -1
  35. package/dist/backend/sqlite/local-store.d.cts +8 -8
  36. package/dist/backend/sqlite/local-store.d.ts +8 -8
  37. package/dist/backend/sqlite/local-store.js +21 -22
  38. package/dist/backend/sqlite/local-store.js.map +1 -1
  39. package/dist/backend/sqlite/local.cjs +13 -13
  40. package/dist/backend/sqlite/local.d.cts +3 -3
  41. package/dist/backend/sqlite/local.d.ts +3 -3
  42. package/dist/backend/sqlite/local.js +11 -11
  43. package/dist/{chunk-TVLKA4AY.js → chunk-42PYUGLS.js} +57 -3
  44. package/dist/chunk-42PYUGLS.js.map +1 -0
  45. package/dist/{chunk-IJTLXNGJ.js → chunk-4GUBTVPV.js} +3 -4
  46. package/dist/chunk-4GUBTVPV.js.map +1 -0
  47. package/dist/{chunk-63KCKSSH.js → chunk-4GUTQPVO.js} +33 -9
  48. package/dist/chunk-4GUTQPVO.js.map +1 -0
  49. package/dist/{chunk-FGO5JFVJ.cjs → chunk-4MEWSUVM.cjs} +10 -10
  50. package/dist/chunk-4MEWSUVM.cjs.map +1 -0
  51. package/dist/{chunk-FMGEZBAQ.js → chunk-4QIKLIGG.js} +15 -3
  52. package/dist/chunk-4QIKLIGG.js.map +1 -0
  53. package/dist/{chunk-FMMIX6N4.js → chunk-55ITBQJI.js} +2 -2
  54. package/dist/chunk-55ITBQJI.js.map +1 -0
  55. package/dist/{chunk-TCRIQMBU.js → chunk-5EKPX6QU.js} +4 -4
  56. package/dist/{chunk-TCRIQMBU.js.map → chunk-5EKPX6QU.js.map} +1 -1
  57. package/dist/{chunk-GFRGG2US.cjs → chunk-5GAONX5G.cjs} +7 -7
  58. package/dist/{chunk-GFRGG2US.cjs.map → chunk-5GAONX5G.cjs.map} +1 -1
  59. package/dist/{chunk-ALFUGRYB.cjs → chunk-6RYPD3NJ.cjs} +29 -29
  60. package/dist/{chunk-ALFUGRYB.cjs.map → chunk-6RYPD3NJ.cjs.map} +1 -1
  61. package/dist/{chunk-QGKILWGZ.cjs → chunk-7PF2L3H6.cjs} +4 -4
  62. package/dist/{chunk-QGKILWGZ.cjs.map → chunk-7PF2L3H6.cjs.map} +1 -1
  63. package/dist/chunk-B3F2D3SP.cjs +12 -0
  64. package/dist/{chunk-EPTSMFH7.cjs.map → chunk-B3F2D3SP.cjs.map} +1 -1
  65. package/dist/{chunk-7G32LIQM.js → chunk-BGYJW37L.js} +5 -5
  66. package/dist/{chunk-7G32LIQM.js.map → chunk-BGYJW37L.js.map} +1 -1
  67. package/dist/{chunk-EE7N5XXQ.cjs → chunk-BNS75YNF.cjs} +9 -10
  68. package/dist/chunk-BNS75YNF.cjs.map +1 -0
  69. package/dist/{chunk-VITTKBWF.js → chunk-CBKG6HEP.js} +5 -5
  70. package/dist/{chunk-VITTKBWF.js.map → chunk-CBKG6HEP.js.map} +1 -1
  71. package/dist/{chunk-A4PBRX4C.cjs → chunk-D54WH24V.cjs} +57 -2
  72. package/dist/chunk-D54WH24V.cjs.map +1 -0
  73. package/dist/{chunk-MCHP7RHZ.cjs → chunk-D56XG4EI.cjs} +26 -14
  74. package/dist/chunk-D56XG4EI.cjs.map +1 -0
  75. package/dist/{chunk-SQRD2CYF.js → chunk-DXEEHSGN.js} +293 -45
  76. package/dist/chunk-DXEEHSGN.js.map +1 -0
  77. package/dist/{chunk-GWEDD3DH.js → chunk-EFEOOCJ3.js} +4 -4
  78. package/dist/{chunk-GWEDD3DH.js.map → chunk-EFEOOCJ3.js.map} +1 -1
  79. package/dist/{chunk-3PRKZW6D.cjs → chunk-EKFUG4G7.cjs} +2 -2
  80. package/dist/chunk-EKFUG4G7.cjs.map +1 -0
  81. package/dist/{chunk-HJH3RMXG.cjs → chunk-F4NHQHEZ.cjs} +4 -4
  82. package/dist/{chunk-HJH3RMXG.cjs.map → chunk-F4NHQHEZ.cjs.map} +1 -1
  83. package/dist/{chunk-46GDII45.js → chunk-FL5UQRES.js} +3 -3
  84. package/dist/{chunk-46GDII45.js.map → chunk-FL5UQRES.js.map} +1 -1
  85. package/dist/{chunk-TFMVL4QH.js → chunk-FLEQ2HBK.js} +3 -3
  86. package/dist/{chunk-TFMVL4QH.js.map → chunk-FLEQ2HBK.js.map} +1 -1
  87. package/dist/{chunk-BEFM74L2.js → chunk-FQ7ZPOTZ.js} +6 -6
  88. package/dist/{chunk-BEFM74L2.js.map → chunk-FQ7ZPOTZ.js.map} +1 -1
  89. package/dist/{chunk-ST3LPB2V.cjs → chunk-H7VE3FL4.cjs} +318 -70
  90. package/dist/chunk-H7VE3FL4.cjs.map +1 -0
  91. package/dist/{chunk-BCP7LLOY.js → chunk-ID4WXTKL.js} +367 -41
  92. package/dist/{chunk-BCP7LLOY.js.map → chunk-ID4WXTKL.js.map} +1 -1
  93. package/dist/{chunk-EFELJVLA.js → chunk-ISLPNELU.js} +15 -3
  94. package/dist/chunk-ISLPNELU.js.map +1 -0
  95. package/dist/{chunk-A2I2XO52.cjs → chunk-IX64T5OL.cjs} +4 -4
  96. package/dist/{chunk-A2I2XO52.cjs.map → chunk-IX64T5OL.cjs.map} +1 -1
  97. package/dist/{chunk-QYWINYEA.cjs → chunk-J2ICGNHO.cjs} +5 -6
  98. package/dist/chunk-J2ICGNHO.cjs.map +1 -0
  99. package/dist/{chunk-7V2FGGI2.cjs → chunk-J7LXTUTP.cjs} +54 -12
  100. package/dist/chunk-J7LXTUTP.cjs.map +1 -0
  101. package/dist/{chunk-WBUFJ7BS.cjs → chunk-JQXSZHF2.cjs} +12 -2
  102. package/dist/chunk-JQXSZHF2.cjs.map +1 -0
  103. package/dist/{chunk-OVUUTCPJ.cjs → chunk-JXUTCSXX.cjs} +28 -2
  104. package/dist/chunk-JXUTCSXX.cjs.map +1 -0
  105. package/dist/{chunk-66UVLHQA.cjs → chunk-KMXWZLQX.cjs} +14 -14
  106. package/dist/{chunk-66UVLHQA.cjs.map → chunk-KMXWZLQX.cjs.map} +1 -1
  107. package/dist/{chunk-STQ3BSED.cjs → chunk-NAAMUYMS.cjs} +23 -11
  108. package/dist/chunk-NAAMUYMS.cjs.map +1 -0
  109. package/dist/{chunk-NN3QSOVS.cjs → chunk-OOA273IJ.cjs} +14 -14
  110. package/dist/{chunk-NN3QSOVS.cjs.map → chunk-OOA273IJ.cjs.map} +1 -1
  111. package/dist/{chunk-OSZPLZIV.cjs → chunk-P7GTYOLB.cjs} +130 -106
  112. package/dist/chunk-P7GTYOLB.cjs.map +1 -0
  113. package/dist/{chunk-K3BUWSFR.js → chunk-PVUI6KGR.js} +28 -2
  114. package/dist/chunk-PVUI6KGR.js.map +1 -0
  115. package/dist/{chunk-SBPC5IP3.js → chunk-Q6EDCUXV.js} +242 -10
  116. package/dist/chunk-Q6EDCUXV.js.map +1 -0
  117. package/dist/{chunk-2BIG7U6E.cjs → chunk-QC4MCOFV.cjs} +5 -5
  118. package/dist/{chunk-2BIG7U6E.cjs.map → chunk-QC4MCOFV.cjs.map} +1 -1
  119. package/dist/{chunk-JRP3VGHS.js → chunk-QLUXRWKL.js} +3 -3
  120. package/dist/{chunk-JRP3VGHS.js.map → chunk-QLUXRWKL.js.map} +1 -1
  121. package/dist/{chunk-IIT5K7SK.cjs → chunk-QR24DJDF.cjs} +6 -6
  122. package/dist/{chunk-IIT5K7SK.cjs.map → chunk-QR24DJDF.cjs.map} +1 -1
  123. package/dist/{chunk-HOIFFY4M.js → chunk-QRNYDV5Z.js} +48 -21
  124. package/dist/chunk-QRNYDV5Z.js.map +1 -0
  125. package/dist/{chunk-FRHHDHKH.js → chunk-RFRM3Q5K.js} +15 -3
  126. package/dist/chunk-RFRM3Q5K.js.map +1 -0
  127. package/dist/{chunk-ATLN63JA.js → chunk-RUQS6M7G.js} +5 -5
  128. package/dist/chunk-RUQS6M7G.js.map +1 -0
  129. package/dist/{chunk-XMYJY7NI.js → chunk-S3ZRKJHY.js} +3 -3
  130. package/dist/{chunk-XMYJY7NI.js.map → chunk-S3ZRKJHY.js.map} +1 -1
  131. package/dist/{chunk-FSXTPBRN.js → chunk-TKORQCG4.js} +49 -7
  132. package/dist/chunk-TKORQCG4.js.map +1 -0
  133. package/dist/{chunk-2Y4IFKW7.js → chunk-TKP5T34P.js} +3 -4
  134. package/dist/chunk-TKP5T34P.js.map +1 -0
  135. package/dist/{chunk-NCX65HBY.cjs → chunk-UCQ3BFSY.cjs} +301 -68
  136. package/dist/chunk-UCQ3BFSY.cjs.map +1 -0
  137. package/dist/{chunk-B75XRV3O.js → chunk-V34A6R5V.js} +12 -3
  138. package/dist/chunk-V34A6R5V.js.map +1 -0
  139. package/dist/{chunk-BNUFUFAU.js → chunk-VTN3C3CH.js} +6 -6
  140. package/dist/chunk-VTN3C3CH.js.map +1 -0
  141. package/dist/{chunk-5MUSU4ZP.cjs → chunk-VVQM4CZD.cjs} +12 -12
  142. package/dist/chunk-VVQM4CZD.cjs.map +1 -0
  143. package/dist/{chunk-IIMQJYAM.js → chunk-WDAVPX46.js} +3 -3
  144. package/dist/{chunk-IIMQJYAM.js.map → chunk-WDAVPX46.js.map} +1 -1
  145. package/dist/{chunk-YNULOIR5.cjs → chunk-WDBXJOU5.cjs} +28 -16
  146. package/dist/chunk-WDBXJOU5.cjs.map +1 -0
  147. package/dist/{chunk-PAW2XUZN.js → chunk-WUFASQUO.js} +3 -3
  148. package/dist/{chunk-PAW2XUZN.js.map → chunk-WUFASQUO.js.map} +1 -1
  149. package/dist/{chunk-PDGEXGS6.cjs → chunk-YDWLUT5V.cjs} +136 -109
  150. package/dist/chunk-YDWLUT5V.cjs.map +1 -0
  151. package/dist/{chunk-PHXITZE4.js → chunk-YMTXMPV6.js} +3 -3
  152. package/dist/{chunk-PHXITZE4.js.map → chunk-YMTXMPV6.js.map} +1 -1
  153. package/dist/{chunk-XR4YZFKW.cjs → chunk-YOALGKRE.cjs} +690 -364
  154. package/dist/chunk-YOALGKRE.cjs.map +1 -0
  155. package/dist/{chunk-6JZUSDY2.cjs → chunk-Z3WO6MND.cjs} +27 -27
  156. package/dist/{chunk-6JZUSDY2.cjs.map → chunk-Z3WO6MND.cjs.map} +1 -1
  157. package/dist/{chunk-2VLBGQBY.cjs → chunk-ZI6VQSZA.cjs} +37 -37
  158. package/dist/{chunk-2VLBGQBY.cjs.map → chunk-ZI6VQSZA.cjs.map} +1 -1
  159. package/dist/core/index.cjs +10 -11
  160. package/dist/core/index.d.cts +5 -5
  161. package/dist/core/index.d.ts +5 -5
  162. package/dist/core/index.js +3 -4
  163. package/dist/{ddl-eWg7hx6R.d.cts → ddl-BG4J805L.d.cts} +3 -3
  164. package/dist/{ddl-D5369kOY.d.ts → ddl-CgiS9QLj.d.ts} +3 -3
  165. package/dist/{define-graph-SvYXOl78.d.ts → define-graph-BGrJahvp.d.ts} +1 -1
  166. package/dist/{define-graph-DVF-oN1i.d.cts → define-graph-alREY2wj.d.cts} +1 -1
  167. package/dist/graph-extension/index.cjs +18 -19
  168. package/dist/graph-extension/index.d.cts +4 -4
  169. package/dist/graph-extension/index.d.ts +4 -4
  170. package/dist/graph-extension/index.js +3 -4
  171. package/dist/graph-merge/index.cjs +89 -90
  172. package/dist/graph-merge/index.cjs.map +1 -1
  173. package/dist/graph-merge/index.d.cts +9 -9
  174. package/dist/graph-merge/index.d.ts +9 -9
  175. package/dist/graph-merge/index.js +16 -17
  176. package/dist/graph-merge/index.js.map +1 -1
  177. package/dist/{index-By89Sezh.d.ts → index-BBxZCUdu.d.ts} +2 -2
  178. package/dist/{index-DcQ3Sxs-.d.cts → index-C3y_98iN.d.cts} +2 -2
  179. package/dist/index.cjs +124 -125
  180. package/dist/index.cjs.map +1 -1
  181. package/dist/index.d.cts +13 -13
  182. package/dist/index.d.ts +13 -13
  183. package/dist/index.js +23 -24
  184. package/dist/index.js.map +1 -1
  185. package/dist/indexes/index.cjs +11 -11
  186. package/dist/indexes/index.d.cts +4 -4
  187. package/dist/indexes/index.d.ts +4 -4
  188. package/dist/indexes/index.js +4 -4
  189. package/dist/interchange/index.cjs +27 -26
  190. package/dist/interchange/index.cjs.map +1 -1
  191. package/dist/interchange/index.d.cts +7 -7
  192. package/dist/interchange/index.d.ts +7 -7
  193. package/dist/interchange/index.js +8 -7
  194. package/dist/interchange/index.js.map +1 -1
  195. package/dist/{manager-Cn0NFIhN.d.cts → manager-KS7CGQQT.d.cts} +3 -3
  196. package/dist/{manager-B0KjKE93.d.ts → manager-YoLEfcc1.d.ts} +3 -3
  197. package/dist/{materialize-indexes-BD4V3svD.d.ts → materialize-indexes-Bhhyb1B3.d.ts} +1 -1
  198. package/dist/{materialize-indexes-DVRhd5h4.d.cts → materialize-indexes-OHRWypW6.d.cts} +1 -1
  199. package/dist/{postgres-DaEWvN4x.d.cts → postgres-DpkW3R5Y.d.cts} +1 -1
  200. package/dist/{postgres-u0a0HN2D.d.ts → postgres-DwqyIniy.d.ts} +1 -1
  201. package/dist/profiler/index.d.cts +10 -10
  202. package/dist/profiler/index.d.ts +10 -10
  203. package/dist/provenance/index.cjs +15 -15
  204. package/dist/provenance/index.cjs.map +1 -1
  205. package/dist/provenance/index.d.cts +7 -7
  206. package/dist/provenance/index.d.ts +7 -7
  207. package/dist/provenance/index.js +3 -3
  208. package/dist/provenance/index.js.map +1 -1
  209. package/dist/schema/index.cjs +30 -31
  210. package/dist/schema/index.d.cts +7 -7
  211. package/dist/schema/index.d.ts +7 -7
  212. package/dist/schema/index.js +8 -9
  213. package/dist/{searchable-BT7j9_IK.d.cts → searchable-CIZL8Hyw.d.cts} +2 -2
  214. package/dist/{searchable-CnYEancP.d.ts → searchable-DLWEfC4a.d.ts} +2 -2
  215. package/dist/{sqlite-BrMoSsI7.d.cts → sqlite-DY0WODUK.d.cts} +1 -1
  216. package/dist/{sqlite-CHhZUyO5.d.ts → sqlite-L-VIRzqA.d.ts} +1 -1
  217. package/dist/{store-view-Bvdku0Ht.d.ts → store-view-66p92IPi.d.ts} +1887 -1811
  218. package/dist/{store-view-w-md0nQ4.d.cts → store-view-A85FFRnk.d.cts} +1887 -1811
  219. package/dist/{temporal-BCORwUau.d.cts → temporal-BNbjXqer.d.cts} +1 -1
  220. package/dist/{temporal--x9T8K4S.d.ts → temporal-Bob6Nfbp.d.ts} +1 -1
  221. package/dist/{types-Cjvkj0jA.d.ts → types-Ch9a0Dx6.d.cts} +141 -17
  222. package/dist/{types-Cjvkj0jA.d.cts → types-Ch9a0Dx6.d.ts} +141 -17
  223. package/dist/{types-COODtTJU.d.ts → types-ClCzT-dT.d.ts} +1 -1
  224. package/dist/{types-6-WJmSD4.d.cts → types-DeORZhxn.d.cts} +1 -1
  225. package/dist/{where-CUQmCR6d.d.cts → where-DPw52ksb.d.cts} +1 -1
  226. package/dist/{where-5xVawAwL.d.ts → where-kWUZPvEA.d.ts} +1 -1
  227. package/package.json +1 -1
  228. package/dist/chunk-2WDD2NO3.js +0 -59
  229. package/dist/chunk-2WDD2NO3.js.map +0 -1
  230. package/dist/chunk-2Y4IFKW7.js.map +0 -1
  231. package/dist/chunk-3PRKZW6D.cjs.map +0 -1
  232. package/dist/chunk-5MUSU4ZP.cjs.map +0 -1
  233. package/dist/chunk-63KCKSSH.js.map +0 -1
  234. package/dist/chunk-7V2FGGI2.cjs.map +0 -1
  235. package/dist/chunk-A4PBRX4C.cjs.map +0 -1
  236. package/dist/chunk-ATLN63JA.js.map +0 -1
  237. package/dist/chunk-B75XRV3O.js.map +0 -1
  238. package/dist/chunk-BNUFUFAU.js.map +0 -1
  239. package/dist/chunk-EE7N5XXQ.cjs.map +0 -1
  240. package/dist/chunk-EFELJVLA.js.map +0 -1
  241. package/dist/chunk-EPTSMFH7.cjs +0 -12
  242. package/dist/chunk-FGO5JFVJ.cjs.map +0 -1
  243. package/dist/chunk-FMGEZBAQ.js.map +0 -1
  244. package/dist/chunk-FMMIX6N4.js.map +0 -1
  245. package/dist/chunk-FRHHDHKH.js.map +0 -1
  246. package/dist/chunk-FSXTPBRN.js.map +0 -1
  247. package/dist/chunk-HOHAJ2NR.cjs +0 -61
  248. package/dist/chunk-HOHAJ2NR.cjs.map +0 -1
  249. package/dist/chunk-HOIFFY4M.js.map +0 -1
  250. package/dist/chunk-IJTLXNGJ.js.map +0 -1
  251. package/dist/chunk-K3BUWSFR.js.map +0 -1
  252. package/dist/chunk-MCHP7RHZ.cjs.map +0 -1
  253. package/dist/chunk-NCX65HBY.cjs.map +0 -1
  254. package/dist/chunk-OSZPLZIV.cjs.map +0 -1
  255. package/dist/chunk-OVUUTCPJ.cjs.map +0 -1
  256. package/dist/chunk-PDGEXGS6.cjs.map +0 -1
  257. package/dist/chunk-QYWINYEA.cjs.map +0 -1
  258. package/dist/chunk-SBPC5IP3.js.map +0 -1
  259. package/dist/chunk-SQRD2CYF.js.map +0 -1
  260. package/dist/chunk-ST3LPB2V.cjs.map +0 -1
  261. package/dist/chunk-STQ3BSED.cjs.map +0 -1
  262. package/dist/chunk-TVLKA4AY.js.map +0 -1
  263. package/dist/chunk-WBUFJ7BS.cjs.map +0 -1
  264. package/dist/chunk-XR4YZFKW.cjs.map +0 -1
  265. package/dist/chunk-YNULOIR5.cjs.map +0 -1
@@ -1,32 +1,32 @@
1
1
  'use strict';
2
2
 
3
- var chunkHJH3RMXG_cjs = require('./chunk-HJH3RMXG.cjs');
4
- var chunkNCX65HBY_cjs = require('./chunk-NCX65HBY.cjs');
5
- var chunk7V2FGGI2_cjs = require('./chunk-7V2FGGI2.cjs');
3
+ var chunkF4NHQHEZ_cjs = require('./chunk-F4NHQHEZ.cjs');
4
+ var chunkUCQ3BFSY_cjs = require('./chunk-UCQ3BFSY.cjs');
5
+ var chunkJ7LXTUTP_cjs = require('./chunk-J7LXTUTP.cjs');
6
6
  var chunkZDH3DX3C_cjs = require('./chunk-ZDH3DX3C.cjs');
7
7
  var chunkCPEL3YIR_cjs = require('./chunk-CPEL3YIR.cjs');
8
- var chunk3PRKZW6D_cjs = require('./chunk-3PRKZW6D.cjs');
8
+ var chunkEKFUG4G7_cjs = require('./chunk-EKFUG4G7.cjs');
9
9
  var chunkEQ7JKLZO_cjs = require('./chunk-EQ7JKLZO.cjs');
10
- var chunk2VLBGQBY_cjs = require('./chunk-2VLBGQBY.cjs');
10
+ var chunkZI6VQSZA_cjs = require('./chunk-ZI6VQSZA.cjs');
11
11
  var chunkTRF4EBJT_cjs = require('./chunk-TRF4EBJT.cjs');
12
- var chunkEE7N5XXQ_cjs = require('./chunk-EE7N5XXQ.cjs');
12
+ var chunkBNS75YNF_cjs = require('./chunk-BNS75YNF.cjs');
13
13
  var chunkKKYELPZ2_cjs = require('./chunk-KKYELPZ2.cjs');
14
14
  var chunkACSVZPK7_cjs = require('./chunk-ACSVZPK7.cjs');
15
- var chunkWBUFJ7BS_cjs = require('./chunk-WBUFJ7BS.cjs');
15
+ var chunkJQXSZHF2_cjs = require('./chunk-JQXSZHF2.cjs');
16
16
  var chunkQB6VMOJ2_cjs = require('./chunk-QB6VMOJ2.cjs');
17
17
  var chunkZTAJL4DT_cjs = require('./chunk-ZTAJL4DT.cjs');
18
- var chunkIIT5K7SK_cjs = require('./chunk-IIT5K7SK.cjs');
19
- var chunkGFRGG2US_cjs = require('./chunk-GFRGG2US.cjs');
20
- var chunkA2I2XO52_cjs = require('./chunk-A2I2XO52.cjs');
18
+ var chunkQR24DJDF_cjs = require('./chunk-QR24DJDF.cjs');
19
+ var chunk5GAONX5G_cjs = require('./chunk-5GAONX5G.cjs');
20
+ var chunkIX64T5OL_cjs = require('./chunk-IX64T5OL.cjs');
21
21
  var chunkZY4GXIVN_cjs = require('./chunk-ZY4GXIVN.cjs');
22
22
  var chunkNAUA4PW5_cjs = require('./chunk-NAUA4PW5.cjs');
23
- var chunkOVUUTCPJ_cjs = require('./chunk-OVUUTCPJ.cjs');
23
+ var chunkJXUTCSXX_cjs = require('./chunk-JXUTCSXX.cjs');
24
24
  var chunkU5W4LKZV_cjs = require('./chunk-U5W4LKZV.cjs');
25
25
  var chunkFJMPR3OH_cjs = require('./chunk-FJMPR3OH.cjs');
26
26
  var chunk764JHTLT_cjs = require('./chunk-764JHTLT.cjs');
27
27
  var chunkHAHNRASW_cjs = require('./chunk-HAHNRASW.cjs');
28
- var chunkQYWINYEA_cjs = require('./chunk-QYWINYEA.cjs');
29
- var chunkA4PBRX4C_cjs = require('./chunk-A4PBRX4C.cjs');
28
+ var chunkJ2ICGNHO_cjs = require('./chunk-J2ICGNHO.cjs');
29
+ var chunkD54WH24V_cjs = require('./chunk-D54WH24V.cjs');
30
30
  var chunkC4F7VJ5D_cjs = require('./chunk-C4F7VJ5D.cjs');
31
31
  var chunkTDXIBCGY_cjs = require('./chunk-TDXIBCGY.cjs');
32
32
 
@@ -40,6 +40,7 @@ var NODE_WRITE_NAMES = [
40
40
  "create",
41
41
  "createFromRecord",
42
42
  "update",
43
+ "updateWhere",
43
44
  "delete",
44
45
  "hardDelete",
45
46
  "upsertById",
@@ -317,17 +318,17 @@ function pinnedEdgeCollectionsFor(store, coordinate, wrap) {
317
318
  }
318
319
  function recordedNodeCollection(store, kind, live, coordinate) {
319
320
  const reads = {
320
- getById: (id) => chunk7V2FGGI2_cjs.storeRuntime(store).recordedNodeGetById(kind, id, coordinate),
321
- getByIds: (ids) => chunk7V2FGGI2_cjs.storeRuntime(store).recordedNodeGetByIds(kind, ids, coordinate),
322
- scan: (options) => chunk7V2FGGI2_cjs.storeRuntime(store).recordedNodeScan(kind, coordinate, options)
321
+ getById: (id) => chunkJ7LXTUTP_cjs.storeRuntime(store).recordedNodeGetById(kind, id, coordinate),
322
+ getByIds: (ids) => chunkJ7LXTUTP_cjs.storeRuntime(store).recordedNodeGetByIds(kind, ids, coordinate),
323
+ scan: (options) => chunkJ7LXTUTP_cjs.storeRuntime(store).recordedNodeScan(kind, coordinate, options)
323
324
  };
324
325
  return recordedCollectionProxy(reads, live, coordinate, "node");
325
326
  }
326
327
  function recordedEdgeCollection(store, kind, live, coordinate) {
327
328
  const reads = {
328
- getById: (id) => chunk7V2FGGI2_cjs.storeRuntime(store).recordedEdgeGetById(kind, id, coordinate),
329
- getByIds: (ids) => chunk7V2FGGI2_cjs.storeRuntime(store).recordedEdgeGetByIds(kind, ids, coordinate),
330
- scan: (options) => chunk7V2FGGI2_cjs.storeRuntime(store).recordedEdgeScan(kind, coordinate, options)
329
+ getById: (id) => chunkJ7LXTUTP_cjs.storeRuntime(store).recordedEdgeGetById(kind, id, coordinate),
330
+ getByIds: (ids) => chunkJ7LXTUTP_cjs.storeRuntime(store).recordedEdgeGetByIds(kind, ids, coordinate),
331
+ scan: (options) => chunkJ7LXTUTP_cjs.storeRuntime(store).recordedEdgeScan(kind, coordinate, options)
331
332
  };
332
333
  return recordedCollectionProxy(reads, live, coordinate, "edge");
333
334
  }
@@ -427,10 +428,10 @@ var CoordinatePinnedView = class {
427
428
  * view's coordinate cannot be overridden on a per-query basis.
428
429
  */
429
430
  query() {
430
- return chunk7V2FGGI2_cjs.storeRuntime(this.store).sealedQuery(this.coordinate);
431
+ return chunkJ7LXTUTP_cjs.storeRuntime(this.store).sealedQuery(this.coordinate);
431
432
  }
432
433
  internalAlgorithms() {
433
- this.#internalAlgorithms ??= chunk7V2FGGI2_cjs.storeRuntime(
434
+ this.#internalAlgorithms ??= chunkJ7LXTUTP_cjs.storeRuntime(
434
435
  this.store
435
436
  ).algorithmsAtCoordinate(this.coordinate);
436
437
  return this.#internalAlgorithms;
@@ -457,7 +458,7 @@ var CoordinatePinnedView = class {
457
458
  ...options,
458
459
  ...withCoordinate(this.coordinate)
459
460
  };
460
- return chunk7V2FGGI2_cjs.storeRuntime(this.store).subgraphAtCoordinate(
461
+ return chunkJ7LXTUTP_cjs.storeRuntime(this.store).subgraphAtCoordinate(
461
462
  rootId,
462
463
  internalOptions
463
464
  );
@@ -572,6 +573,13 @@ var StoreView = class extends CoordinatePinnedView {
572
573
  );
573
574
  return this.#edges;
574
575
  }
576
+ /** Heterogeneous multi-kind edge read pinned to this view's coordinate. */
577
+ bulkFindEdgesFrom(params, options) {
578
+ return this.store.bulkFindEdgesFrom(params, {
579
+ ...options,
580
+ ...withValidCoordinate(this.coordinate)
581
+ });
582
+ }
575
583
  /**
576
584
  * Read-only search facade. On a `current` view the read methods
577
585
  * (`fulltext` / `vector` / `hybrid`) delegate to the live `store.search`,
@@ -1121,7 +1129,7 @@ function markSelectiveFieldAsRequired(requiredColumnsByAlias, field2) {
1121
1129
  addRequiredColumn(requiredColumnsByAlias, field2.alias, "props");
1122
1130
  }
1123
1131
  function getTopLevelPropsFieldName(field2) {
1124
- const pointer = chunk7V2FGGI2_cjs.getFieldPointer(field2);
1132
+ const pointer = chunkJ7LXTUTP_cjs.getFieldPointer(field2);
1125
1133
  if (pointer === void 0) return void 0;
1126
1134
  const segments = chunkTDXIBCGY_cjs.parseJsonPointer(pointer);
1127
1135
  return segments.length === 1 ? segments[0] : void 0;
@@ -1222,11 +1230,11 @@ function buildStandardStartCte(input) {
1222
1230
  const alias = ast.start.alias;
1223
1231
  const kinds = ast.start.kinds;
1224
1232
  const cteMaterialization = ctx.dialect.capabilities.emitNotMaterializedHint ? chunkU5W4LKZV_cjs.sql`NOT MATERIALIZED ` : chunkU5W4LKZV_cjs.sql``;
1225
- const kindFilter = chunk7V2FGGI2_cjs.compileKindFilter(chunkU5W4LKZV_cjs.sql.raw("kind"), kinds);
1233
+ const kindFilter = chunkJ7LXTUTP_cjs.compileKindFilter(chunkU5W4LKZV_cjs.sql.raw("kind"), kinds);
1226
1234
  const temporalFilter = input.temporalFilterPass.forAlias();
1227
1235
  const cteContext = { ...ctx, cteColumnPrefix: "" };
1228
- const predicateClauses = chunk7V2FGGI2_cjs.compilePredicateClauses(
1229
- chunk7V2FGGI2_cjs.getPredicatesForAlias(predicateIndex, alias, "node"),
1236
+ const predicateClauses = chunkJ7LXTUTP_cjs.compilePredicateClauses(
1237
+ chunkJ7LXTUTP_cjs.getPredicatesForAlias(predicateIndex, alias, "node"),
1230
1238
  cteContext
1231
1239
  );
1232
1240
  const whereClauses = [
@@ -1273,27 +1281,27 @@ function buildStandardTraversalCte(input) {
1273
1281
  } = input;
1274
1282
  const traversal = chunk764JHTLT_cjs.requireDefined(ast.traversals[traversalIndex]);
1275
1283
  const traversalLimitValue = traversalIndex === ast.traversals.length - 1 ? traversalLimit : void 0;
1276
- const previousNodeKinds = chunk7V2FGGI2_cjs.getNodeKindsForAlias(ast, traversal.joinFromAlias);
1284
+ const previousNodeKinds = chunkJ7LXTUTP_cjs.getNodeKindsForAlias(ast, traversal.joinFromAlias);
1277
1285
  const directEdgeKinds = [...new Set(traversal.edgeKinds)];
1278
1286
  const inverseEdgeKinds = traversal.inverseEdgeKinds === void 0 ? [] : [...new Set(traversal.inverseEdgeKinds)];
1279
1287
  const nodeKinds = traversal.nodeKinds;
1280
- const nodeKindFilter = chunk7V2FGGI2_cjs.compileKindFilter(chunkU5W4LKZV_cjs.sql.raw("n.kind"), nodeKinds);
1288
+ const nodeKindFilter = chunkJ7LXTUTP_cjs.compileKindFilter(chunkU5W4LKZV_cjs.sql.raw("n.kind"), nodeKinds);
1281
1289
  const edgeTemporalFilter = temporalFilterPass.forAlias("e");
1282
1290
  const nodeTemporalFilter = temporalFilterPass.forAlias("n");
1283
1291
  const nodeCteContext = {
1284
1292
  ...ctx,
1285
1293
  cteColumnPrefix: "n"
1286
1294
  };
1287
- const nodePredicateClauses = chunk7V2FGGI2_cjs.compilePredicateClauses(
1288
- chunk7V2FGGI2_cjs.getPredicatesForAlias(predicateIndex, traversal.nodeAlias, "node"),
1295
+ const nodePredicateClauses = chunkJ7LXTUTP_cjs.compilePredicateClauses(
1296
+ chunkJ7LXTUTP_cjs.getPredicatesForAlias(predicateIndex, traversal.nodeAlias, "node"),
1289
1297
  nodeCteContext
1290
1298
  );
1291
1299
  const edgeCteContext = {
1292
1300
  ...ctx,
1293
1301
  cteColumnPrefix: "e"
1294
1302
  };
1295
- const edgePredicateClauses = chunk7V2FGGI2_cjs.compilePredicateClauses(
1296
- chunk7V2FGGI2_cjs.getPredicatesForAlias(predicateIndex, traversal.edgeAlias, "edge"),
1303
+ const edgePredicateClauses = chunkJ7LXTUTP_cjs.compilePredicateClauses(
1304
+ chunkJ7LXTUTP_cjs.getPredicatesForAlias(predicateIndex, traversal.edgeAlias, "edge"),
1297
1305
  edgeCteContext
1298
1306
  );
1299
1307
  const baseWhereClauses = [
@@ -1334,12 +1342,12 @@ function buildStandardTraversalCte(input) {
1334
1342
  function compileTraversalBranch(branch) {
1335
1343
  const whereClauses = [
1336
1344
  ...baseWhereClauses,
1337
- chunk7V2FGGI2_cjs.compileKindFilter(chunkU5W4LKZV_cjs.sql.raw("e.kind"), branch.edgeKinds),
1338
- chunk7V2FGGI2_cjs.compileKindFilter(
1345
+ chunkJ7LXTUTP_cjs.compileKindFilter(chunkU5W4LKZV_cjs.sql.raw("e.kind"), branch.edgeKinds),
1346
+ chunkJ7LXTUTP_cjs.compileKindFilter(
1339
1347
  chunkU5W4LKZV_cjs.sql.raw(`e.${branch.joinKindField}`),
1340
1348
  previousNodeKinds
1341
1349
  ),
1342
- chunk7V2FGGI2_cjs.compileKindFilter(chunkU5W4LKZV_cjs.sql.raw(`e.${branch.targetKindField}`), nodeKinds)
1350
+ chunkJ7LXTUTP_cjs.compileKindFilter(chunkU5W4LKZV_cjs.sql.raw(`e.${branch.targetKindField}`), nodeKinds)
1343
1351
  ];
1344
1352
  if (branch.duplicateGuard !== void 0) {
1345
1353
  whereClauses.push(branch.duplicateGuard);
@@ -1390,7 +1398,7 @@ function buildStandardTraversalCte(input) {
1390
1398
  const overlappingKinds = inverseEdgeKinds.filter(
1391
1399
  (kind) => directEdgeKinds.includes(kind)
1392
1400
  );
1393
- const duplicateGuard = overlappingKinds.length > 0 ? chunkU5W4LKZV_cjs.sql`NOT (e.from_id = e.to_id AND ${chunk7V2FGGI2_cjs.compileKindFilter(
1401
+ const duplicateGuard = overlappingKinds.length > 0 ? chunkU5W4LKZV_cjs.sql`NOT (e.from_id = e.to_id AND ${chunkJ7LXTUTP_cjs.compileKindFilter(
1394
1402
  chunkU5W4LKZV_cjs.sql.raw("e.kind"),
1395
1403
  overlappingKinds
1396
1404
  )})` : void 0;
@@ -1433,7 +1441,7 @@ function compileAggregateExprFromSource(expr, dialect) {
1433
1441
  case "min":
1434
1442
  case "max": {
1435
1443
  const cteAlias = `cte_${field2.alias}`;
1436
- const column = chunk7V2FGGI2_cjs.compileFieldValue(
1444
+ const column = chunkJ7LXTUTP_cjs.compileFieldValue(
1437
1445
  field2,
1438
1446
  dialect,
1439
1447
  field2.valueType,
@@ -1456,7 +1464,7 @@ function compileProjectedSource(field2, dialect) {
1456
1464
  return compileAggregateExprFromSource(field2.source, dialect);
1457
1465
  }
1458
1466
  const cteAlias = field2.cteAlias ?? `cte_${field2.source.alias}`;
1459
- return chunk7V2FGGI2_cjs.compileFieldValue(
1467
+ return chunkJ7LXTUTP_cjs.compileFieldValue(
1460
1468
  field2.source,
1461
1469
  dialect,
1462
1470
  field2.source.valueType,
@@ -1512,10 +1520,10 @@ function compileOrderFieldValue(ast, field2, dialect, cteAlias) {
1512
1520
  if (selectiveField !== void 0) {
1513
1521
  return chunkU5W4LKZV_cjs.sql`${chunkU5W4LKZV_cjs.sql.raw(cteAlias)}.${quoteIdentifier(selectivePropsCteColumnName(selectiveField))}`;
1514
1522
  }
1515
- return chunk7V2FGGI2_cjs.compileFieldValue(field2, dialect, field2.valueType, cteAlias);
1523
+ return chunkJ7LXTUTP_cjs.compileFieldValue(field2, dialect, field2.valueType, cteAlias);
1516
1524
  }
1517
1525
  function buildRelevanceJoins(vectorPredicate, fulltextPredicate) {
1518
- const hybridTargetAlias = chunk7V2FGGI2_cjs.getHybridTargetAlias(
1526
+ const hybridTargetAlias = chunkJ7LXTUTP_cjs.getHybridTargetAlias(
1519
1527
  vectorPredicate,
1520
1528
  fulltextPredicate
1521
1529
  );
@@ -1756,7 +1764,7 @@ function buildStandardGroupBy(input) {
1756
1764
  }
1757
1765
  const aliasToCte = buildAliasToCteMap(ast);
1758
1766
  const parts = allFields.map(
1759
- (field2) => chunk7V2FGGI2_cjs.compileFieldValue(
1767
+ (field2) => chunkJ7LXTUTP_cjs.compileFieldValue(
1760
1768
  field2,
1761
1769
  dialect,
1762
1770
  field2.valueType,
@@ -1770,7 +1778,7 @@ function buildStandardHaving(input) {
1770
1778
  if (!ast.having) {
1771
1779
  return void 0;
1772
1780
  }
1773
- const condition = chunk7V2FGGI2_cjs.compilePredicateExpression(ast.having, ctx);
1781
+ const condition = chunkJ7LXTUTP_cjs.compilePredicateExpression(ast.having, ctx);
1774
1782
  return chunkU5W4LKZV_cjs.sql`HAVING ${condition}`;
1775
1783
  }
1776
1784
  function buildStandardEmbeddingsCte(input) {
@@ -1837,13 +1845,13 @@ function buildStandardEmbeddingsCte(input) {
1837
1845
  branchMetric
1838
1846
  );
1839
1847
  const exactDistanceExpr = chunkU5W4LKZV_cjs.sql`(${distanceExpr} + 0.0)`;
1840
- const scoreExpr = chunkOVUUTCPJ_cjs.vectorScoreExpression(distanceExpr, branchMetric);
1848
+ const scoreExpr = chunkJXUTCSXX_cjs.vectorScoreExpression(distanceExpr, branchMetric);
1841
1849
  const conditions = [
1842
1850
  chunkU5W4LKZV_cjs.sql`${qualifyColumn(tableName, "graph_id")} = ${graphId}`
1843
1851
  ];
1844
1852
  if (minScore !== void 0) {
1845
1853
  conditions.push(
1846
- chunkOVUUTCPJ_cjs.vectorMinScoreCondition(distanceExpr, branchMetric, minScore)
1854
+ chunkJXUTCSXX_cjs.vectorMinScoreCondition(distanceExpr, branchMetric, minScore)
1847
1855
  );
1848
1856
  }
1849
1857
  return chunkU5W4LKZV_cjs.sql`
@@ -1924,7 +1932,7 @@ function buildStandardFulltextCte(input) {
1924
1932
  );
1925
1933
  const conditions = [
1926
1934
  chunkU5W4LKZV_cjs.sql`${qualifyColumn(tableName, "graph_id")} = ${graphId}`,
1927
- chunk7V2FGGI2_cjs.compileKindFilter(qualifyColumn(tableName, "node_kind"), nodeKinds),
1935
+ chunkJ7LXTUTP_cjs.compileKindFilter(qualifyColumn(tableName, "node_kind"), nodeKinds),
1928
1936
  matchCondition
1929
1937
  ];
1930
1938
  if (minScore !== void 0) {
@@ -2042,7 +2050,7 @@ function buildLimitOffsetClause(input) {
2042
2050
 
2043
2051
  // src/query/compiler/passes/fulltext.ts
2044
2052
  function runFulltextPredicatePass(ast, dialect) {
2045
- const fulltextPredicates = chunk7V2FGGI2_cjs.extractFulltextMatchPredicates(ast.predicates);
2053
+ const fulltextPredicates = chunkJ7LXTUTP_cjs.extractFulltextMatchPredicates(ast.predicates);
2046
2054
  if (fulltextPredicates.length > 1) {
2047
2055
  throw new chunkC4F7VJ5D_cjs.UnsupportedPredicateError(
2048
2056
  "Multiple fulltext match predicates in a single query are not supported"
@@ -2139,11 +2147,11 @@ function runCompilerPass(state, pass) {
2139
2147
 
2140
2148
  // src/query/compiler/passes/temporal.ts
2141
2149
  function createTemporalFilterPass(ast, readInstant = "literal") {
2142
- const currentTimestamp = chunk7V2FGGI2_cjs.currentReadInstantFor(readInstant);
2150
+ const currentTimestamp = chunkJ7LXTUTP_cjs.currentReadInstantFor(readInstant);
2143
2151
  return {
2144
2152
  forAlias(tableAlias) {
2145
- return chunk7V2FGGI2_cjs.compileTemporalFilter({
2146
- ...chunk7V2FGGI2_cjs.extractTemporalOptions(ast, tableAlias),
2153
+ return chunkJ7LXTUTP_cjs.compileTemporalFilter({
2154
+ ...chunkJ7LXTUTP_cjs.extractTemporalOptions(ast, tableAlias),
2147
2155
  currentTimestamp
2148
2156
  });
2149
2157
  }
@@ -2152,7 +2160,7 @@ function createTemporalFilterPass(ast, readInstant = "literal") {
2152
2160
 
2153
2161
  // src/query/compiler/passes/vector.ts
2154
2162
  function runVectorPredicatePass(ast, dialect, vectorStrategy) {
2155
- const vectorPredicates = chunk7V2FGGI2_cjs.extractVectorSimilarityPredicates(ast.predicates);
2163
+ const vectorPredicates = chunkJ7LXTUTP_cjs.extractVectorSimilarityPredicates(ast.predicates);
2156
2164
  if (vectorPredicates.length > 1) {
2157
2165
  throw new chunkC4F7VJ5D_cjs.UnsupportedPredicateError(
2158
2166
  "Multiple vector similarity predicates in a single query are not supported"
@@ -2441,7 +2449,7 @@ function lowerComposableQueryToLogicalPlanNode(query, dialect, graphId, nextPlan
2441
2449
  nextPlanNodeId
2442
2450
  });
2443
2451
  }
2444
- const dialectAdapter = chunkOVUUTCPJ_cjs.getDialect(dialect);
2452
+ const dialectAdapter = chunkJXUTCSXX_cjs.getDialect(dialect);
2445
2453
  const vectorPredicate = runVectorPredicatePass(
2446
2454
  query,
2447
2455
  dialectAdapter,
@@ -2565,8 +2573,8 @@ function assertRecordedQueryDoesNotUseCurrentIndexes(ast, vectorPredicate, fullt
2565
2573
  }
2566
2574
  function assertRecordedQueryAstDoesNotUseCurrentIndexes(ast) {
2567
2575
  if (ast.recordedAsOf === void 0) return;
2568
- const vectorPredicates = chunk7V2FGGI2_cjs.extractVectorSimilarityPredicates(ast.predicates);
2569
- const fulltextPredicates = chunk7V2FGGI2_cjs.extractFulltextMatchPredicates(ast.predicates);
2576
+ const vectorPredicates = chunkJ7LXTUTP_cjs.extractVectorSimilarityPredicates(ast.predicates);
2577
+ const fulltextPredicates = chunkJ7LXTUTP_cjs.extractFulltextMatchPredicates(ast.predicates);
2570
2578
  assertRecordedQueryHasNoCurrentIndexUsage(ast, {
2571
2579
  usesVectorPredicate: vectorPredicates.length > 0,
2572
2580
  usesFulltextPredicate: fulltextPredicates.length > 0
@@ -2929,13 +2937,13 @@ function compileRecursiveCte(ast, traversal, graphId, ctx, requiredColumnsByAlia
2929
2937
  `;
2930
2938
  }
2931
2939
  function compileKindFilter2(kinds, columnExpr) {
2932
- return chunk7V2FGGI2_cjs.compileKindFilter(chunkU5W4LKZV_cjs.sql.raw(columnExpr), kinds);
2940
+ return chunkJ7LXTUTP_cjs.compileKindFilter(chunkU5W4LKZV_cjs.sql.raw(columnExpr), kinds);
2933
2941
  }
2934
2942
  function compileNodePredicates(ast, alias, ctx) {
2935
- return ast.predicates.filter((p) => p.targetAlias === alias && p.targetType !== "edge").map((p) => chunk7V2FGGI2_cjs.compilePredicateExpression(p.expression, ctx));
2943
+ return ast.predicates.filter((p) => p.targetAlias === alias && p.targetType !== "edge").map((p) => chunkJ7LXTUTP_cjs.compilePredicateExpression(p.expression, ctx));
2936
2944
  }
2937
2945
  function compileEdgePredicates(ast, edgeAlias, ctx) {
2938
- return ast.predicates.filter((p) => p.targetAlias === edgeAlias && p.targetType === "edge").map((p) => chunk7V2FGGI2_cjs.compilePredicateExpression(p.expression, ctx));
2946
+ return ast.predicates.filter((p) => p.targetAlias === edgeAlias && p.targetType === "edge").map((p) => chunkJ7LXTUTP_cjs.compilePredicateExpression(p.expression, ctx));
2939
2947
  }
2940
2948
  function collectRequiredColumnsByAlias(ast, traversal) {
2941
2949
  const selectiveFields = ast.selectiveFields;
@@ -3054,7 +3062,7 @@ function compileRecursiveOrderBy(ast, dialect) {
3054
3062
  "Ordering by JSON arrays or objects is not supported"
3055
3063
  );
3056
3064
  }
3057
- const field2 = chunk7V2FGGI2_cjs.compileFieldValue(orderSpec.field, dialect, valueType);
3065
+ const field2 = chunkJ7LXTUTP_cjs.compileFieldValue(orderSpec.field, dialect, valueType);
3058
3066
  const direction = chunkU5W4LKZV_cjs.sql.raw(orderSpec.direction.toUpperCase());
3059
3067
  const nulls = orderSpec.nulls ?? (orderSpec.direction === "asc" ? "last" : "first");
3060
3068
  const nullsDirection = chunkU5W4LKZV_cjs.sql.raw(nulls === "first" ? "DESC" : "ASC");
@@ -3136,19 +3144,19 @@ function decodeByValueType(value, valueType) {
3136
3144
  // src/store/recursive-cte.ts
3137
3145
  function buildReachableCte(options) {
3138
3146
  const trackPath = options.cyclePolicy === "prevent" || options.includePath;
3139
- const edgeKindFilter = chunk7V2FGGI2_cjs.compileKindFilter(
3147
+ const edgeKindFilter = chunkJ7LXTUTP_cjs.compileKindFilter(
3140
3148
  chunkU5W4LKZV_cjs.sql.raw("e.kind"),
3141
3149
  options.edgeKinds
3142
3150
  );
3143
- const currentTimestamp = chunk7V2FGGI2_cjs.currentReadInstant();
3144
- const nodeTemporalFilter = chunk7V2FGGI2_cjs.compileTemporalFilter({
3151
+ const currentTimestamp = chunkJ7LXTUTP_cjs.currentReadInstant();
3152
+ const nodeTemporalFilter = chunkJ7LXTUTP_cjs.compileTemporalFilter({
3145
3153
  mode: options.temporalMode,
3146
3154
  asOf: options.asOf,
3147
3155
  recordedAsOf: options.recordedAsOf,
3148
3156
  tableAlias: "n",
3149
3157
  currentTimestamp
3150
3158
  });
3151
- const edgeTemporalFilter = chunk7V2FGGI2_cjs.compileTemporalFilter({
3159
+ const edgeTemporalFilter = chunkJ7LXTUTP_cjs.compileTemporalFilter({
3152
3160
  mode: options.temporalMode,
3153
3161
  asOf: options.asOf,
3154
3162
  recordedAsOf: options.recordedAsOf,
@@ -3433,7 +3441,7 @@ function buildKindProjectionPlan(kind, selection, resolveFieldType, entityPrefix
3433
3441
  includeMeta = true;
3434
3442
  continue;
3435
3443
  }
3436
- chunkA4PBRX4C_cjs.validateProjectionField(field2, entityPrefix, kind);
3444
+ chunkD54WH24V_cjs.validateProjectionField(field2, entityPrefix, kind);
3437
3445
  if (!propertyFields.has(field2)) {
3438
3446
  propertyFields.set(field2, {
3439
3447
  field: field2,
@@ -3459,7 +3467,7 @@ function dedupeStrings(values) {
3459
3467
  function buildIncludedIdsCte(ctx) {
3460
3468
  const filters = [];
3461
3469
  if (ctx.includeKinds !== void 0 && ctx.includeKinds.length > 0) {
3462
- filters.push(chunk7V2FGGI2_cjs.compileKindFilter(chunkU5W4LKZV_cjs.sql.raw("kind"), ctx.includeKinds));
3470
+ filters.push(chunkJ7LXTUTP_cjs.compileKindFilter(chunkU5W4LKZV_cjs.sql.raw("kind"), ctx.includeKinds));
3463
3471
  }
3464
3472
  if (ctx.excludeRoot) {
3465
3473
  filters.push(chunkU5W4LKZV_cjs.sql`id != ${ctx.rootId}`);
@@ -3482,12 +3490,12 @@ async function fetchIncludedIds(ctx, reachableCte, includedIdsCte) {
3482
3490
  return rows.map((row) => row.id);
3483
3491
  }
3484
3492
  async function fetchSubgraphNodes(ctx, membership, projectionPlan) {
3485
- const nodeTemporalFilter = chunk7V2FGGI2_cjs.compileTemporalFilter({
3493
+ const nodeTemporalFilter = chunkJ7LXTUTP_cjs.compileTemporalFilter({
3486
3494
  mode: ctx.temporalMode,
3487
3495
  asOf: ctx.asOf,
3488
3496
  recordedAsOf: ctx.recordedAsOf,
3489
3497
  tableAlias: "n",
3490
- currentTimestamp: chunk7V2FGGI2_cjs.currentReadInstant()
3498
+ currentTimestamp: chunkJ7LXTUTP_cjs.currentReadInstant()
3491
3499
  });
3492
3500
  const columns = [
3493
3501
  chunkU5W4LKZV_cjs.sql`n.kind`,
@@ -3510,13 +3518,13 @@ async function fetchSubgraphNodes(ctx, membership, projectionPlan) {
3510
3518
  );
3511
3519
  }
3512
3520
  async function fetchSubgraphEdges(ctx, membership, projectionPlan) {
3513
- const edgeKindFilter = chunk7V2FGGI2_cjs.compileKindFilter(chunkU5W4LKZV_cjs.sql.raw("e.kind"), ctx.edgeKinds);
3514
- const edgeTemporalFilter = chunk7V2FGGI2_cjs.compileTemporalFilter({
3521
+ const edgeKindFilter = chunkJ7LXTUTP_cjs.compileKindFilter(chunkU5W4LKZV_cjs.sql.raw("e.kind"), ctx.edgeKinds);
3522
+ const edgeTemporalFilter = chunkJ7LXTUTP_cjs.compileTemporalFilter({
3515
3523
  mode: ctx.temporalMode,
3516
3524
  asOf: ctx.asOf,
3517
3525
  recordedAsOf: ctx.recordedAsOf,
3518
3526
  tableAlias: "e",
3519
- currentTimestamp: chunk7V2FGGI2_cjs.currentReadInstant()
3527
+ currentTimestamp: chunkJ7LXTUTP_cjs.currentReadInstant()
3520
3528
  });
3521
3529
  const columns = [
3522
3530
  chunkU5W4LKZV_cjs.sql`e.id`,
@@ -3555,7 +3563,7 @@ function buildMetadataColumns(alias, plan, columns) {
3555
3563
  if (metaKinds.length === plan.fullKinds.length + plan.projectedKinds.size) {
3556
3564
  return columns.map((col) => chunkU5W4LKZV_cjs.sql`${chunkU5W4LKZV_cjs.sql.raw(`${alias}.${col}`)}`);
3557
3565
  }
3558
- const filter = chunk7V2FGGI2_cjs.compileKindFilter(chunkU5W4LKZV_cjs.sql.raw(`${alias}.kind`), metaKinds);
3566
+ const filter = chunkJ7LXTUTP_cjs.compileKindFilter(chunkU5W4LKZV_cjs.sql.raw(`${alias}.kind`), metaKinds);
3559
3567
  return columns.map(
3560
3568
  (col) => chunkU5W4LKZV_cjs.sql`CASE WHEN ${filter} THEN ${chunkU5W4LKZV_cjs.sql.raw(`${alias}.${col}`)} ELSE NULL END AS ${chunkU5W4LKZV_cjs.sql.raw(col)}`
3561
3569
  );
@@ -3567,7 +3575,7 @@ function buildFullPropsColumn(alias, plan) {
3567
3575
  if (plan.fullKinds.length === 0) {
3568
3576
  return chunkU5W4LKZV_cjs.sql`NULL AS props`;
3569
3577
  }
3570
- const filter = chunk7V2FGGI2_cjs.compileKindFilter(chunkU5W4LKZV_cjs.sql.raw(`${alias}.kind`), plan.fullKinds);
3578
+ const filter = chunkJ7LXTUTP_cjs.compileKindFilter(chunkU5W4LKZV_cjs.sql.raw(`${alias}.kind`), plan.fullKinds);
3571
3579
  return chunkU5W4LKZV_cjs.sql`CASE WHEN ${filter} THEN ${chunkU5W4LKZV_cjs.sql.raw(`${alias}.props`)} ELSE NULL END AS props`;
3572
3580
  }
3573
3581
  function buildProjectedPropertyColumns(alias, plan, dialect) {
@@ -3611,7 +3619,7 @@ function applyProjectedFields(target, row, kindPlan) {
3611
3619
  function mapSubgraphNodeRow(row, projectionPlan) {
3612
3620
  const kindPlan = projectionPlan.projectedKinds.get(row.kind);
3613
3621
  if (kindPlan === void 0) {
3614
- return chunkNCX65HBY_cjs.rowToNode({
3622
+ return chunkUCQ3BFSY_cjs.rowToNode({
3615
3623
  ...row,
3616
3624
  props: normalizeProps(row.props)
3617
3625
  });
@@ -3621,7 +3629,7 @@ function mapSubgraphNodeRow(row, projectionPlan) {
3621
3629
  id: row.id
3622
3630
  };
3623
3631
  if (kindPlan.includeMeta) {
3624
- projectedNode["meta"] = chunkNCX65HBY_cjs.rowToNodeMeta(row);
3632
+ projectedNode["meta"] = chunkUCQ3BFSY_cjs.rowToNodeMeta(row);
3625
3633
  }
3626
3634
  applyProjectedFields(projectedNode, row, kindPlan);
3627
3635
  return projectedNode;
@@ -3629,7 +3637,7 @@ function mapSubgraphNodeRow(row, projectionPlan) {
3629
3637
  function mapSubgraphEdgeRow(row, projectionPlan) {
3630
3638
  const kindPlan = projectionPlan.projectedKinds.get(row.kind);
3631
3639
  if (kindPlan === void 0) {
3632
- return chunkNCX65HBY_cjs.rowToEdge({
3640
+ return chunkUCQ3BFSY_cjs.rowToEdge({
3633
3641
  ...row,
3634
3642
  props: normalizeProps(row.props)
3635
3643
  });
@@ -3643,7 +3651,7 @@ function mapSubgraphEdgeRow(row, projectionPlan) {
3643
3651
  toId: row.to_id
3644
3652
  };
3645
3653
  if (kindPlan.includeMeta) {
3646
- projectedEdge["meta"] = chunkNCX65HBY_cjs.rowToEdgeMeta(row);
3654
+ projectedEdge["meta"] = chunkUCQ3BFSY_cjs.rowToEdgeMeta(row);
3647
3655
  }
3648
3656
  applyProjectedFields(projectedEdge, row, kindPlan);
3649
3657
  return projectedEdge;
@@ -3969,7 +3977,7 @@ function hasIdEqualityPredicate(expression, alias) {
3969
3977
  }
3970
3978
  }
3971
3979
  function isStartAliasBoundToSingleId(ast, predicateIndex) {
3972
- return chunk7V2FGGI2_cjs.getPredicatesForAlias(predicateIndex, ast.start.alias, "node").some(
3980
+ return chunkJ7LXTUTP_cjs.getPredicatesForAlias(predicateIndex, ast.start.alias, "node").some(
3973
3981
  (predicate) => hasIdEqualityPredicate(predicate.expression, ast.start.alias)
3974
3982
  );
3975
3983
  }
@@ -4053,7 +4061,7 @@ function runStandardQueryPassPipeline(ast, graphId, ctx) {
4053
4061
  fulltextPredicate: void 0,
4054
4062
  fusion: void 0,
4055
4063
  logicalPlan: void 0,
4056
- predicateIndex: chunk7V2FGGI2_cjs.buildPredicateIndex(ast),
4064
+ predicateIndex: chunkJ7LXTUTP_cjs.buildPredicateIndex(ast),
4057
4065
  requiredColumnsByAlias: void 0,
4058
4066
  shouldCollapseSelectiveTraversalRowset: false,
4059
4067
  temporalFilterPass: void 0,
@@ -4293,7 +4301,7 @@ function compileSetOperation2(op, graphId, options = "sqlite") {
4293
4301
  }
4294
4302
  return compiled;
4295
4303
  };
4296
- const combined = chunk7V2FGGI2_cjs.withPinnedReadInstant(
4304
+ const combined = chunkJ7LXTUTP_cjs.withPinnedReadInstant(
4297
4305
  () => compileSetOperation(op, graphId, adapter, compileOperand, options_.vectorStrategy)
4298
4306
  );
4299
4307
  if (annIndexTypes.size > 0) {
@@ -4302,7 +4310,7 @@ function compileSetOperation2(op, graphId, options = "sqlite") {
4302
4310
  return chunkU5W4LKZV_cjs.asCompiledSelectSql(combined);
4303
4311
  }
4304
4312
  function resolveDialectAdapter(dialect, fulltextStrategy) {
4305
- const baseAdapter = chunkOVUUTCPJ_cjs.getDialect(dialect);
4313
+ const baseAdapter = chunkJXUTCSXX_cjs.getDialect(dialect);
4306
4314
  if (fulltextStrategy === void 0 || fulltextStrategy === baseAdapter.fulltext) {
4307
4315
  return baseAdapter;
4308
4316
  }
@@ -4433,7 +4441,7 @@ function compileCountAggregateFastPath(ast, graphId, ctx, logicalPlan, requiredC
4433
4441
  const nodeCountDistinctColumn = `${traversal.nodeAlias}_count_distinct`;
4434
4442
  const edgeCountColumn = `${traversal.edgeAlias}_count`;
4435
4443
  const edgeCountDistinctColumn = `${traversal.edgeAlias}_count_distinct`;
4436
- const previousNodeKinds = chunk7V2FGGI2_cjs.getNodeKindsForAlias(ast, traversal.joinFromAlias);
4444
+ const previousNodeKinds = chunkJ7LXTUTP_cjs.getNodeKindsForAlias(ast, traversal.joinFromAlias);
4437
4445
  const edgeKinds = [...new Set(traversal.edgeKinds)];
4438
4446
  const nodeKinds = traversal.nodeKinds;
4439
4447
  const edgeTemporalFilter = temporalFilterPass.forAlias("e");
@@ -4442,16 +4450,16 @@ function compileCountAggregateFastPath(ast, graphId, ctx, logicalPlan, requiredC
4442
4450
  ...ctx,
4443
4451
  cteColumnPrefix: "n"
4444
4452
  };
4445
- const nodePredicateClauses = chunk7V2FGGI2_cjs.compilePredicateClauses(
4446
- chunk7V2FGGI2_cjs.getPredicatesForAlias(predicateIndex, traversal.nodeAlias, "node"),
4453
+ const nodePredicateClauses = chunkJ7LXTUTP_cjs.compilePredicateClauses(
4454
+ chunkJ7LXTUTP_cjs.getPredicatesForAlias(predicateIndex, traversal.nodeAlias, "node"),
4447
4455
  nodePredicateContext
4448
4456
  );
4449
4457
  const edgePredicateContext = {
4450
4458
  ...ctx,
4451
4459
  cteColumnPrefix: "e"
4452
4460
  };
4453
- const edgePredicateClauses = chunk7V2FGGI2_cjs.compilePredicateClauses(
4454
- chunk7V2FGGI2_cjs.getPredicatesForAlias(predicateIndex, traversal.edgeAlias, "edge"),
4461
+ const edgePredicateClauses = chunkJ7LXTUTP_cjs.compilePredicateClauses(
4462
+ chunkJ7LXTUTP_cjs.getPredicatesForAlias(predicateIndex, traversal.edgeAlias, "edge"),
4455
4463
  edgePredicateContext
4456
4464
  );
4457
4465
  const joinField = traversal.direction === "out" ? "from_id" : "to_id";
@@ -4463,14 +4471,14 @@ function compileCountAggregateFastPath(ast, graphId, ctx, logicalPlan, requiredC
4463
4471
  const useInnerJoin = hasNodePredicates;
4464
4472
  const whereClauses = [
4465
4473
  chunkU5W4LKZV_cjs.sql`e.graph_id = ${graphId}`,
4466
- chunk7V2FGGI2_cjs.compileKindFilter(chunkU5W4LKZV_cjs.sql.raw("e.kind"), edgeKinds),
4467
- chunk7V2FGGI2_cjs.compileKindFilter(chunkU5W4LKZV_cjs.sql.raw(`e.${joinKindField}`), previousNodeKinds),
4468
- chunk7V2FGGI2_cjs.compileKindFilter(chunkU5W4LKZV_cjs.sql.raw(`e.${targetKindField}`), nodeKinds),
4474
+ chunkJ7LXTUTP_cjs.compileKindFilter(chunkU5W4LKZV_cjs.sql.raw("e.kind"), edgeKinds),
4475
+ chunkJ7LXTUTP_cjs.compileKindFilter(chunkU5W4LKZV_cjs.sql.raw(`e.${joinKindField}`), previousNodeKinds),
4476
+ chunkJ7LXTUTP_cjs.compileKindFilter(chunkU5W4LKZV_cjs.sql.raw(`e.${targetKindField}`), nodeKinds),
4469
4477
  edgeTemporalFilter,
4470
4478
  ...edgePredicateClauses,
4471
4479
  // INNER JOIN mode: node-side filters in WHERE constrain every aggregate.
4472
4480
  ...requiresNodeJoin && useInnerJoin ? [
4473
- chunk7V2FGGI2_cjs.compileKindFilter(chunkU5W4LKZV_cjs.sql.raw("n.kind"), nodeKinds),
4481
+ chunkJ7LXTUTP_cjs.compileKindFilter(chunkU5W4LKZV_cjs.sql.raw("n.kind"), nodeKinds),
4474
4482
  nodeTemporalFilter,
4475
4483
  ...nodePredicateClauses
4476
4484
  ] : []
@@ -4486,7 +4494,7 @@ function compileCountAggregateFastPath(ast, graphId, ctx, logicalPlan, requiredC
4486
4494
  chunkU5W4LKZV_cjs.sql`n.graph_id = e.graph_id`,
4487
4495
  chunkU5W4LKZV_cjs.sql`n.id = e.${chunkU5W4LKZV_cjs.sql.raw(targetField)}`,
4488
4496
  chunkU5W4LKZV_cjs.sql`n.kind = e.${chunkU5W4LKZV_cjs.sql.raw(targetKindField)}`,
4489
- chunk7V2FGGI2_cjs.compileKindFilter(chunkU5W4LKZV_cjs.sql.raw("n.kind"), nodeKinds),
4497
+ chunkJ7LXTUTP_cjs.compileKindFilter(chunkU5W4LKZV_cjs.sql.raw("n.kind"), nodeKinds),
4490
4498
  nodeTemporalFilter
4491
4499
  ] : [];
4492
4500
  const aggregateColumns = [];
@@ -4546,7 +4554,7 @@ function compileCountAggregateFastPath(ast, graphId, ctx, logicalPlan, requiredC
4546
4554
  ast.projection.fields.map((projectedField) => {
4547
4555
  const source = projectedField.source;
4548
4556
  if (!isAggregateExpr(source)) {
4549
- const value = chunk7V2FGGI2_cjs.compileFieldValue(
4557
+ const value = chunkJ7LXTUTP_cjs.compileFieldValue(
4550
4558
  source,
4551
4559
  dialect,
4552
4560
  source.valueType,
@@ -4879,7 +4887,7 @@ function compileStandardQueryWithCteStrategy(ast, graphId, ctx) {
4879
4887
  traversalLimit: traversalCteLimit
4880
4888
  });
4881
4889
  if (vectorPredicate) {
4882
- const nodeKinds = chunk7V2FGGI2_cjs.getNodeKindsForAlias(ast, vectorPredicate.field.alias);
4890
+ const nodeKinds = chunkJ7LXTUTP_cjs.getNodeKindsForAlias(ast, vectorPredicate.field.alias);
4883
4891
  ctes.push(
4884
4892
  buildStandardEmbeddingsCte({
4885
4893
  ctx,
@@ -4890,7 +4898,7 @@ function compileStandardQueryWithCteStrategy(ast, graphId, ctx) {
4890
4898
  );
4891
4899
  }
4892
4900
  if (fulltextPredicate) {
4893
- const nodeKinds = chunk7V2FGGI2_cjs.getNodeKindsForAlias(ast, fulltextPredicate.field.alias);
4901
+ const nodeKinds = chunkJ7LXTUTP_cjs.getNodeKindsForAlias(ast, fulltextPredicate.field.alias);
4894
4902
  ctes.push(
4895
4903
  buildStandardFulltextCte({
4896
4904
  ctx,
@@ -4900,7 +4908,7 @@ function compileStandardQueryWithCteStrategy(ast, graphId, ctx) {
4900
4908
  })
4901
4909
  );
4902
4910
  }
4903
- if (chunk7V2FGGI2_cjs.getHybridTargetAlias(vectorPredicate, fulltextPredicate) !== void 0) {
4911
+ if (chunkJ7LXTUTP_cjs.getHybridTargetAlias(vectorPredicate, fulltextPredicate) !== void 0) {
4904
4912
  ctes.push(buildStandardHybridCandidateCte());
4905
4913
  }
4906
4914
  const projection = buildStandardProjection({
@@ -5455,7 +5463,7 @@ function createNodeTrackingProxy(alias, kindNames, tracker, options) {
5455
5463
  return getPlaceholderForSystemField(property, options.mode);
5456
5464
  }
5457
5465
  if (property === "meta") {
5458
- for (const key of chunkA2I2XO52_cjs.NODE_META_KEYS) {
5466
+ for (const key of chunkIX64T5OL_cjs.NODE_META_KEYS) {
5459
5467
  tracker.record(alias, `meta.${key}`, true);
5460
5468
  }
5461
5469
  return buildNodeMetaPlaceholder(options.mode);
@@ -5488,7 +5496,7 @@ function createEdgeTrackingProxy(alias, edgeKindNames, tracker, options) {
5488
5496
  return getPlaceholderForSystemField(property, options.mode);
5489
5497
  }
5490
5498
  if (property === "meta") {
5491
- for (const key of chunkA2I2XO52_cjs.EDGE_META_KEYS) {
5499
+ for (const key of chunkIX64T5OL_cjs.EDGE_META_KEYS) {
5492
5500
  tracker.record(alias, `meta.${key}`, true);
5493
5501
  }
5494
5502
  return buildEdgeMetaPlaceholder(options.mode);
@@ -5830,7 +5838,7 @@ function createGuardedProxy(target, debugPath) {
5830
5838
  // src/query/builder/read-instant-template.ts
5831
5839
  function templateHasReadInstant(template) {
5832
5840
  return template.params.some(
5833
- (parameter) => chunkU5W4LKZV_cjs.isSqlPlaceholder(parameter) && parameter.name === chunk7V2FGGI2_cjs.CURRENT_READ_INSTANT_PLACEHOLDER
5841
+ (parameter) => chunkU5W4LKZV_cjs.isSqlPlaceholder(parameter) && parameter.name === chunkJ7LXTUTP_cjs.CURRENT_READ_INSTANT_PLACEHOLDER
5834
5842
  );
5835
5843
  }
5836
5844
  function queryAstNeedsCurrentReadInstant(ast) {
@@ -5869,7 +5877,7 @@ function fillTemplateParams(params, bindings, dialect, listParameters = EMPTY_LI
5869
5877
  return params.map((parameter) => {
5870
5878
  if (!chunkU5W4LKZV_cjs.isSqlPlaceholder(parameter)) return parameter;
5871
5879
  const name = parameter.name;
5872
- if (name === chunk7V2FGGI2_cjs.CURRENT_READ_INSTANT_PLACEHOLDER) {
5880
+ if (name === chunkJ7LXTUTP_cjs.CURRENT_READ_INSTANT_PLACEHOLDER) {
5873
5881
  readInstant ??= chunkZTAJL4DT_cjs.nowIso();
5874
5882
  return readInstant;
5875
5883
  }
@@ -5881,7 +5889,7 @@ function fillTemplateParams(params, bindings, dialect, listParameters = EMPTY_LI
5881
5889
  }
5882
5890
  if (listParameters.has(name)) {
5883
5891
  assertListBinding(name, value);
5884
- return chunkOVUUTCPJ_cjs.getDialect(dialect).packListValue(value);
5892
+ return chunkJXUTCSXX_cjs.getDialect(dialect).packListValue(value);
5885
5893
  }
5886
5894
  return chunkU5W4LKZV_cjs.bindSqlValue(value, dialect);
5887
5895
  });
@@ -5929,7 +5937,7 @@ function toLiteralList(parameterName, value) {
5929
5937
  function substitutePredicateExpression(expr, bindings) {
5930
5938
  switch (expr.__type) {
5931
5939
  case "comparison": {
5932
- if (chunk7V2FGGI2_cjs.isParameterRef(expr.right)) {
5940
+ if (chunkJ7LXTUTP_cjs.isParameterRef(expr.right)) {
5933
5941
  const value = resolveBinding(bindings, expr.right.name);
5934
5942
  return {
5935
5943
  ...expr,
@@ -5939,7 +5947,7 @@ function substitutePredicateExpression(expr, bindings) {
5939
5947
  return expr;
5940
5948
  }
5941
5949
  case "string_op": {
5942
- if (chunk7V2FGGI2_cjs.isParameterRef(expr.pattern)) {
5950
+ if (chunkJ7LXTUTP_cjs.isParameterRef(expr.pattern)) {
5943
5951
  const value = bindings[expr.pattern.name];
5944
5952
  if (value === void 0) {
5945
5953
  throw new chunkC4F7VJ5D_cjs.ConfigurationError(
@@ -5961,8 +5969,8 @@ function substitutePredicateExpression(expr, bindings) {
5961
5969
  return expr;
5962
5970
  }
5963
5971
  case "between": {
5964
- const lowerIsParam = chunk7V2FGGI2_cjs.isParameterRef(expr.lower);
5965
- const upperIsParam = chunk7V2FGGI2_cjs.isParameterRef(expr.upper);
5972
+ const lowerIsParam = chunkJ7LXTUTP_cjs.isParameterRef(expr.lower);
5973
+ const upperIsParam = chunkJ7LXTUTP_cjs.isParameterRef(expr.upper);
5966
5974
  if (!lowerIsParam && !upperIsParam) return expr;
5967
5975
  const lower = lowerIsParam ? toLiteral(resolveBinding(bindings, expr.lower.name)) : expr.lower;
5968
5976
  const upper = upperIsParam ? toLiteral(resolveBinding(bindings, expr.upper.name)) : expr.upper;
@@ -6232,14 +6240,14 @@ function collectParameterMetadataFromAst(ast, accumulator) {
6232
6240
  function collectParameterMetadataFromExpression(expression, accumulator) {
6233
6241
  switch (expression.__type) {
6234
6242
  case "comparison": {
6235
- if (chunk7V2FGGI2_cjs.isParameterRef(expression.right)) {
6243
+ if (chunkJ7LXTUTP_cjs.isParameterRef(expression.right)) {
6236
6244
  const name = expression.right.name;
6237
6245
  accumulator.names.add(name);
6238
6246
  if (isListComparisonOp(expression.op)) {
6239
6247
  recordListElementType(
6240
6248
  accumulator,
6241
6249
  name,
6242
- chunk7V2FGGI2_cjs.resolveParameterValueType(expression.left, expression.right)
6250
+ chunkJ7LXTUTP_cjs.resolveParameterValueType(expression.left, expression.right)
6243
6251
  );
6244
6252
  } else {
6245
6253
  accumulator.scalarParameters.add(name);
@@ -6248,7 +6256,7 @@ function collectParameterMetadataFromExpression(expression, accumulator) {
6248
6256
  return;
6249
6257
  }
6250
6258
  case "string_op": {
6251
- if (chunk7V2FGGI2_cjs.isParameterRef(expression.pattern)) {
6259
+ if (chunkJ7LXTUTP_cjs.isParameterRef(expression.pattern)) {
6252
6260
  accumulator.names.add(expression.pattern.name);
6253
6261
  accumulator.scalarParameters.add(expression.pattern.name);
6254
6262
  accumulator.stringOpParameters.add(expression.pattern.name);
@@ -6257,7 +6265,7 @@ function collectParameterMetadataFromExpression(expression, accumulator) {
6257
6265
  }
6258
6266
  case "between": {
6259
6267
  for (const bound of [expression.lower, expression.upper]) {
6260
- if (chunk7V2FGGI2_cjs.isParameterRef(bound)) {
6268
+ if (chunkJ7LXTUTP_cjs.isParameterRef(bound)) {
6261
6269
  accumulator.names.add(bound.name);
6262
6270
  accumulator.scalarParameters.add(bound.name);
6263
6271
  }
@@ -6811,10 +6819,10 @@ var ExecutableQuery = class _ExecutableQuery {
6811
6819
  }
6812
6820
  }
6813
6821
  const orderSpec = isSystem ? {
6814
- field: chunk7V2FGGI2_cjs.fieldRef(alias, [field2], { valueType: "string" }),
6822
+ field: chunkJ7LXTUTP_cjs.fieldRef(alias, [field2], { valueType: "string" }),
6815
6823
  direction
6816
6824
  } : {
6817
- field: chunk7V2FGGI2_cjs.fieldRef(alias, ["props"], {
6825
+ field: chunkJ7LXTUTP_cjs.fieldRef(alias, ["props"], {
6818
6826
  jsonPointer: chunkTDXIBCGY_cjs.jsonPointer([field2]),
6819
6827
  valueType: typeInfo?.valueType,
6820
6828
  elementType: typeInfo?.elementType
@@ -7031,7 +7039,7 @@ var ExecutableQuery = class _ExecutableQuery {
7031
7039
  }
7032
7040
  #executeOnBackend(backend, promise, surface) {
7033
7041
  if (this.#state.recordedAsOf === void 0) return promise;
7034
- return chunkWBUFJ7BS_cjs.withRecordedRelationsPrecondition(promise, {
7042
+ return chunkJQXSZHF2_cjs.withRecordedRelationsPrecondition(promise, {
7035
7043
  dialect: backend.dialect,
7036
7044
  surface
7037
7045
  });
@@ -7921,12 +7929,12 @@ function createDynamicFieldBuilder(introspector, alias, name, kindNames, entity)
7921
7929
  if (typeInfo === void 0) {
7922
7930
  throw new Error(`Property "${name}" is not declared on ${where}.`);
7923
7931
  }
7924
- const ref = chunk7V2FGGI2_cjs.fieldRef(alias, ["props"], {
7932
+ const ref = chunkJ7LXTUTP_cjs.fieldRef(alias, ["props"], {
7925
7933
  jsonPointer: chunkTDXIBCGY_cjs.jsonPointer([name]),
7926
7934
  valueType: typeInfo.valueType,
7927
7935
  elementType: typeInfo.elementType
7928
7936
  });
7929
- const base = chunk7V2FGGI2_cjs.buildFieldBuilderForTypeInfo(ref, typeInfo);
7937
+ const base = chunkJ7LXTUTP_cjs.buildFieldBuilderForTypeInfo(ref, typeInfo);
7930
7938
  const expect = (asserted) => {
7931
7939
  if (typeInfo.valueType !== asserted) {
7932
7940
  throw new TypeError(
@@ -8098,17 +8106,17 @@ var TraversalBuilder = class _TraversalBuilder {
8098
8106
  (kind) => !this.#edgeKinds.includes(kind)
8099
8107
  )
8100
8108
  ];
8101
- const idAccessor = chunk7V2FGGI2_cjs.stringField(
8102
- chunk7V2FGGI2_cjs.fieldRef(alias, ["id"], { valueType: "string" })
8109
+ const idAccessor = chunkJ7LXTUTP_cjs.stringField(
8110
+ chunkJ7LXTUTP_cjs.fieldRef(alias, ["id"], { valueType: "string" })
8103
8111
  );
8104
- const kindAccessor = chunk7V2FGGI2_cjs.stringField(
8105
- chunk7V2FGGI2_cjs.fieldRef(alias, ["kind"], { valueType: "string" })
8112
+ const kindAccessor = chunkJ7LXTUTP_cjs.stringField(
8113
+ chunkJ7LXTUTP_cjs.fieldRef(alias, ["kind"], { valueType: "string" })
8106
8114
  );
8107
- const fromIdAccessor = chunk7V2FGGI2_cjs.stringField(
8108
- chunk7V2FGGI2_cjs.fieldRef(alias, ["from_id"], { valueType: "string" })
8115
+ const fromIdAccessor = chunkJ7LXTUTP_cjs.stringField(
8116
+ chunkJ7LXTUTP_cjs.fieldRef(alias, ["from_id"], { valueType: "string" })
8109
8117
  );
8110
- const toIdAccessor = chunk7V2FGGI2_cjs.stringField(
8111
- chunk7V2FGGI2_cjs.fieldRef(alias, ["to_id"], { valueType: "string" })
8118
+ const toIdAccessor = chunkJ7LXTUTP_cjs.stringField(
8119
+ chunkJ7LXTUTP_cjs.fieldRef(alias, ["to_id"], { valueType: "string" })
8112
8120
  );
8113
8121
  const buildFieldAccessor = (propertyName) => {
8114
8122
  const typeInfo = this.#config.schemaIntrospector.getSharedEdgeFieldTypeInfo(
@@ -8117,34 +8125,34 @@ var TraversalBuilder = class _TraversalBuilder {
8117
8125
  );
8118
8126
  const valueType = typeInfo?.valueType;
8119
8127
  const elementType = typeInfo?.elementType;
8120
- const ref = chunk7V2FGGI2_cjs.fieldRef(alias, ["props"], {
8128
+ const ref = chunkJ7LXTUTP_cjs.fieldRef(alias, ["props"], {
8121
8129
  jsonPointer: chunkTDXIBCGY_cjs.jsonPointer([propertyName]),
8122
8130
  valueType,
8123
8131
  elementType
8124
8132
  });
8125
8133
  switch (valueType) {
8126
8134
  case "string": {
8127
- return chunk7V2FGGI2_cjs.stringField(ref);
8135
+ return chunkJ7LXTUTP_cjs.stringField(ref);
8128
8136
  }
8129
8137
  case "number": {
8130
- return chunk7V2FGGI2_cjs.numberField(ref);
8138
+ return chunkJ7LXTUTP_cjs.numberField(ref);
8131
8139
  }
8132
8140
  case "boolean": {
8133
- return chunk7V2FGGI2_cjs.baseField(ref);
8141
+ return chunkJ7LXTUTP_cjs.baseField(ref);
8134
8142
  }
8135
8143
  case "date": {
8136
- return chunk7V2FGGI2_cjs.dateField(ref);
8144
+ return chunkJ7LXTUTP_cjs.dateField(ref);
8137
8145
  }
8138
8146
  case "array": {
8139
- return chunk7V2FGGI2_cjs.arrayField(ref);
8147
+ return chunkJ7LXTUTP_cjs.arrayField(ref);
8140
8148
  }
8141
8149
  case "object": {
8142
- return chunk7V2FGGI2_cjs.objectField(ref);
8150
+ return chunkJ7LXTUTP_cjs.objectField(ref);
8143
8151
  }
8144
8152
  case "embedding":
8145
8153
  case "unknown":
8146
8154
  case void 0: {
8147
- return chunk7V2FGGI2_cjs.baseField(ref);
8155
+ return chunkJ7LXTUTP_cjs.baseField(ref);
8148
8156
  }
8149
8157
  }
8150
8158
  };
@@ -8289,39 +8297,39 @@ function buildNodeFields(alias) {
8289
8297
  return [
8290
8298
  {
8291
8299
  outputName: `${alias}_id`,
8292
- source: chunk7V2FGGI2_cjs.fieldRef(alias, ["id"])
8300
+ source: chunkJ7LXTUTP_cjs.fieldRef(alias, ["id"])
8293
8301
  },
8294
8302
  {
8295
8303
  outputName: `${alias}_kind`,
8296
- source: chunk7V2FGGI2_cjs.fieldRef(alias, ["kind"])
8304
+ source: chunkJ7LXTUTP_cjs.fieldRef(alias, ["kind"])
8297
8305
  },
8298
8306
  {
8299
8307
  outputName: `${alias}_props`,
8300
- source: chunk7V2FGGI2_cjs.fieldRef(alias, ["props"])
8308
+ source: chunkJ7LXTUTP_cjs.fieldRef(alias, ["props"])
8301
8309
  },
8302
8310
  {
8303
8311
  outputName: `${alias}_version`,
8304
- source: chunk7V2FGGI2_cjs.fieldRef(alias, ["version"])
8312
+ source: chunkJ7LXTUTP_cjs.fieldRef(alias, ["version"])
8305
8313
  },
8306
8314
  {
8307
8315
  outputName: `${alias}_valid_from`,
8308
- source: chunk7V2FGGI2_cjs.fieldRef(alias, ["valid_from"])
8316
+ source: chunkJ7LXTUTP_cjs.fieldRef(alias, ["valid_from"])
8309
8317
  },
8310
8318
  {
8311
8319
  outputName: `${alias}_valid_to`,
8312
- source: chunk7V2FGGI2_cjs.fieldRef(alias, ["valid_to"])
8320
+ source: chunkJ7LXTUTP_cjs.fieldRef(alias, ["valid_to"])
8313
8321
  },
8314
8322
  {
8315
8323
  outputName: `${alias}_created_at`,
8316
- source: chunk7V2FGGI2_cjs.fieldRef(alias, ["created_at"])
8324
+ source: chunkJ7LXTUTP_cjs.fieldRef(alias, ["created_at"])
8317
8325
  },
8318
8326
  {
8319
8327
  outputName: `${alias}_updated_at`,
8320
- source: chunk7V2FGGI2_cjs.fieldRef(alias, ["updated_at"])
8328
+ source: chunkJ7LXTUTP_cjs.fieldRef(alias, ["updated_at"])
8321
8329
  },
8322
8330
  {
8323
8331
  outputName: `${alias}_deleted_at`,
8324
- source: chunk7V2FGGI2_cjs.fieldRef(alias, ["deleted_at"])
8332
+ source: chunkJ7LXTUTP_cjs.fieldRef(alias, ["deleted_at"])
8325
8333
  }
8326
8334
  ];
8327
8335
  }
@@ -8330,52 +8338,52 @@ function buildEdgeFields(edgeAlias, nodeCteAlias) {
8330
8338
  return [
8331
8339
  {
8332
8340
  outputName: `${edgeAlias}_id`,
8333
- source: chunk7V2FGGI2_cjs.fieldRef(edgeAlias, ["id"]),
8341
+ source: chunkJ7LXTUTP_cjs.fieldRef(edgeAlias, ["id"]),
8334
8342
  cteAlias
8335
8343
  },
8336
8344
  {
8337
8345
  outputName: `${edgeAlias}_kind`,
8338
- source: chunk7V2FGGI2_cjs.fieldRef(edgeAlias, ["kind"]),
8346
+ source: chunkJ7LXTUTP_cjs.fieldRef(edgeAlias, ["kind"]),
8339
8347
  cteAlias
8340
8348
  },
8341
8349
  {
8342
8350
  outputName: `${edgeAlias}_from_id`,
8343
- source: chunk7V2FGGI2_cjs.fieldRef(edgeAlias, ["from_id"]),
8351
+ source: chunkJ7LXTUTP_cjs.fieldRef(edgeAlias, ["from_id"]),
8344
8352
  cteAlias
8345
8353
  },
8346
8354
  {
8347
8355
  outputName: `${edgeAlias}_to_id`,
8348
- source: chunk7V2FGGI2_cjs.fieldRef(edgeAlias, ["to_id"]),
8356
+ source: chunkJ7LXTUTP_cjs.fieldRef(edgeAlias, ["to_id"]),
8349
8357
  cteAlias
8350
8358
  },
8351
8359
  {
8352
8360
  outputName: `${edgeAlias}_props`,
8353
- source: chunk7V2FGGI2_cjs.fieldRef(edgeAlias, ["props"]),
8361
+ source: chunkJ7LXTUTP_cjs.fieldRef(edgeAlias, ["props"]),
8354
8362
  cteAlias
8355
8363
  },
8356
8364
  {
8357
8365
  outputName: `${edgeAlias}_valid_from`,
8358
- source: chunk7V2FGGI2_cjs.fieldRef(edgeAlias, ["valid_from"]),
8366
+ source: chunkJ7LXTUTP_cjs.fieldRef(edgeAlias, ["valid_from"]),
8359
8367
  cteAlias
8360
8368
  },
8361
8369
  {
8362
8370
  outputName: `${edgeAlias}_valid_to`,
8363
- source: chunk7V2FGGI2_cjs.fieldRef(edgeAlias, ["valid_to"]),
8371
+ source: chunkJ7LXTUTP_cjs.fieldRef(edgeAlias, ["valid_to"]),
8364
8372
  cteAlias
8365
8373
  },
8366
8374
  {
8367
8375
  outputName: `${edgeAlias}_created_at`,
8368
- source: chunk7V2FGGI2_cjs.fieldRef(edgeAlias, ["created_at"]),
8376
+ source: chunkJ7LXTUTP_cjs.fieldRef(edgeAlias, ["created_at"]),
8369
8377
  cteAlias
8370
8378
  },
8371
8379
  {
8372
8380
  outputName: `${edgeAlias}_updated_at`,
8373
- source: chunk7V2FGGI2_cjs.fieldRef(edgeAlias, ["updated_at"]),
8381
+ source: chunkJ7LXTUTP_cjs.fieldRef(edgeAlias, ["updated_at"]),
8374
8382
  cteAlias
8375
8383
  },
8376
8384
  {
8377
8385
  outputName: `${edgeAlias}_deleted_at`,
8378
- source: chunk7V2FGGI2_cjs.fieldRef(edgeAlias, ["deleted_at"]),
8386
+ source: chunkJ7LXTUTP_cjs.fieldRef(edgeAlias, ["deleted_at"]),
8379
8387
  cteAlias
8380
8388
  }
8381
8389
  ];
@@ -8688,10 +8696,10 @@ var QueryBuilder = class _QueryBuilder {
8688
8696
  field2
8689
8697
  ) : this.#getOrderByTypeInfo(alias, field2);
8690
8698
  const orderSpec = isSystem ? {
8691
- field: chunk7V2FGGI2_cjs.fieldRef(alias, [field2], { valueType: "string" }),
8699
+ field: chunkJ7LXTUTP_cjs.fieldRef(alias, [field2], { valueType: "string" }),
8692
8700
  direction
8693
8701
  } : {
8694
- field: chunk7V2FGGI2_cjs.fieldRef(alias, ["props"], {
8702
+ field: chunkJ7LXTUTP_cjs.fieldRef(alias, ["props"], {
8695
8703
  jsonPointer: chunkTDXIBCGY_cjs.jsonPointer([field2]),
8696
8704
  valueType: typeInfo?.valueType,
8697
8705
  elementType: typeInfo?.elementType
@@ -8867,7 +8875,7 @@ var QueryBuilder = class _QueryBuilder {
8867
8875
  kindNames,
8868
8876
  property
8869
8877
  ) : void 0;
8870
- const ref = chunk7V2FGGI2_cjs.fieldRef(alias, ["props"], {
8878
+ const ref = chunkJ7LXTUTP_cjs.fieldRef(alias, ["props"], {
8871
8879
  jsonPointer: chunkTDXIBCGY_cjs.jsonPointer([property]),
8872
8880
  valueType: typeInfo?.valueType,
8873
8881
  elementType: typeInfo?.elementType
@@ -8875,17 +8883,17 @@ var QueryBuilder = class _QueryBuilder {
8875
8883
  return this.#buildFieldBuilderForTypeInfo(ref, typeInfo);
8876
8884
  }
8877
8885
  #buildFieldBuilderForTypeInfo(ref, typeInfo) {
8878
- return chunk7V2FGGI2_cjs.buildFieldBuilderForTypeInfo(ref, typeInfo);
8886
+ return chunkJ7LXTUTP_cjs.buildFieldBuilderForTypeInfo(ref, typeInfo);
8879
8887
  }
8880
8888
  #createNodeAccessor(alias) {
8881
8889
  const kindNames = this.#getKindNamesForAlias(alias);
8882
- const idAccessor = chunk7V2FGGI2_cjs.stringField(
8883
- chunk7V2FGGI2_cjs.fieldRef(alias, ["id"], { valueType: "string" })
8890
+ const idAccessor = chunkJ7LXTUTP_cjs.stringField(
8891
+ chunkJ7LXTUTP_cjs.fieldRef(alias, ["id"], { valueType: "string" })
8884
8892
  );
8885
- const kindAccessor = chunk7V2FGGI2_cjs.stringField(
8886
- chunk7V2FGGI2_cjs.fieldRef(alias, ["kind"], { valueType: "string" })
8893
+ const kindAccessor = chunkJ7LXTUTP_cjs.stringField(
8894
+ chunkJ7LXTUTP_cjs.fieldRef(alias, ["kind"], { valueType: "string" })
8887
8895
  );
8888
- const fulltextAccessor = chunk7V2FGGI2_cjs.createFulltextAccessor(
8896
+ const fulltextAccessor = chunkJ7LXTUTP_cjs.createFulltextAccessor(
8889
8897
  alias,
8890
8898
  () => this.#hasSearchableField(kindNames)
8891
8899
  );
@@ -8960,7 +8968,7 @@ var QueryBuilder = class _QueryBuilder {
8960
8968
  edgeKindNames,
8961
8969
  property
8962
8970
  ) : void 0;
8963
- const ref = chunk7V2FGGI2_cjs.fieldRef(alias, ["props"], {
8971
+ const ref = chunkJ7LXTUTP_cjs.fieldRef(alias, ["props"], {
8964
8972
  jsonPointer: chunkTDXIBCGY_cjs.jsonPointer([property]),
8965
8973
  valueType: typeInfo?.valueType,
8966
8974
  elementType: typeInfo?.elementType
@@ -8969,17 +8977,17 @@ var QueryBuilder = class _QueryBuilder {
8969
8977
  }
8970
8978
  #createEdgeAccessor(alias) {
8971
8979
  const edgeKindNames = this.#getEdgeKindNamesForAlias(alias);
8972
- const idAccessor = chunk7V2FGGI2_cjs.stringField(
8973
- chunk7V2FGGI2_cjs.fieldRef(alias, ["id"], { valueType: "string" })
8980
+ const idAccessor = chunkJ7LXTUTP_cjs.stringField(
8981
+ chunkJ7LXTUTP_cjs.fieldRef(alias, ["id"], { valueType: "string" })
8974
8982
  );
8975
- const kindAccessor = chunk7V2FGGI2_cjs.stringField(
8976
- chunk7V2FGGI2_cjs.fieldRef(alias, ["kind"], { valueType: "string" })
8983
+ const kindAccessor = chunkJ7LXTUTP_cjs.stringField(
8984
+ chunkJ7LXTUTP_cjs.fieldRef(alias, ["kind"], { valueType: "string" })
8977
8985
  );
8978
- const fromIdAccessor = chunk7V2FGGI2_cjs.stringField(
8979
- chunk7V2FGGI2_cjs.fieldRef(alias, ["from_id"], { valueType: "string" })
8986
+ const fromIdAccessor = chunkJ7LXTUTP_cjs.stringField(
8987
+ chunkJ7LXTUTP_cjs.fieldRef(alias, ["from_id"], { valueType: "string" })
8980
8988
  );
8981
- const toIdAccessor = chunk7V2FGGI2_cjs.stringField(
8982
- chunk7V2FGGI2_cjs.fieldRef(alias, ["to_id"], { valueType: "string" })
8989
+ const toIdAccessor = chunkJ7LXTUTP_cjs.stringField(
8990
+ chunkJ7LXTUTP_cjs.fieldRef(alias, ["to_id"], { valueType: "string" })
8983
8991
  );
8984
8992
  if (this.#state.dynamicEdgeAliases.has(alias)) {
8985
8993
  return {
@@ -9018,7 +9026,7 @@ var QueryBuilder = class _QueryBuilder {
9018
9026
  // src/query/builder/unionable-query.ts
9019
9027
  function executeOnBackend(backend, recordedAsOf, promise, surface) {
9020
9028
  if (recordedAsOf === void 0) return promise;
9021
- return chunkWBUFJ7BS_cjs.withRecordedRelationsPrecondition(promise, {
9029
+ return chunkJQXSZHF2_cjs.withRecordedRelationsPrecondition(promise, {
9022
9030
  dialect: backend.dialect,
9023
9031
  surface
9024
9032
  });
@@ -9617,7 +9625,7 @@ async function rebuildFulltextIndex(ctx, nodeKind, options) {
9617
9625
  }
9618
9626
  }
9619
9627
  };
9620
- await chunk3PRKZW6D_cjs.runOptionallyInTransaction(backend, writePage);
9628
+ await chunkEKFUG4G7_cjs.runOptionallyInTransaction(backend, writePage);
9621
9629
  processed += rows.length;
9622
9630
  upserted += pageResult.toUpsert.length;
9623
9631
  cleared += pageResult.toDelete.length;
@@ -9649,7 +9657,7 @@ function processPage(schema, rows) {
9649
9657
  }
9650
9658
  let parsed;
9651
9659
  try {
9652
- parsed = chunk3PRKZW6D_cjs.rowPropsToObject(row.props);
9660
+ parsed = chunkEKFUG4G7_cjs.rowPropsToObject(row.props);
9653
9661
  } catch {
9654
9662
  skipped += 1;
9655
9663
  skippedIds.push(row.id);
@@ -9660,7 +9668,7 @@ function processPage(schema, rows) {
9660
9668
  skippedIds.push(row.id);
9661
9669
  continue;
9662
9670
  }
9663
- const computed = chunk7V2FGGI2_cjs.computeFulltextContent(schema, parsed);
9671
+ const computed = chunkJ7LXTUTP_cjs.computeFulltextContent(schema, parsed);
9664
9672
  if (computed === void 0) {
9665
9673
  toDelete.push(row.id);
9666
9674
  } else {
@@ -9741,7 +9749,7 @@ async function fetchNodesForRows(backend, graphId, rows) {
9741
9749
  function tryResolveSearchSlot(ctx, nodeKind, fieldPath) {
9742
9750
  const nodeType = ctx.registry.getNodeType(nodeKind);
9743
9751
  if (nodeType === void 0) return void 0;
9744
- const fields = chunk7V2FGGI2_cjs.getEmbeddingFields(nodeType.schema);
9752
+ const fields = chunkJ7LXTUTP_cjs.getEmbeddingFields(nodeType.schema);
9745
9753
  const field2 = fields.find((entry2) => entry2.fieldPath === fieldPath);
9746
9754
  if (field2 === void 0) return void 0;
9747
9755
  return {
@@ -10051,7 +10059,7 @@ async function executeHybridSearch(ctx, nodeKind, options) {
10051
10059
  ...candidates === void 0 ? {} : { candidates }
10052
10060
  });
10053
10061
  return rows.map((row, index) => {
10054
- const typedNode = chunkNCX65HBY_cjs.rowToNode(row.node);
10062
+ const typedNode = chunkUCQ3BFSY_cjs.rowToNode(row.node);
10055
10063
  return {
10056
10064
  node: typedNode,
10057
10065
  score: row.fusedScore,
@@ -10216,7 +10224,7 @@ function assertEfSearch(efSearch, label) {
10216
10224
  }
10217
10225
  function assertMinScore(minScore, metric, label) {
10218
10226
  if (minScore === void 0) return;
10219
- chunkOVUUTCPJ_cjs.assertVectorMinScore(minScore, metric, label);
10227
+ chunkJXUTCSXX_cjs.assertVectorMinScore(minScore, metric, label);
10220
10228
  }
10221
10229
  function assertVectorQueryCompatible(backend, slot, options, label) {
10222
10230
  if (options.metric !== void 0 && options.metric !== slot.metric) {
@@ -10315,13 +10323,13 @@ async function fetchNodesByIds(backend, graphId, nodeKind, ids) {
10315
10323
  const rows = await backend.getNodes(graphId, nodeKind, ids);
10316
10324
  for (const row of rows) {
10317
10325
  if (row.deleted_at !== void 0) continue;
10318
- map.set(row.id, chunkNCX65HBY_cjs.rowToNode(row));
10326
+ map.set(row.id, chunkUCQ3BFSY_cjs.rowToNode(row));
10319
10327
  }
10320
10328
  return map;
10321
10329
  }
10322
10330
  for (const id of ids) {
10323
10331
  const row = await backend.getNode(graphId, nodeKind, id);
10324
- if (row && row.deleted_at === void 0) map.set(row.id, chunkNCX65HBY_cjs.rowToNode(row));
10332
+ if (row && row.deleted_at === void 0) map.set(row.id, chunkUCQ3BFSY_cjs.rowToNode(row));
10325
10333
  }
10326
10334
  return map;
10327
10335
  }
@@ -10497,7 +10505,7 @@ function buildIncompatibleChangeError(classification, nonEmpty, graphId) {
10497
10505
  }
10498
10506
  const all = [...classification.incompatible, ...promoted];
10499
10507
  if (all.length === 0) return void 0;
10500
- return new chunkQYWINYEA_cjs.IncompatibleChangeError(all, graphId);
10508
+ return new chunkJ2ICGNHO_cjs.IncompatibleChangeError(all, graphId);
10501
10509
  }
10502
10510
  function classifyNode(kind, existing, next, recorders) {
10503
10511
  classifyProperties(kind, existing.properties, next.properties, recorders);
@@ -10835,9 +10843,9 @@ function resolveTemporalFilter(ctx, options, tableAlias) {
10835
10843
  asOf: resolved.asOf,
10836
10844
  recordedAsOf: resolved.recordedAsOf,
10837
10845
  tableAlias,
10838
- currentTimestamp: chunk7V2FGGI2_cjs.currentReadInstant()
10846
+ currentTimestamp: chunkJ7LXTUTP_cjs.currentReadInstant()
10839
10847
  };
10840
- return chunk7V2FGGI2_cjs.compileTemporalFilter(filterOptions);
10848
+ return chunkJ7LXTUTP_cjs.compileTemporalFilter(filterOptions);
10841
10849
  }
10842
10850
  function resolveMaxHops(rawMaxHops, fallback, optionName) {
10843
10851
  const value = rawMaxHops ?? fallback;
@@ -10881,7 +10889,7 @@ function assertEdgeKinds(edges) {
10881
10889
  }
10882
10890
  function compileNodeKindSeedFilter(nodeKinds) {
10883
10891
  if (nodeKinds === void 0) return chunkU5W4LKZV_cjs.sql`TRUE`;
10884
- return chunk7V2FGGI2_cjs.compileKindFilter(chunkU5W4LKZV_cjs.sql.raw("n.kind"), nodeKinds);
10892
+ return chunkJ7LXTUTP_cjs.compileKindFilter(chunkU5W4LKZV_cjs.sql.raw("n.kind"), nodeKinds);
10885
10893
  }
10886
10894
  function normalizeNodeKinds(nodeKinds) {
10887
10895
  if (nodeKinds === void 0) return void 0;
@@ -10919,7 +10927,7 @@ async function executeDegree(ctx, nodeId, options = {}) {
10919
10927
  compileDirectionFilter(ctx, direction, nodeId, schema.nodesTable)
10920
10928
  ];
10921
10929
  if (options.edges !== void 0) {
10922
- whereClauses.push(chunk7V2FGGI2_cjs.compileKindFilter(chunkU5W4LKZV_cjs.sql.raw("kind"), options.edges));
10930
+ whereClauses.push(chunkJ7LXTUTP_cjs.compileKindFilter(chunkU5W4LKZV_cjs.sql.raw("kind"), options.edges));
10923
10931
  }
10924
10932
  const countExpr = direction === "both" ? chunkU5W4LKZV_cjs.sql`COUNT(DISTINCT id)` : chunkU5W4LKZV_cjs.sql`COUNT(*)`;
10925
10933
  const query = chunkU5W4LKZV_cjs.sql`SELECT ${countExpr} AS count FROM ${schema.edgesTable} WHERE ${chunkU5W4LKZV_cjs.sql.join(whereClauses, chunkU5W4LKZV_cjs.sql` AND `)}`;
@@ -11017,11 +11025,11 @@ async function runIterativeGraphOperation(ctx, options, plan) {
11017
11025
  const transactionOptions = {
11018
11026
  isolationLevel: "repeatable_read",
11019
11027
  accessMode: "read_only",
11020
- temporaryWrites: chunk3PRKZW6D_cjs.INTERNAL_TEMPORARY_WRITES
11028
+ temporaryWrites: chunkEKFUG4G7_cjs.INTERNAL_TEMPORARY_WRITES
11021
11029
  };
11022
11030
  return ctx.backend.transaction(async (backend) => {
11023
11031
  const temporaryBackend = requireTemporaryStatements(backend);
11024
- const runId = chunk7V2FGGI2_cjs.generateId();
11032
+ const runId = chunkJ7LXTUTP_cjs.generateId();
11025
11033
  const workingTable = chunkU5W4LKZV_cjs.sql.identifier(
11026
11034
  `typegraph_iterative_${runId.replaceAll("-", "_")}`
11027
11035
  );
@@ -11119,7 +11127,7 @@ async function cleanupWorkingTables(context, cleanup, operationFailure) {
11119
11127
  async function fetchVisibleWorkingNodes(operation, nodeIds) {
11120
11128
  const nodes = /* @__PURE__ */ new Map();
11121
11129
  for (const chunk2 of chunkValues(nodeIds, operation.maxWorkingSetSize)) {
11122
- const query = chunkU5W4LKZV_cjs.sql`SELECT n.id, n.kind FROM ${operation.schema.nodesTable} n WHERE n.graph_id = ${operation.ctx.graphId} AND n.id IN (${chunk7V2FGGI2_cjs.sqlValueList(chunk2)}) AND ${operation.nodeTemporalFilter}`;
11130
+ const query = chunkU5W4LKZV_cjs.sql`SELECT n.id, n.kind FROM ${operation.schema.nodesTable} n WHERE n.graph_id = ${operation.ctx.graphId} AND n.id IN (${chunkJ7LXTUTP_cjs.sqlValueList(chunk2)}) AND ${operation.nodeTemporalFilter}`;
11123
11131
  const rows = await operation.backend.execute(
11124
11132
  chunkU5W4LKZV_cjs.asCompiledRowsSql(query)
11125
11133
  );
@@ -11266,7 +11274,7 @@ function compileDirectionalExpansion(operation, workingRelation, sourceFilter, e
11266
11274
  return chunkU5W4LKZV_cjs.sql`SELECT expanded.source_id, expanded.source_kind, n.id AS target_id, n.kind AS target_kind${weightColumn} FROM (${edgeExpansion}) expanded JOIN ${operation.schema.nodesTable} n ON n.graph_id = ${operation.ctx.graphId} AND n.id = expanded.target_id AND n.kind = expanded.target_kind WHERE ${operation.nodeTemporalFilter}`;
11267
11275
  }
11268
11276
  function compileDirectionalEdgeExpansion(operation, workingRelation, sourceFilter, edgeKinds, joinField, joinKindField, targetField, targetKindField, sourceProjection) {
11269
- const edgeKindFilter = chunk7V2FGGI2_cjs.compileKindFilter(chunkU5W4LKZV_cjs.sql.raw("e.kind"), edgeKinds);
11277
+ const edgeKindFilter = chunkJ7LXTUTP_cjs.compileKindFilter(chunkU5W4LKZV_cjs.sql.raw("e.kind"), edgeKinds);
11270
11278
  const weightColumn = operation.weightExpression === void 0 ? chunkU5W4LKZV_cjs.sql`` : chunkU5W4LKZV_cjs.sql`, ${operation.weightExpression} AS weight`;
11271
11279
  const sourceColumns = sourceProjection === void 0 ? chunkU5W4LKZV_cjs.sql`` : chunkU5W4LKZV_cjs.sql`, ${sourceProjection}`;
11272
11280
  return chunkU5W4LKZV_cjs.sql`SELECT w.node_id AS source_id, w.node_kind AS source_kind${sourceColumns}, e.${chunkU5W4LKZV_cjs.sql.raw(targetField)} AS target_id, e.${chunkU5W4LKZV_cjs.sql.raw(targetKindField)} AS target_kind${weightColumn} FROM ${workingRelation} w JOIN ${operation.schema.edgesTable} e ON e.${chunkU5W4LKZV_cjs.sql.raw(joinField)} = w.node_id AND e.${chunkU5W4LKZV_cjs.sql.raw(joinKindField)} = w.node_kind AND e.graph_id = ${operation.ctx.graphId} WHERE ${sourceFilter} AND ${edgeKindFilter} AND ${operation.edgeTemporalFilter}`;
@@ -11280,15 +11288,15 @@ function chunkValues(values, chunkSize) {
11280
11288
  }
11281
11289
  function createOperation(ctx, options, backend) {
11282
11290
  const temporal = resolveTemporalOptions(ctx, options);
11283
- const currentTimestamp = chunk7V2FGGI2_cjs.currentReadInstant();
11284
- const nodeTemporalFilter = chunk7V2FGGI2_cjs.compileTemporalFilter({
11291
+ const currentTimestamp = chunkJ7LXTUTP_cjs.currentReadInstant();
11292
+ const nodeTemporalFilter = chunkJ7LXTUTP_cjs.compileTemporalFilter({
11285
11293
  mode: temporal.temporalMode,
11286
11294
  ...temporal.asOf === void 0 ? {} : { asOf: temporal.asOf },
11287
11295
  ...temporal.recordedAsOf === void 0 ? {} : { recordedAsOf: temporal.recordedAsOf },
11288
11296
  tableAlias: "n",
11289
11297
  currentTimestamp
11290
11298
  });
11291
- const edgeTemporalFilter = chunk7V2FGGI2_cjs.compileTemporalFilter({
11299
+ const edgeTemporalFilter = chunkJ7LXTUTP_cjs.compileTemporalFilter({
11292
11300
  mode: temporal.temporalMode,
11293
11301
  ...temporal.asOf === void 0 ? {} : { asOf: temporal.asOf },
11294
11302
  ...temporal.recordedAsOf === void 0 ? {} : { recordedAsOf: temporal.recordedAsOf },
@@ -12914,7 +12922,7 @@ async function assertValidEdgeWeights(operation, weightProperty, defaultWeight)
12914
12922
  const negativeViolation = chunkU5W4LKZV_cjs.sql`audited.is_number = 1 AND audited.weight_number < 0`;
12915
12923
  const outOfRangeViolation = chunkU5W4LKZV_cjs.sql`audited.is_number = 1 AND (ABS(audited.weight_number) > CAST(${MAX_EDGE_WEIGHT} AS NUMERIC) OR (audited.weight_number <> 0 AND ABS(audited.weight_number) < CAST(${MIN_EDGE_WEIGHT} AS NUMERIC)))`;
12916
12924
  for (const edgeKinds of operation.edgeKindChunks) {
12917
- const edgeKindFilter = chunk7V2FGGI2_cjs.compileKindFilter(chunkU5W4LKZV_cjs.sql.raw("e.kind"), edgeKinds);
12925
+ const edgeKindFilter = chunkJ7LXTUTP_cjs.compileKindFilter(chunkU5W4LKZV_cjs.sql.raw("e.kind"), edgeKinds);
12918
12926
  const rows = await operation.backend.execute(
12919
12927
  chunkU5W4LKZV_cjs.asCompiledRowsSql(chunkU5W4LKZV_cjs.sql`
12920
12928
  SELECT audited.edge_id, audited.edge_kind, audited.weight_text,
@@ -13338,7 +13346,7 @@ function createGraphAlgorithms(params) {
13338
13346
  graph: params.graph,
13339
13347
  registry: params.registry,
13340
13348
  backend: params.backend,
13341
- dialect: chunkOVUUTCPJ_cjs.getDialect(params.backend.dialect),
13349
+ dialect: chunkJXUTCSXX_cjs.getDialect(params.backend.dialect),
13342
13350
  schema: params.schema ?? chunkCPEL3YIR_cjs.createSqlSchema(params.backend.tableNames),
13343
13351
  recordedReadBinding: params.recordedReadBinding,
13344
13352
  defaultTemporalMode: params.defaultTemporalMode
@@ -13592,7 +13600,7 @@ function createEdgeCollection(config) {
13592
13600
  },
13593
13601
  async getByIds(ids, options) {
13594
13602
  if (ids.length === 0) return [];
13595
- const rowsById = await chunk7V2FGGI2_cjs.getEdgeRowsByIds(backend, graphId, ids);
13603
+ const rowsById = await chunkJ7LXTUTP_cjs.getEdgeRowsByIds(backend, graphId, ids);
13596
13604
  const matches = temporalRowMatcher(options);
13597
13605
  return ids.map((id) => {
13598
13606
  const row = rowsById.get(id);
@@ -13700,7 +13708,7 @@ function createEdgeCollection(config) {
13700
13708
  if (items.length === 0) return [];
13701
13709
  const upsertAll = async (target) => {
13702
13710
  const ids = items.map((item) => item.id);
13703
- const existingMap = await chunk7V2FGGI2_cjs.getEdgeRowsByIds(target, graphId, ids);
13711
+ const existingMap = await chunkJ7LXTUTP_cjs.getEdgeRowsByIds(target, graphId, ids);
13704
13712
  const results2 = Array.from({ length: items.length });
13705
13713
  const toCreate = [];
13706
13714
  const toUpdate = [];
@@ -13728,7 +13736,7 @@ function createEdgeCollection(config) {
13728
13736
  const deletedAt = pendingEntry === void 0 ? chunk764JHTLT_cjs.requireDefined(original).deleted_at : void 0;
13729
13737
  let dirty;
13730
13738
  if (config.upsertDirtyCheck !== void 0) {
13731
- const currentProps = pendingEntry?.props ?? chunk3PRKZW6D_cjs.rowPropsToObject(chunk764JHTLT_cjs.requireDefined(original).props);
13739
+ const currentProps = pendingEntry?.props ?? chunkEKFUG4G7_cjs.rowPropsToObject(chunk764JHTLT_cjs.requireDefined(original).props);
13732
13740
  try {
13733
13741
  dirty = config.upsertDirtyCheck(
13734
13742
  original?.kind ?? kind,
@@ -13913,6 +13921,35 @@ function narrowNode(node) {
13913
13921
  function narrowNodes(nodes) {
13914
13922
  return nodes;
13915
13923
  }
13924
+ function createFieldMember(accessor) {
13925
+ const selectField = (name) => accessor.field(name);
13926
+ return new Proxy(selectField, {
13927
+ get(target, property, receiver) {
13928
+ if (Reflect.has(target, property)) {
13929
+ const ownProperty = Reflect.get(target, property, receiver);
13930
+ return ownProperty;
13931
+ }
13932
+ return accessor.field("field")[property];
13933
+ }
13934
+ });
13935
+ }
13936
+ function evaluateNodePredicate(accessor, predicate) {
13937
+ const collectionAccessor = new Proxy(
13938
+ {},
13939
+ {
13940
+ get(_target, property) {
13941
+ if (typeof property === "symbol") return;
13942
+ if (property === "then" || property === "toJSON") return;
13943
+ if (property === "id" || property === "kind" || property === "$fulltext") {
13944
+ return accessor[property];
13945
+ }
13946
+ if (property === "field") return createFieldMember(accessor);
13947
+ return accessor.field(property);
13948
+ }
13949
+ }
13950
+ );
13951
+ return predicate(collectionAccessor);
13952
+ }
13916
13953
  function buildCreateInput(kind, props, options) {
13917
13954
  const input = { kind, props };
13918
13955
  if (options?.id !== void 0) input.id = options.id;
@@ -13939,6 +13976,7 @@ function createNodeCollection(config) {
13939
13976
  executeCreateNoReturnBatch: executeNodeCreateNoReturnBatch2,
13940
13977
  executeCreateBatch: executeNodeCreateBatch2,
13941
13978
  executeUpdate: executeNodeUpdate2,
13979
+ executeUpdateWhere: executeNodeUpdateWhere2,
13942
13980
  executeUpsertUpdate: executeNodeUpsertUpdate2,
13943
13981
  executeDelete: executeNodeDelete2,
13944
13982
  executeHardDelete: executeNodeHardDelete2,
@@ -13969,7 +14007,7 @@ function createNodeCollection(config) {
13969
14007
  },
13970
14008
  async getByIds(ids, options) {
13971
14009
  if (ids.length === 0) return [];
13972
- const rowsById = await chunk7V2FGGI2_cjs.getNodeRowsByIds(backend, graphId, kind, ids);
14010
+ const rowsById = await chunkJ7LXTUTP_cjs.getNodeRowsByIds(backend, graphId, kind, ids);
13973
14011
  const matches = temporalRowMatcher(options);
13974
14012
  return ids.map((id) => {
13975
14013
  const row = rowsById.get(id);
@@ -13985,6 +14023,85 @@ function createNodeCollection(config) {
13985
14023
  );
13986
14024
  return narrowNode(result);
13987
14025
  },
14026
+ async updateWhere(params) {
14027
+ if (createQuery === void 0) {
14028
+ throw new chunkC4F7VJ5D_cjs.ConfigurationError(
14029
+ `store.nodes.${kind}.updateWhere() requires a query-capable store`,
14030
+ { kind, operation: "updateWhere" }
14031
+ );
14032
+ }
14033
+ const exists = params.exists ?? [];
14034
+ if (params.where === void 0 && exists.length === 0 && !params.all) {
14035
+ throw new chunkC4F7VJ5D_cjs.ConfigurationError(
14036
+ `store.nodes.${kind}.updateWhere() requires where, exists, or explicit all: true`,
14037
+ { kind, operation: "updateWhere" }
14038
+ );
14039
+ }
14040
+ const rootAlias = "update_candidate";
14041
+ const readInstant = chunkZTAJL4DT_cjs.nowIso();
14042
+ let base = createQuery().fromDynamic(kind, rootAlias).temporal("asOf", readInstant);
14043
+ const where = params.where;
14044
+ if (where !== void 0) {
14045
+ base = base.whereNode(
14046
+ rootAlias,
14047
+ (accessor) => evaluateNodePredicate(accessor, where)
14048
+ );
14049
+ }
14050
+ const candidateIdColumn = `${rootAlias}_id`;
14051
+ const compiledBranches = [];
14052
+ for (const [index, relation] of exists.entries()) {
14053
+ const edgeAlias = `update_edge_${index}`;
14054
+ const relatedAlias = `update_related_${index}`;
14055
+ const relationRoot = createQuery().fromDynamic(kind, rootAlias).temporal("asOf", readInstant);
14056
+ let traversal = relationRoot.traverseDynamic(
14057
+ relation.edgeKind,
14058
+ edgeAlias,
14059
+ {
14060
+ direction: relation.direction,
14061
+ expand: "none"
14062
+ }
14063
+ );
14064
+ if (relation.whereEdge !== void 0) {
14065
+ traversal = traversal.whereEdge(edgeAlias, relation.whereEdge);
14066
+ }
14067
+ let related = traversal.toDynamic(relation.relatedKind, relatedAlias);
14068
+ if (relation.whereRelated !== void 0) {
14069
+ related = related.whereNode(relatedAlias, relation.whereRelated);
14070
+ }
14071
+ compiledBranches.push(
14072
+ related.select(
14073
+ (ctx) => ctx[rootAlias]?.id
14074
+ ).compile()
14075
+ );
14076
+ }
14077
+ compiledBranches.unshift(
14078
+ base.select((ctx) => ctx[rootAlias]?.id).compile()
14079
+ );
14080
+ const projectCandidateId = (branch, index) => chunkU5W4LKZV_cjs.sql`
14081
+ SELECT ${chunkU5W4LKZV_cjs.sql.identifier(candidateIdColumn)}
14082
+ FROM (${branch}) AS ${chunkU5W4LKZV_cjs.sql.identifier(`update_branch_${index}`)}
14083
+ `;
14084
+ let combinedCandidates = projectCandidateId(
14085
+ chunk764JHTLT_cjs.requireDefined(compiledBranches[0]),
14086
+ 0
14087
+ );
14088
+ for (let index = 1; index < compiledBranches.length; index++) {
14089
+ combinedCandidates = chunkU5W4LKZV_cjs.sql`${combinedCandidates} INTERSECT ${projectCandidateId(
14090
+ chunk764JHTLT_cjs.requireDefined(compiledBranches[index]),
14091
+ index
14092
+ )}`;
14093
+ }
14094
+ const compiledCandidates = chunkU5W4LKZV_cjs.asCompiledSelectSql(combinedCandidates);
14095
+ const result = await executeNodeUpdateWhere2(
14096
+ kind,
14097
+ params.patch,
14098
+ compiledCandidates,
14099
+ candidateIdColumn,
14100
+ backend
14101
+ );
14102
+ await config.maybeRefreshStatisticsAfterBulk?.(result.affectedCount);
14103
+ return result;
14104
+ },
13988
14105
  async delete(id) {
13989
14106
  await executeNodeDelete2(kind, id, backend);
13990
14107
  },
@@ -14036,7 +14153,7 @@ function createNodeCollection(config) {
14036
14153
  const runDirtyCheck = config.upsertDirtyCheck && (() => chunk764JHTLT_cjs.requireDefined(config.upsertDirtyCheck)(
14037
14154
  kind,
14038
14155
  id,
14039
- chunk3PRKZW6D_cjs.rowPropsToObject(existing.props),
14156
+ chunkEKFUG4G7_cjs.rowPropsToObject(existing.props),
14040
14157
  data
14041
14158
  ));
14042
14159
  if (shouldCoalesceUpsert(existing, options, runDirtyCheck)) {
@@ -14106,7 +14223,7 @@ function createNodeCollection(config) {
14106
14223
  const deletedAt = pendingEntry === void 0 ? chunk764JHTLT_cjs.requireDefined(original).deleted_at : void 0;
14107
14224
  let dirty;
14108
14225
  if (config.upsertDirtyCheck !== void 0) {
14109
- const currentProps = pendingEntry?.props ?? chunk3PRKZW6D_cjs.rowPropsToObject(chunk764JHTLT_cjs.requireDefined(original).props);
14226
+ const currentProps = pendingEntry?.props ?? chunkEKFUG4G7_cjs.rowPropsToObject(chunk764JHTLT_cjs.requireDefined(original).props);
14110
14227
  try {
14111
14228
  dirty = config.upsertDirtyCheck(
14112
14229
  kind,
@@ -14335,10 +14452,12 @@ var HISTORY_STORE_BACKEND_KEYS = [
14335
14452
  "deleteEdge",
14336
14453
  "deleteEdgesBatch",
14337
14454
  "deleteEmbedding",
14455
+ "deleteEmbeddingBatch",
14338
14456
  "deleteFulltext",
14339
14457
  "deleteFulltextBatch",
14340
14458
  "deleteNode",
14341
14459
  "deleteUnique",
14460
+ "hardDeleteUniquesByNodeIds",
14342
14461
  "deleteVectorSlotContribution",
14343
14462
  "dialect",
14344
14463
  "dropVectorIndex",
@@ -14356,6 +14475,7 @@ var HISTORY_STORE_BACKEND_KEYS = [
14356
14475
  "executeTemporaryStatement",
14357
14476
  "findEdgesByKind",
14358
14477
  "findEdgesByEndpointSet",
14478
+ "findEdgesByHeterogeneousEndpointSet",
14359
14479
  "findEdgesConnectedTo",
14360
14480
  "findNodesByKind",
14361
14481
  "fulltextSearch",
@@ -14375,6 +14495,7 @@ var HISTORY_STORE_BACKEND_KEYS = [
14375
14495
  "hardDeleteEdge",
14376
14496
  "hardDeleteEdgesBatch",
14377
14497
  "hardDeleteNode",
14498
+ "hardDeleteUniquesByNodeIds",
14378
14499
  "hybridSearch",
14379
14500
  "insertEdge",
14380
14501
  "insertEdgeNoReturn",
@@ -14396,6 +14517,7 @@ var HISTORY_STORE_BACKEND_KEYS = [
14396
14517
  "tableNames",
14397
14518
  "updateEdge",
14398
14519
  "updateNode",
14520
+ "updateNodeSet",
14399
14521
  "upsertEmbedding",
14400
14522
  "upsertEmbeddingBatch",
14401
14523
  "upsertFulltext",
@@ -14406,14 +14528,14 @@ var HISTORY_STORE_BACKEND_KEYS = [
14406
14528
  ];
14407
14529
  function createHistoryStoreBackendProjection(backend) {
14408
14530
  return Object.freeze(
14409
- chunk7V2FGGI2_cjs.projectBackendMembers(backend, HISTORY_STORE_BACKEND_KEYS)
14531
+ chunkJ7LXTUTP_cjs.projectBackendMembers(backend, HISTORY_STORE_BACKEND_KEYS)
14410
14532
  );
14411
14533
  }
14412
14534
 
14413
14535
  // src/store/introspect.ts
14414
14536
  function introspectSchema(graph, context) {
14415
14537
  const extension = graph.extension;
14416
- const { nodes: runtimeNodeNames, edges: runtimeEdgeNames } = chunk2VLBGQBY_cjs.extensionKindNames(extension);
14538
+ const { nodes: runtimeNodeNames, edges: runtimeEdgeNames } = chunkZI6VQSZA_cjs.extensionKindNames(extension);
14417
14539
  const deprecated = graph.deprecatedKinds;
14418
14540
  const kinds = [];
14419
14541
  for (const [name, registration] of Object.entries(graph.nodes)) {
@@ -14424,7 +14546,7 @@ function introspectSchema(graph, context) {
14424
14546
  description: reg.type.description,
14425
14547
  annotations: reg.type.annotations,
14426
14548
  deprecated: deprecated.has(name),
14427
- properties: chunk2VLBGQBY_cjs.serializeSchemaProperties(reg.type.schema),
14549
+ properties: chunkZI6VQSZA_cjs.serializeSchemaProperties(reg.type.schema),
14428
14550
  unique: (reg.unique ?? []).map((constraint) => ({
14429
14551
  name: constraint.name,
14430
14552
  fields: [...constraint.fields],
@@ -14445,17 +14567,17 @@ function introspectSchema(graph, context) {
14445
14567
  to: reg.to.map((entry2) => entry2.kind),
14446
14568
  cardinality: reg.cardinality ?? "many",
14447
14569
  endpointExistence: reg.endpointExistence ?? "notDeleted",
14448
- properties: chunk2VLBGQBY_cjs.serializeSchemaProperties(edgeType.schema),
14570
+ properties: chunkZI6VQSZA_cjs.serializeSchemaProperties(edgeType.schema),
14449
14571
  annotations: edgeType.annotations,
14450
14572
  deprecated: deprecated.has(name)
14451
14573
  });
14452
14574
  }
14453
- const runtimeOntologyKeys = chunk2VLBGQBY_cjs.buildGraphExtensionOntologyKeySet(extension);
14575
+ const runtimeOntologyKeys = chunkZI6VQSZA_cjs.buildGraphExtensionOntologyKeySet(extension);
14454
14576
  const ontology = graph.ontology.map((relation) => ({
14455
14577
  metaEdge: relation.metaEdge.name,
14456
- from: chunkEE7N5XXQ_cjs.getTypeName(relation.from),
14457
- to: chunkEE7N5XXQ_cjs.getTypeName(relation.to),
14458
- origin: runtimeOntologyKeys.has(chunk2VLBGQBY_cjs.compileTimeOntologyKey(relation)) ? "runtime" : "compile-time"
14578
+ from: chunkBNS75YNF_cjs.getTypeName(relation.from),
14579
+ to: chunkBNS75YNF_cjs.getTypeName(relation.to),
14580
+ origin: runtimeOntologyKeys.has(chunkZI6VQSZA_cjs.compileTimeOntologyKey(relation)) ? "runtime" : "compile-time"
14459
14581
  }));
14460
14582
  return {
14461
14583
  graphId: context.graphId,
@@ -14581,7 +14703,7 @@ async function materializeIndexes(context, options = {}) {
14581
14703
  backend,
14582
14704
  relationalPhysicalNames
14583
14705
  );
14584
- const reservedSystemNames = chunkGFRGG2US_cjs.resolveSystemIndexNames(backend.tableNames);
14706
+ const reservedSystemNames = chunk5GAONX5G_cjs.resolveSystemIndexNames(backend.tableNames);
14585
14707
  const materializeEntry = (declaration) => {
14586
14708
  if (declaration.entity !== "vector" && reservedSystemNames.has(declaration.name)) {
14587
14709
  return Promise.resolve(
@@ -14655,7 +14777,7 @@ async function materializeRelationalIndex(declaration, backend, dialect, ddlOpti
14655
14777
  reason: `Index method "${declaration.method}" requires PostgreSQL (expression GIN${declaration.method === "trigram" ? " + pg_trgm" : ""}); SQLite serves substring search via FTS5 fulltext instead.`
14656
14778
  };
14657
14779
  }
14658
- const ddl = chunkIIT5K7SK_cjs.generateIndexDDL(declaration, dialect, ddlOptions);
14780
+ const ddl = chunkQR24DJDF_cjs.generateIndexDDL(declaration, dialect, ddlOptions);
14659
14781
  const targetTable = declaration.entity === "node" ? ddlOptions.nodesTableName ?? "typegraph_nodes" : ddlOptions.edgesTableName ?? "typegraph_edges";
14660
14782
  const signature = await computeIndexSignature(
14661
14783
  dialect,
@@ -14959,7 +15081,7 @@ async function preloadExistingTables(backend, tableNames) {
14959
15081
  chunkU5W4LKZV_cjs.asCompiledRowsSql(chunkU5W4LKZV_cjs.sql`
14960
15082
  SELECT c.relname AS name
14961
15083
  FROM pg_class c
14962
- WHERE c.relname IN (${chunk7V2FGGI2_cjs.sqlValueList(tableNames)})
15084
+ WHERE c.relname IN (${chunkJ7LXTUTP_cjs.sqlValueList(tableNames)})
14963
15085
  AND c.relkind IN ('r', 'p')
14964
15086
  AND pg_catalog.pg_table_is_visible(c.oid)
14965
15087
  `)
@@ -14972,7 +15094,7 @@ async function preloadExistingTables(backend, tableNames) {
14972
15094
  SELECT name
14973
15095
  FROM sqlite_master
14974
15096
  WHERE type = 'table'
14975
- AND name IN (${chunk7V2FGGI2_cjs.sqlValueList(tableNames)})
15097
+ AND name IN (${chunkJ7LXTUTP_cjs.sqlValueList(tableNames)})
14976
15098
  `)
14977
15099
  );
14978
15100
  return new Set(rows.map((row) => row.name));
@@ -14993,7 +15115,7 @@ async function preloadPhysicalIndexStates(backend, physicalIndexNames) {
14993
15115
  SELECT c.relname AS name, i.indisvalid AS valid
14994
15116
  FROM pg_class c
14995
15117
  JOIN pg_index i ON i.indexrelid = c.oid
14996
- WHERE c.relname IN (${chunk7V2FGGI2_cjs.sqlValueList(physicalIndexNames)})
15118
+ WHERE c.relname IN (${chunkJ7LXTUTP_cjs.sqlValueList(physicalIndexNames)})
14997
15119
  AND pg_catalog.pg_table_is_visible(c.oid)
14998
15120
  `)
14999
15121
  );
@@ -15006,7 +15128,7 @@ async function preloadPhysicalIndexStates(backend, physicalIndexNames) {
15006
15128
  SELECT name
15007
15129
  FROM sqlite_master
15008
15130
  WHERE type = 'index'
15009
- AND name IN (${chunk7V2FGGI2_cjs.sqlValueList(physicalIndexNames)})
15131
+ AND name IN (${chunkJ7LXTUTP_cjs.sqlValueList(physicalIndexNames)})
15010
15132
  `)
15011
15133
  );
15012
15134
  for (const row of rows) valid.add(row.name);
@@ -15096,15 +15218,15 @@ async function materializeSystemIndexes(context, options = {}) {
15096
15218
  backend.ensureIndexMaterializationsTable
15097
15219
  );
15098
15220
  const concurrent = INDEX_DIALECT_BEHAVIOR[backend.dialect].concurrentBuilds;
15099
- const candidates = chunkGFRGG2US_cjs.SYSTEM_INDEX_DECLARATIONS.map((declaration) => {
15100
- const physicalTable = chunkGFRGG2US_cjs.resolveSystemIndexTableName(
15221
+ const candidates = chunk5GAONX5G_cjs.SYSTEM_INDEX_DECLARATIONS.map((declaration) => {
15222
+ const physicalTable = chunk5GAONX5G_cjs.resolveSystemIndexTableName(
15101
15223
  declaration.table,
15102
15224
  backend.tableNames
15103
15225
  );
15104
15226
  return {
15105
15227
  declaration,
15106
15228
  physicalTable,
15107
- name: chunkGFRGG2US_cjs.systemIndexName(physicalTable, declaration.suffix)
15229
+ name: chunk5GAONX5G_cjs.systemIndexName(physicalTable, declaration.suffix)
15108
15230
  };
15109
15231
  });
15110
15232
  const statusKeys = candidates.map((candidate) => candidate.name);
@@ -15153,7 +15275,7 @@ async function materializeSystemIndexes(context, options = {}) {
15153
15275
  candidate.physicalTable,
15154
15276
  candidate.declaration
15155
15277
  );
15156
- const ddl = chunkGFRGG2US_cjs.generateSystemIndexDDL(
15278
+ const ddl = chunk5GAONX5G_cjs.generateSystemIndexDDL(
15157
15279
  candidate.declaration,
15158
15280
  candidate.physicalTable,
15159
15281
  { concurrent }
@@ -15194,7 +15316,7 @@ async function computeIndexSignature(dialect, targetTableName, declaration) {
15194
15316
  const hashable = {
15195
15317
  dialect,
15196
15318
  targetTableName,
15197
- declaration: chunk2VLBGQBY_cjs.serializeIndexDeclaration(declaration)
15319
+ declaration: chunkZI6VQSZA_cjs.serializeIndexDeclaration(declaration)
15198
15320
  };
15199
15321
  const json = JSON.stringify(hashable, chunkACSVZPK7_cjs.sortedReplacer);
15200
15322
  return chunkZY4GXIVN_cjs.sha256Hex(json, 16);
@@ -15216,7 +15338,7 @@ async function materializeRemovals(context, options = {}) {
15216
15338
  await ensureFocusedStatusTable(backend, backend.ensureKindRemovalsTable);
15217
15339
  await reconcilePendingRemovals(context);
15218
15340
  const activeRow = await backend.getActiveSchema(graphId);
15219
- const activeSchema = activeRow === void 0 ? void 0 : chunk2VLBGQBY_cjs.parseSerializedSchema(activeRow.schema_doc);
15341
+ const activeSchema = activeRow === void 0 ? void 0 : chunkZI6VQSZA_cjs.parseSerializedSchema(activeRow.schema_doc);
15220
15342
  const reclaimedVectorFields = await reclaimRemovedVectorFieldTables(
15221
15343
  context,
15222
15344
  activeRow
@@ -15283,14 +15405,14 @@ async function reconcilePendingRemovals(context) {
15283
15405
  const reconciliations = [];
15284
15406
  const stopAtVersion = marker ?? 1;
15285
15407
  let currentRow = activeRow;
15286
- let currentSchema = chunk2VLBGQBY_cjs.parseSerializedSchema(activeRow.schema_doc);
15408
+ let currentSchema = chunkZI6VQSZA_cjs.parseSerializedSchema(activeRow.schema_doc);
15287
15409
  while (currentRow.version > stopAtVersion) {
15288
15410
  const priorRow = await backend.getSchemaVersion(
15289
15411
  graphId,
15290
15412
  currentRow.version - 1
15291
15413
  );
15292
15414
  if (priorRow === void 0) break;
15293
- const priorSchema = chunk2VLBGQBY_cjs.parseSerializedSchema(priorRow.schema_doc);
15415
+ const priorSchema = chunkZI6VQSZA_cjs.parseSerializedSchema(priorRow.schema_doc);
15294
15416
  for (const entity of ENTITY_KINDS) {
15295
15417
  const priorEntries = priorSchema[entity === "node" ? "nodes" : "edges"];
15296
15418
  const currentEntries = currentSchema[entity === "node" ? "nodes" : "edges"];
@@ -15355,7 +15477,7 @@ async function materializeOne2(row, ctx) {
15355
15477
  ctx.graphId,
15356
15478
  async (target) => {
15357
15479
  const activeRow = await target.getActiveSchema(ctx.graphId);
15358
- const activeSchema = activeRow === void 0 ? void 0 : chunk2VLBGQBY_cjs.parseSerializedSchema(activeRow.schema_doc);
15480
+ const activeSchema = activeRow === void 0 ? void 0 : chunkZI6VQSZA_cjs.parseSerializedSchema(activeRow.schema_doc);
15359
15481
  if (liveKindNamesFrom(activeSchema)[row.entity].has(row.kindName)) {
15360
15482
  return "skipped";
15361
15483
  }
@@ -15425,7 +15547,7 @@ async function closeRecordedAndDeleteLiveRows(ctx, row, target) {
15425
15547
  await executeDeleteStatements(target, deleteStatements);
15426
15548
  return;
15427
15549
  }
15428
- await chunk7V2FGGI2_cjs.closeRecordedHardDeletedKind(
15550
+ await chunkJ7LXTUTP_cjs.closeRecordedHardDeletedKind(
15429
15551
  target,
15430
15552
  recordedSchema,
15431
15553
  ctx.graphId,
@@ -15471,7 +15593,7 @@ async function dropVectorSlotStorage(strategy, executeDdl, slot) {
15471
15593
  await executeDdl(ddl);
15472
15594
  }
15473
15595
  } catch (error) {
15474
- if (!chunkWBUFJ7BS_cjs.isMissingTableError(error)) throw error;
15596
+ if (!chunkJQXSZHF2_cjs.isMissingTableError(error)) throw error;
15475
15597
  }
15476
15598
  }
15477
15599
  async function resolveRemovedKindEmbeddingSlots(backend, row) {
@@ -15479,7 +15601,7 @@ async function resolveRemovedKindEmbeddingSlots(backend, row) {
15479
15601
  if (priorVersion < 1) return [];
15480
15602
  const priorRow = await backend.getSchemaVersion(row.graphId, priorVersion);
15481
15603
  if (priorRow === void 0) return [];
15482
- const priorSchema = chunk2VLBGQBY_cjs.parseSerializedSchema(priorRow.schema_doc);
15604
+ const priorSchema = chunkZI6VQSZA_cjs.parseSerializedSchema(priorRow.schema_doc);
15483
15605
  const slots = /* @__PURE__ */ new Map();
15484
15606
  for (const declaration of priorSchema.indexes ?? []) {
15485
15607
  if (declaration.entity === "vector" && declaration.kind === row.kindName) {
@@ -15516,14 +15638,14 @@ async function reclaimRemovedVectorFieldTables(context, activeRow) {
15516
15638
  let perBackend = reclaimCache.get(backend);
15517
15639
  const cached = perBackend?.get(cacheKey);
15518
15640
  if (cached !== void 0) return cached;
15519
- const activeSchema = chunk2VLBGQBY_cjs.parseSerializedSchema(activeRow.schema_doc);
15641
+ const activeSchema = chunkZI6VQSZA_cjs.parseSerializedSchema(activeRow.schema_doc);
15520
15642
  const activeVectorFields = vectorFieldKeysFrom(activeSchema);
15521
15643
  const survivingKinds = new Set(Object.keys(activeSchema.nodes));
15522
15644
  const historical = /* @__PURE__ */ new Map();
15523
15645
  for (let version = activeRow.version - 1; version >= 1; version -= 1) {
15524
15646
  const priorRow = await backend.getSchemaVersion(graphId, version);
15525
15647
  if (priorRow === void 0) continue;
15526
- const priorSchema = chunk2VLBGQBY_cjs.parseSerializedSchema(priorRow.schema_doc);
15648
+ const priorSchema = chunkZI6VQSZA_cjs.parseSerializedSchema(priorRow.schema_doc);
15527
15649
  for (const declaration of priorSchema.indexes ?? []) {
15528
15650
  if (declaration.entity !== "vector") continue;
15529
15651
  const key = vectorFieldKey(declaration.kind, declaration.fieldPath);
@@ -15561,7 +15683,7 @@ async function reclaimRemovedVectorFieldTables(context, activeRow) {
15561
15683
  async (target) => {
15562
15684
  const lockedActiveRow = await target.getActiveSchema(graphId);
15563
15685
  if (lockedActiveRow === void 0) return false;
15564
- const lockedActiveSchema = chunk2VLBGQBY_cjs.parseSerializedSchema(
15686
+ const lockedActiveSchema = chunkZI6VQSZA_cjs.parseSerializedSchema(
15565
15687
  lockedActiveRow.schema_doc
15566
15688
  );
15567
15689
  const lockedVectorFields = vectorFieldKeysFrom(lockedActiveSchema);
@@ -15737,7 +15859,7 @@ function createEdgeBatchValidationBackend(backend) {
15737
15859
  pendingUniquePairs.add(uniqueCacheKey);
15738
15860
  }
15739
15861
  }
15740
- const validationBackend = chunk3PRKZW6D_cjs.createBackendOverlay(backend, {
15862
+ const validationBackend = chunkEKFUG4G7_cjs.createBackendOverlay(backend, {
15741
15863
  getNode: getNodeCached,
15742
15864
  countEdgesFrom: countEdgesFromCached,
15743
15865
  edgeExistsBetween: edgeExistsBetweenCached
@@ -15754,7 +15876,7 @@ async function validateAndPrepareEdgeCreate(ctx, input, id, backend) {
15754
15876
  const toKind = input.toKind;
15755
15877
  const registration = getEdgeRegistration(ctx.graph, kind);
15756
15878
  const edgeKind = registration.type;
15757
- const endpointError = chunk7V2FGGI2_cjs.validateEdgeEndpoints(
15879
+ const endpointError = chunkJ7LXTUTP_cjs.validateEdgeEndpoints(
15758
15880
  kind,
15759
15881
  fromKind,
15760
15882
  toKind,
@@ -15795,7 +15917,7 @@ async function validateAndPrepareEdgeCreate(ctx, input, id, backend) {
15795
15917
  registry: ctx.registry,
15796
15918
  backend
15797
15919
  };
15798
- await chunkNCX65HBY_cjs.checkCardinalityConstraint(
15920
+ await chunkUCQ3BFSY_cjs.checkCardinalityConstraint(
15799
15921
  constraintContext,
15800
15922
  kind,
15801
15923
  cardinality,
@@ -15823,16 +15945,16 @@ async function validateAndPrepareEdgeCreate(ctx, input, id, backend) {
15823
15945
  }
15824
15946
  async function executeEdgeCreateInternal(ctx, input, backend, options) {
15825
15947
  const kind = input.kind;
15826
- const id = input.id ?? chunk7V2FGGI2_cjs.generateId();
15948
+ const id = input.id ?? chunkJ7LXTUTP_cjs.generateId();
15827
15949
  const opContext = ctx.createOperationContext("create", "edge", kind, id);
15828
- return chunkNCX65HBY_cjs.runHookedWriteOperation(ctx, opContext, backend, async (target) => {
15950
+ return chunkUCQ3BFSY_cjs.runHookedWriteOperation(ctx, opContext, backend, async (target) => {
15829
15951
  const prepared = await validateAndPrepareEdgeCreate(ctx, input, id, target);
15830
15952
  let row;
15831
15953
  {
15832
15954
  row = await target.insertEdge(prepared.insertParams);
15833
15955
  }
15834
15956
  if (row === void 0) return;
15835
- return chunkNCX65HBY_cjs.rowToEdge(row);
15957
+ return chunkUCQ3BFSY_cjs.rowToEdge(row);
15836
15958
  });
15837
15959
  }
15838
15960
  async function executeEdgeCreate(ctx, input, backend) {
@@ -15875,7 +15997,7 @@ async function prepareEdgeBatchCreates(ctx, inputs, backend) {
15875
15997
  await primeEdgeBatchValidationCache(ctx, inputs, backend, seedEndpointRow);
15876
15998
  const preparedCreates = [];
15877
15999
  for (const input of inputs) {
15878
- const id = input.id ?? chunk7V2FGGI2_cjs.generateId();
16000
+ const id = input.id ?? chunkJ7LXTUTP_cjs.generateId();
15879
16001
  const prepared = await validateAndPrepareEdgeCreate(
15880
16002
  ctx,
15881
16003
  input,
@@ -15897,30 +16019,30 @@ async function executeEdgeCreateNoReturnBatch(ctx, inputs, backend) {
15897
16019
  if (inputs.length === 0) {
15898
16020
  return;
15899
16021
  }
15900
- await chunkNCX65HBY_cjs.runInWriteTransaction(ctx, backend, async (target) => {
16022
+ await chunkUCQ3BFSY_cjs.runInWriteTransaction(ctx, backend, async (target) => {
15901
16023
  const { batchInsertParams } = await prepareEdgeBatchCreates(
15902
16024
  ctx,
15903
16025
  inputs,
15904
16026
  target
15905
16027
  );
15906
- await chunk7V2FGGI2_cjs.runInsertBatch(chunk7V2FGGI2_cjs.edgeInsertDispatch(target), batchInsertParams);
16028
+ await chunkJ7LXTUTP_cjs.runInsertBatch(chunkJ7LXTUTP_cjs.edgeInsertDispatch(target), batchInsertParams);
15907
16029
  });
15908
16030
  }
15909
16031
  async function executeEdgeCreateBatch(ctx, inputs, backend) {
15910
16032
  if (inputs.length === 0) {
15911
16033
  return [];
15912
16034
  }
15913
- return chunkNCX65HBY_cjs.runInWriteTransaction(ctx, backend, async (target) => {
16035
+ return chunkUCQ3BFSY_cjs.runInWriteTransaction(ctx, backend, async (target) => {
15914
16036
  const { batchInsertParams } = await prepareEdgeBatchCreates(
15915
16037
  ctx,
15916
16038
  inputs,
15917
16039
  target
15918
16040
  );
15919
- const rows = await chunk7V2FGGI2_cjs.runInsertBatchReturning(
15920
- chunk7V2FGGI2_cjs.edgeInsertDispatch(target),
16041
+ const rows = await chunkJ7LXTUTP_cjs.runInsertBatchReturning(
16042
+ chunkJ7LXTUTP_cjs.edgeInsertDispatch(target),
15921
16043
  batchInsertParams
15922
16044
  );
15923
- return rows.map((row) => chunkNCX65HBY_cjs.rowToEdge(row));
16045
+ return rows.map((row) => chunkUCQ3BFSY_cjs.rowToEdge(row));
15924
16046
  });
15925
16047
  }
15926
16048
  function computeEdgeUpdate(ctx, kind, id, existingProps, inputProps) {
@@ -15932,7 +16054,7 @@ function computeEdgeUpdate(ctx, kind, id, existingProps, inputProps) {
15932
16054
  );
15933
16055
  }
15934
16056
  function resolveEdgeUpdateProps(ctx, existing, inputProps) {
15935
- const existingProps = chunk3PRKZW6D_cjs.rowPropsToObject(existing.props);
16057
+ const existingProps = chunkEKFUG4G7_cjs.rowPropsToObject(existing.props);
15936
16058
  const validatedProps = computeEdgeUpdate(
15937
16059
  ctx,
15938
16060
  existing.kind,
@@ -15971,7 +16093,7 @@ async function performEdgeUpdate(ctx, input, target, options) {
15971
16093
  if (validTo !== void 0) updateParams.validTo = validTo;
15972
16094
  if (options?.clearDeleted) updateParams.clearDeleted = true;
15973
16095
  const row = await target.updateEdge(updateParams);
15974
- return chunkNCX65HBY_cjs.rowToEdge(row);
16096
+ return chunkUCQ3BFSY_cjs.rowToEdge(row);
15975
16097
  }
15976
16098
  async function executeEdgeUpdate(ctx, input, backend) {
15977
16099
  const id = input.id;
@@ -15980,7 +16102,7 @@ async function executeEdgeUpdate(ctx, input, backend) {
15980
16102
  throw new chunkC4F7VJ5D_cjs.EdgeNotFoundError("unknown", id);
15981
16103
  }
15982
16104
  const opContext = ctx.createOperationContext("update", "edge", gate.kind, id);
15983
- return chunkNCX65HBY_cjs.runHookedWriteOperation(
16105
+ return chunkUCQ3BFSY_cjs.runHookedWriteOperation(
15984
16106
  ctx,
15985
16107
  opContext,
15986
16108
  backend,
@@ -15988,7 +16110,7 @@ async function executeEdgeUpdate(ctx, input, backend) {
15988
16110
  );
15989
16111
  }
15990
16112
  async function executeEdgeUpsertUpdate(ctx, input, backend, options) {
15991
- return chunkNCX65HBY_cjs.runInWriteTransaction(
16113
+ return chunkUCQ3BFSY_cjs.runInWriteTransaction(
15992
16114
  ctx,
15993
16115
  backend,
15994
16116
  (target) => performEdgeUpdate(ctx, input, target, options)
@@ -15998,7 +16120,7 @@ async function executeEdgeDelete(ctx, id, backend) {
15998
16120
  const gate = await backend.getEdge(ctx.graphId, id);
15999
16121
  if (!gate || gate.deleted_at) return;
16000
16122
  const opContext = ctx.createOperationContext("delete", "edge", gate.kind, id);
16001
- return chunkNCX65HBY_cjs.runHookedWriteOperation(ctx, opContext, backend, async (target) => {
16123
+ return chunkUCQ3BFSY_cjs.runHookedWriteOperation(ctx, opContext, backend, async (target) => {
16002
16124
  await target.deleteEdge({
16003
16125
  graphId: ctx.graphId,
16004
16126
  id
@@ -16009,7 +16131,7 @@ async function executeEdgeHardDelete(ctx, id, backend) {
16009
16131
  const gate = await backend.getEdge(ctx.graphId, id);
16010
16132
  if (!gate) return;
16011
16133
  const opContext = ctx.createOperationContext("delete", "edge", gate.kind, id);
16012
- return chunkNCX65HBY_cjs.runHookedWriteOperation(ctx, opContext, backend, async (target) => {
16134
+ return chunkUCQ3BFSY_cjs.runHookedWriteOperation(ctx, opContext, backend, async (target) => {
16013
16135
  await target.hardDeleteEdge({
16014
16136
  graphId: ctx.graphId,
16015
16137
  id
@@ -16079,7 +16201,7 @@ function findMatchingEdge(rows, matchOn, inputProps) {
16079
16201
  let deletedRow;
16080
16202
  for (const row of rows) {
16081
16203
  if (matchOn.length > 0) {
16082
- const rowProps = chunk3PRKZW6D_cjs.rowPropsToObject(row.props);
16204
+ const rowProps = chunkEKFUG4G7_cjs.rowPropsToObject(row.props);
16083
16205
  const matches = matchOn.every(
16084
16206
  (field2) => stableStringify(rowProps[field2]) === stableStringify(inputProps[field2])
16085
16207
  );
@@ -16116,9 +16238,9 @@ async function executeEdgeFindByEndpoints(ctx, kind, fromKind, fromId, toKind, t
16116
16238
  ...options?.asOf !== void 0 && { asOf: options.asOf }
16117
16239
  });
16118
16240
  if (candidateRows.length === 0) return void 0;
16119
- if (matchOn.length === 0) return chunkNCX65HBY_cjs.rowToEdge(chunk764JHTLT_cjs.requireDefined(candidateRows[0]));
16241
+ if (matchOn.length === 0) return chunkUCQ3BFSY_cjs.rowToEdge(chunk764JHTLT_cjs.requireDefined(candidateRows[0]));
16120
16242
  const { liveRow } = findMatchingEdge(candidateRows, matchOn, props);
16121
- return liveRow === void 0 ? void 0 : chunkNCX65HBY_cjs.rowToEdge(liveRow);
16243
+ return liveRow === void 0 ? void 0 : chunkUCQ3BFSY_cjs.rowToEdge(liveRow);
16122
16244
  }
16123
16245
  async function executeEdgeGetOrCreateByEndpoints(ctx, kind, fromKind, fromId, toKind, toId, props, backend, options) {
16124
16246
  const ifExists = options?.ifExists ?? "return";
@@ -16152,7 +16274,7 @@ async function executeEdgeGetOrCreateByEndpoints(ctx, kind, fromKind, fromId, to
16152
16274
  validatedProps
16153
16275
  );
16154
16276
  if (probedLiveRow !== void 0) {
16155
- return { edge: chunkNCX65HBY_cjs.rowToEdge(probedLiveRow), action: "found" };
16277
+ return { edge: chunkUCQ3BFSY_cjs.rowToEdge(probedLiveRow), action: "found" };
16156
16278
  }
16157
16279
  }
16158
16280
  async function attempt() {
@@ -16187,7 +16309,7 @@ async function executeEdgeGetOrCreateByEndpoints(ctx, kind, fromKind, fromId, to
16187
16309
  }
16188
16310
  if (liveRow !== void 0) {
16189
16311
  if (ifExists === "return") {
16190
- return { edge: chunkNCX65HBY_cjs.rowToEdge(liveRow), action: "found" };
16312
+ return { edge: chunkUCQ3BFSY_cjs.rowToEdge(liveRow), action: "found" };
16191
16313
  }
16192
16314
  const edge2 = await executeEdgeUpsertUpdate(
16193
16315
  ctx,
@@ -16211,7 +16333,7 @@ async function executeEdgeGetOrCreateByEndpoints(ctx, kind, fromKind, fromId, to
16211
16333
  registry: ctx.registry,
16212
16334
  backend
16213
16335
  };
16214
- await chunkNCX65HBY_cjs.checkCardinalityConstraint(
16336
+ await chunkUCQ3BFSY_cjs.checkCardinalityConstraint(
16215
16337
  constraintContext,
16216
16338
  kind,
16217
16339
  cardinality,
@@ -16373,7 +16495,7 @@ async function executeEdgeBulkGetOrCreateByEndpoints(ctx, kind, items, backend,
16373
16495
  if (allFoundLive) {
16374
16496
  const found = Array.from({ length: items.length });
16375
16497
  for (const entry2 of probe.toFetch) {
16376
- found[entry2.index] = { edge: chunkNCX65HBY_cjs.rowToEdge(entry2.row), action: "found" };
16498
+ found[entry2.index] = { edge: chunkUCQ3BFSY_cjs.rowToEdge(entry2.row), action: "found" };
16377
16499
  }
16378
16500
  for (const { index, sourceIndex } of probe.duplicateOf) {
16379
16501
  found[index] = {
@@ -16384,7 +16506,7 @@ async function executeEdgeBulkGetOrCreateByEndpoints(ctx, kind, items, backend,
16384
16506
  return found;
16385
16507
  }
16386
16508
  }
16387
- return chunkNCX65HBY_cjs.runInWriteTransaction(ctx, backend, async (target) => {
16509
+ return chunkUCQ3BFSY_cjs.runInWriteTransaction(ctx, backend, async (target) => {
16388
16510
  const { toCreate, toFetch, duplicateOf } = partitionEntries(
16389
16511
  await fetchRowsByEndpoint(target)
16390
16512
  );
@@ -16411,7 +16533,7 @@ async function executeEdgeBulkGetOrCreateByEndpoints(ctx, kind, items, backend,
16411
16533
  registry: ctx.registry,
16412
16534
  backend: target
16413
16535
  };
16414
- await chunkNCX65HBY_cjs.checkCardinalityConstraint(
16536
+ await chunkUCQ3BFSY_cjs.checkCardinalityConstraint(
16415
16537
  constraintContext,
16416
16538
  kind,
16417
16539
  cardinality,
@@ -16444,7 +16566,7 @@ async function executeEdgeBulkGetOrCreateByEndpoints(ctx, kind, items, backend,
16444
16566
  );
16445
16567
  results[entry2.index] = { edge, action: "updated" };
16446
16568
  } else {
16447
- results[entry2.index] = { edge: chunkNCX65HBY_cjs.rowToEdge(entry2.row), action: "found" };
16569
+ results[entry2.index] = { edge: chunkUCQ3BFSY_cjs.rowToEdge(entry2.row), action: "found" };
16448
16570
  }
16449
16571
  }
16450
16572
  for (const { index, sourceIndex } of duplicateOf) {
@@ -16459,21 +16581,21 @@ async function executeEdgeBulkGetOrCreateByEndpoints(ctx, kind, items, backend,
16459
16581
  var RECORDED_POINT_READ_FIXED_BIND_PARAMS = 8;
16460
16582
  var RECORDED_SCAN_LIMIT = 1e3;
16461
16583
  function recordedPointReadIdChunk(backend) {
16462
- const budget = chunk7V2FGGI2_cjs.recordedBindParamBudget(backend);
16584
+ const budget = chunkJ7LXTUTP_cjs.recordedBindParamBudget(backend);
16463
16585
  return Math.max(1, budget - RECORDED_POINT_READ_FIXED_BIND_PARAMS);
16464
16586
  }
16465
16587
  function recordedRelationErrorDetails(backend, surface) {
16466
16588
  return { dialect: backend.dialect, surface };
16467
16589
  }
16468
16590
  function withRelationsPrecondition(backend, promise, surface) {
16469
- return chunkWBUFJ7BS_cjs.withRecordedRelationsPrecondition(
16591
+ return chunkJQXSZHF2_cjs.withRecordedRelationsPrecondition(
16470
16592
  promise,
16471
16593
  recordedRelationErrorDetails(backend, surface)
16472
16594
  );
16473
16595
  }
16474
16596
  function createRecordedReadBackend(backend, surface) {
16475
- const projectedBackend = chunk7V2FGGI2_cjs.createGraphBackendProjection(backend);
16476
- return chunk3PRKZW6D_cjs.createBackendOverlay(projectedBackend, {
16597
+ const projectedBackend = chunkJ7LXTUTP_cjs.createGraphBackendProjection(backend);
16598
+ return chunkEKFUG4G7_cjs.createBackendOverlay(projectedBackend, {
16477
16599
  execute: (query) => withRelationsPrecondition(backend, backend.execute(query), surface),
16478
16600
  ...backend.executeRaw === void 0 ? {} : {
16479
16601
  executeRaw: (sqlText, params) => withRelationsPrecondition(
@@ -16492,12 +16614,12 @@ function recordedTemporalFilter(backend, coordinate, tableAlias) {
16492
16614
  { code: "RECORDED_POINT_READ_MISSING_COORDINATE" }
16493
16615
  );
16494
16616
  }
16495
- return chunk7V2FGGI2_cjs.compileTemporalFilter({
16617
+ return chunkJ7LXTUTP_cjs.compileTemporalFilter({
16496
16618
  mode: coordinate.valid.mode,
16497
16619
  asOf: coordinate.valid.asOf,
16498
16620
  recordedAsOf,
16499
16621
  tableAlias,
16500
- currentTimestamp: chunk7V2FGGI2_cjs.currentReadInstant()
16622
+ currentTimestamp: chunkJ7LXTUTP_cjs.currentReadInstant()
16501
16623
  });
16502
16624
  }
16503
16625
  function recordedRelationInvariantError(params) {
@@ -16598,7 +16720,7 @@ function createRecordedReadService(params) {
16598
16720
  SELECT * FROM ${table} ${aliasSql}
16599
16721
  WHERE ${aliasSql}.graph_id = ${graphId}
16600
16722
  AND ${aliasSql}.kind = ${kind}
16601
- AND ${aliasSql}.id IN (${chunk7V2FGGI2_cjs.sqlValueList(idChunk)})
16723
+ AND ${aliasSql}.id IN (${chunkJ7LXTUTP_cjs.sqlValueList(idChunk)})
16602
16724
  AND ${temporalFilter}
16603
16725
  ORDER BY ${aliasSql}.recorded_from
16604
16726
  `)
@@ -16677,7 +16799,7 @@ function createRecordedReadService(params) {
16677
16799
  kind,
16678
16800
  ids,
16679
16801
  coordinate,
16680
- toEntity: (row) => chunkNCX65HBY_cjs.rowToNode(mapRecordedNodeRow(row))
16802
+ toEntity: (row) => chunkUCQ3BFSY_cjs.rowToNode(mapRecordedNodeRow(row))
16681
16803
  });
16682
16804
  }
16683
16805
  function edgeGetByIds(kind, ids, coordinate) {
@@ -16689,7 +16811,7 @@ function createRecordedReadService(params) {
16689
16811
  kind,
16690
16812
  ids,
16691
16813
  coordinate,
16692
- toEntity: (row) => chunkNCX65HBY_cjs.rowToEdge(mapRecordedEdgeRow(row))
16814
+ toEntity: (row) => chunkUCQ3BFSY_cjs.rowToEdge(mapRecordedEdgeRow(row))
16693
16815
  });
16694
16816
  }
16695
16817
  function nodeScan(kind, coordinate, options) {
@@ -16701,7 +16823,7 @@ function createRecordedReadService(params) {
16701
16823
  kind,
16702
16824
  coordinate,
16703
16825
  options,
16704
- toEntity: (row) => chunkNCX65HBY_cjs.rowToNode(mapRecordedNodeRow(row))
16826
+ toEntity: (row) => chunkUCQ3BFSY_cjs.rowToNode(mapRecordedNodeRow(row))
16705
16827
  });
16706
16828
  }
16707
16829
  function edgeScan(kind, coordinate, options) {
@@ -16713,7 +16835,7 @@ function createRecordedReadService(params) {
16713
16835
  kind,
16714
16836
  coordinate,
16715
16837
  options,
16716
- toEntity: (row) => chunkNCX65HBY_cjs.rowToEdge(mapRecordedEdgeRow(row))
16838
+ toEntity: (row) => chunkUCQ3BFSY_cjs.rowToEdge(mapRecordedEdgeRow(row))
16717
16839
  });
16718
16840
  }
16719
16841
  return {
@@ -16751,6 +16873,7 @@ var NODE_WRITE_INTENT_COUNTERS = {
16751
16873
  create: countSingleWrite,
16752
16874
  createFromRecord: countSingleWrite,
16753
16875
  update: countSingleWrite,
16876
+ updateWhere: countSingleWrite,
16754
16877
  delete: countSingleWrite,
16755
16878
  hardDelete: countSingleWrite,
16756
16879
  upsertById: countSingleWrite,
@@ -16931,11 +17054,15 @@ var CAUGHT_UP_VERB_DETAILS = {
16931
17054
  reembed: {
16932
17055
  phrase: "re-embed a vector field on",
16933
17056
  code: "REEMBED_BEFORE_INITIALIZE"
17057
+ },
17058
+ repair: {
17059
+ phrase: "repair contributions for",
17060
+ code: "REPAIR_CONTRIBUTIONS_BEFORE_INITIALIZE"
16934
17061
  }
16935
17062
  };
16936
17063
  var ROW_MAPPER_CONFIGS = {
16937
- postgres: chunkHJH3RMXG_cjs.POSTGRES_ROW_MAPPER_CONFIG,
16938
- sqlite: chunkHJH3RMXG_cjs.SQLITE_ROW_MAPPER_CONFIG
17064
+ postgres: chunkF4NHQHEZ_cjs.POSTGRES_ROW_MAPPER_CONFIG,
17065
+ sqlite: chunkF4NHQHEZ_cjs.SQLITE_ROW_MAPPER_CONFIG
16939
17066
  };
16940
17067
  function rowMapperConfigFor(backend) {
16941
17068
  return ROW_MAPPER_CONFIGS[backend.dialect];
@@ -16971,7 +17098,7 @@ function syncStoreReplacementRef(ref, replacement) {
16971
17098
  ref.current = replacement;
16972
17099
  }
16973
17100
  async function commitEvolvedSchemaWhenRequiredKindsAreEmpty(backend, graph, currentVersion, classification) {
16974
- const result = await chunk2VLBGQBY_cjs.commitNewSchemaVersionIfKindsEmpty(
17101
+ const result = await chunkZI6VQSZA_cjs.commitNewSchemaVersionIfKindsEmpty(
16975
17102
  backend,
16976
17103
  graph,
16977
17104
  currentVersion,
@@ -17004,7 +17131,7 @@ async function commitEvolvedSchemaWhenRequiredKindsAreEmpty(backend, graph, curr
17004
17131
  );
17005
17132
  }
17006
17133
  var StoreImplementation = class _StoreImplementation {
17007
- [chunk7V2FGGI2_cjs.STORE_RUNTIME];
17134
+ [chunkJ7LXTUTP_cjs.STORE_RUNTIME];
17008
17135
  #graph;
17009
17136
  /**
17010
17137
  * Bare backend for DDL, vector-storage, and bulk-materialization work that must
@@ -17039,7 +17166,7 @@ var StoreImplementation = class _StoreImplementation {
17039
17166
  this.#captureEnabled = options?.history === true;
17040
17167
  this.#revisionTrackingEnabled = this.#captureEnabled || options?.revisionTracking === true;
17041
17168
  if (this.#revisionTrackingEnabled) {
17042
- chunk7V2FGGI2_cjs.assertRevisionTrackableBackend(backend);
17169
+ chunkJ7LXTUTP_cjs.assertRevisionTrackableBackend(backend);
17043
17170
  }
17044
17171
  const explicitSchema = options?.schema === void 0 ? void 0 : chunkCPEL3YIR_cjs.requireSqlSchema(options.schema, "store schema");
17045
17172
  const resolvedSchema = explicitSchema ?? (backend.tableNames ? chunkCPEL3YIR_cjs.createSqlSchema(backend.tableNames) : void 0);
@@ -17057,22 +17184,22 @@ var StoreImplementation = class _StoreImplementation {
17057
17184
  options?.recordedRead
17058
17185
  );
17059
17186
  this.#recordedReadBinding = this.#captureEnabled ? chunkCPEL3YIR_cjs.createRecordedReadBinding(readSchema) : externalRecordedRead;
17060
- this.#backend = this.#captureEnabled ? asGraphWriteBackend(chunk7V2FGGI2_cjs.createRecordedBackend(backend, resolvedSchema)) : asGraphWriteBackend(backend);
17187
+ this.#backend = this.#captureEnabled ? asGraphWriteBackend(chunkJ7LXTUTP_cjs.createRecordedBackend(backend, resolvedSchema)) : asGraphWriteBackend(backend);
17061
17188
  this.#schema = resolvedSchema;
17062
17189
  const rowMapperConfig = rowMapperConfigFor(this.#backend);
17063
17190
  this.#recordedReads = createRecordedReadService({
17064
17191
  graphId: graph.id,
17065
17192
  backend: this.#backend,
17066
17193
  recordedReadBinding: this.#recordedReadBinding,
17067
- mapRecordedNodeRow: chunkHJH3RMXG_cjs.createNodeRowMapper(rowMapperConfig),
17068
- mapRecordedEdgeRow: chunkHJH3RMXG_cjs.createEdgeRowMapper(rowMapperConfig)
17194
+ mapRecordedNodeRow: chunkF4NHQHEZ_cjs.createNodeRowMapper(rowMapperConfig),
17195
+ mapRecordedEdgeRow: chunkF4NHQHEZ_cjs.createEdgeRowMapper(rowMapperConfig)
17069
17196
  });
17070
- this.#registry = chunk2VLBGQBY_cjs.buildKindRegistry(graph);
17197
+ this.#registry = chunkZI6VQSZA_cjs.buildKindRegistry(graph);
17071
17198
  this.#hooks = options?.hooks ?? {};
17072
17199
  this.#defaultTraversalExpansion = options?.queryDefaults?.traversalExpansion ?? "inverse";
17073
17200
  this.#options = options;
17074
17201
  this.#schemaMetadata = schemaMetadata ?? UNKNOWN_SCHEMA_METADATA;
17075
- this[chunk7V2FGGI2_cjs.STORE_RUNTIME] = {
17202
+ this[chunkJ7LXTUTP_cjs.STORE_RUNTIME] = {
17076
17203
  backend: this.#backend,
17077
17204
  sealedQuery: (coordinate) => this.sealedQuery(coordinate),
17078
17205
  recordedNodeGetById: (kind, id, coordinate) => this.recordedNodeGetById(kind, id, coordinate),
@@ -17084,7 +17211,7 @@ var StoreImplementation = class _StoreImplementation {
17084
17211
  subgraphAtCoordinate: (rootId, subgraphOptions) => this.subgraphAtCoordinate(rootId, subgraphOptions),
17085
17212
  algorithmsAtCoordinate: (coordinate) => this.algorithmsAtCoordinate(coordinate)
17086
17213
  };
17087
- Object.defineProperty(this, chunk7V2FGGI2_cjs.STORE_RUNTIME, {
17214
+ Object.defineProperty(this, chunkJ7LXTUTP_cjs.STORE_RUNTIME, {
17088
17215
  configurable: false,
17089
17216
  enumerable: false,
17090
17217
  writable: false
@@ -17295,8 +17422,9 @@ var StoreImplementation = class _StoreImplementation {
17295
17422
  * `KindNotFoundError` when the kind is not registered.
17296
17423
  *
17297
17424
  * The dominant graph-extension-kind access pattern: `await store.evolve(...)`
17298
- * returns a new store, the caller immediately operates on the new
17299
- * kind, and the null-check the optional variant requires is busywork.
17425
+ * returns the Store for the resulting schema, the caller immediately
17426
+ * operates on the new kind, and the null-check the optional variant requires
17427
+ * is busywork.
17300
17428
  */
17301
17429
  getNodeCollectionOrThrow(kind) {
17302
17430
  const collection = this.getNodeCollection(kind);
@@ -17411,7 +17539,7 @@ var StoreImplementation = class _StoreImplementation {
17411
17539
  * between "proceed" and "ask the user" *before* attempting a commit.
17412
17540
  */
17413
17541
  async schemaChanges() {
17414
- return chunk2VLBGQBY_cjs.getSchemaChanges(this.#backend, this.#graph);
17542
+ return chunkZI6VQSZA_cjs.getSchemaChanges(this.#backend, this.#graph);
17415
17543
  }
17416
17544
  /**
17417
17545
  * Whether committing this store's graph would require a schema migration —
@@ -17423,7 +17551,7 @@ var StoreImplementation = class _StoreImplementation {
17423
17551
  * through a user's request.
17424
17552
  */
17425
17553
  async requiresMigration() {
17426
- return chunk2VLBGQBY_cjs.requiresMigration(this.#backend, this.#graph);
17554
+ return chunkZI6VQSZA_cjs.requiresMigration(this.#backend, this.#graph);
17427
17555
  }
17428
17556
  /**
17429
17557
  * Node operations bound to this store instance.
@@ -17439,7 +17567,7 @@ var StoreImplementation = class _StoreImplementation {
17439
17567
  async #maybeRefreshStatisticsAfterBulk(rowCount) {
17440
17568
  const configured = this.#options?.autoRefreshStatistics;
17441
17569
  if (configured === false) return;
17442
- const threshold = configured ?? chunk7V2FGGI2_cjs.AUTO_REFRESH_STATISTICS_ROW_THRESHOLD;
17570
+ const threshold = configured ?? chunkJ7LXTUTP_cjs.AUTO_REFRESH_STATISTICS_ROW_THRESHOLD;
17443
17571
  if (rowCount < threshold) return;
17444
17572
  try {
17445
17573
  await this.refreshStatistics();
@@ -17453,13 +17581,21 @@ var StoreImplementation = class _StoreImplementation {
17453
17581
  #buildNodeOperations(ctx) {
17454
17582
  return {
17455
17583
  defaultTemporalMode: this.#graph.defaults.temporalMode,
17456
- rowToNode: (row) => chunkNCX65HBY_cjs.rowToNode(row),
17584
+ rowToNode: (row) => chunkUCQ3BFSY_cjs.rowToNode(row),
17457
17585
  maybeRefreshStatisticsAfterBulk: (rowCount) => this.#maybeRefreshStatisticsAfterBulk(rowCount),
17458
- executeCreate: (input, backend) => chunkNCX65HBY_cjs.executeNodeCreate(ctx, input, backend),
17459
- executeCreateBatch: (inputs, backend) => chunkNCX65HBY_cjs.executeNodeCreateBatch(ctx, inputs, backend),
17460
- executeCreateNoReturnBatch: (inputs, backend) => chunkNCX65HBY_cjs.executeNodeCreateNoReturnBatch(ctx, inputs, backend),
17461
- executeUpdate: (input, backend, options) => chunkNCX65HBY_cjs.executeNodeUpdate(ctx, { ...input, id: input.id }, backend, options),
17462
- executeUpsertUpdate: (input, backend, options) => chunkNCX65HBY_cjs.executeNodeUpsertUpdate(
17586
+ executeCreate: (input, backend) => chunkUCQ3BFSY_cjs.executeNodeCreate(ctx, input, backend),
17587
+ executeCreateBatch: (inputs, backend) => chunkUCQ3BFSY_cjs.executeNodeCreateBatch(ctx, inputs, backend),
17588
+ executeCreateNoReturnBatch: (inputs, backend) => chunkUCQ3BFSY_cjs.executeNodeCreateNoReturnBatch(ctx, inputs, backend),
17589
+ executeUpdate: (input, backend, options) => chunkUCQ3BFSY_cjs.executeNodeUpdate(ctx, { ...input, id: input.id }, backend, options),
17590
+ executeUpdateWhere: (kind, patch, candidateIds, candidateIdColumn, backend) => chunkUCQ3BFSY_cjs.executeNodeUpdateWhere(
17591
+ ctx,
17592
+ kind,
17593
+ patch,
17594
+ candidateIds,
17595
+ candidateIdColumn,
17596
+ backend
17597
+ ),
17598
+ executeUpsertUpdate: (input, backend, options) => chunkUCQ3BFSY_cjs.executeNodeUpsertUpdate(
17463
17599
  ctx,
17464
17600
  { ...input, id: input.id },
17465
17601
  backend,
@@ -17467,13 +17603,13 @@ var StoreImplementation = class _StoreImplementation {
17467
17603
  ),
17468
17604
  // Present only when opted in; its absence is the coalesce off switch.
17469
17605
  ...this.#options?.coalesceUnchangedUpserts === true && {
17470
- upsertDirtyCheck: (kind, id, existingProps, inputProps) => chunkNCX65HBY_cjs.nodeUpsertDirtyCheck(ctx, kind, id, existingProps, inputProps)
17606
+ upsertDirtyCheck: (kind, id, existingProps, inputProps) => chunkUCQ3BFSY_cjs.nodeUpsertDirtyCheck(ctx, kind, id, existingProps, inputProps)
17471
17607
  },
17472
- executeDelete: (kind, id, backend) => chunkNCX65HBY_cjs.executeNodeDelete(ctx, kind, id, backend),
17473
- executeHardDelete: (kind, id, backend) => chunkNCX65HBY_cjs.executeNodeHardDelete(ctx, kind, id, backend),
17608
+ executeDelete: (kind, id, backend) => chunkUCQ3BFSY_cjs.executeNodeDelete(ctx, kind, id, backend),
17609
+ executeHardDelete: (kind, id, backend) => chunkUCQ3BFSY_cjs.executeNodeHardDelete(ctx, kind, id, backend),
17474
17610
  temporalRowMatcher: (options) => this.#temporalRowMatcher(options),
17475
17611
  createQuery: () => this.query(),
17476
- executeGetOrCreateByConstraint: (kind, constraintName, props, backend, options) => chunkNCX65HBY_cjs.executeNodeGetOrCreateByConstraint(
17612
+ executeGetOrCreateByConstraint: (kind, constraintName, props, backend, options) => chunkUCQ3BFSY_cjs.executeNodeGetOrCreateByConstraint(
17477
17613
  ctx,
17478
17614
  kind,
17479
17615
  constraintName,
@@ -17481,7 +17617,7 @@ var StoreImplementation = class _StoreImplementation {
17481
17617
  backend,
17482
17618
  options
17483
17619
  ),
17484
- executeBulkGetOrCreateByConstraint: (kind, constraintName, items, backend, options) => chunkNCX65HBY_cjs.executeNodeBulkGetOrCreateByConstraint(
17620
+ executeBulkGetOrCreateByConstraint: (kind, constraintName, items, backend, options) => chunkUCQ3BFSY_cjs.executeNodeBulkGetOrCreateByConstraint(
17485
17621
  ctx,
17486
17622
  kind,
17487
17623
  constraintName,
@@ -17489,15 +17625,15 @@ var StoreImplementation = class _StoreImplementation {
17489
17625
  backend,
17490
17626
  options
17491
17627
  ),
17492
- executeFindByConstraint: (kind, constraintName, props, backend) => chunkNCX65HBY_cjs.executeNodeFindByConstraint(ctx, kind, constraintName, props, backend),
17493
- executeBulkFindByConstraint: (kind, constraintName, items, backend) => chunkNCX65HBY_cjs.executeNodeBulkFindByConstraint(
17628
+ executeFindByConstraint: (kind, constraintName, props, backend) => chunkUCQ3BFSY_cjs.executeNodeFindByConstraint(ctx, kind, constraintName, props, backend),
17629
+ executeBulkFindByConstraint: (kind, constraintName, items, backend) => chunkUCQ3BFSY_cjs.executeNodeBulkFindByConstraint(
17494
17630
  ctx,
17495
17631
  kind,
17496
17632
  constraintName,
17497
17633
  items,
17498
17634
  backend
17499
17635
  ),
17500
- executeBulkFindByIndex: (kind, indexName, items, backend, options) => chunkNCX65HBY_cjs.executeNodeBulkFindByIndex(
17636
+ executeBulkFindByIndex: (kind, indexName, items, backend, options) => chunkUCQ3BFSY_cjs.executeNodeBulkFindByIndex(
17501
17637
  ctx,
17502
17638
  kind,
17503
17639
  indexName,
@@ -17516,7 +17652,7 @@ var StoreImplementation = class _StoreImplementation {
17516
17652
  #buildEdgeOperations(ctx) {
17517
17653
  return {
17518
17654
  defaultTemporalMode: this.#graph.defaults.temporalMode,
17519
- rowToEdge: (row) => chunkNCX65HBY_cjs.rowToEdge(row),
17655
+ rowToEdge: (row) => chunkUCQ3BFSY_cjs.rowToEdge(row),
17520
17656
  maybeRefreshStatisticsAfterBulk: (rowCount) => this.#maybeRefreshStatisticsAfterBulk(rowCount),
17521
17657
  executeCreate: (input, backend) => executeEdgeCreate(ctx, input, backend),
17522
17658
  executeCreateBatch: (inputs, backend) => executeEdgeCreateBatch(ctx, inputs, backend),
@@ -17726,8 +17862,8 @@ var StoreImplementation = class _StoreImplementation {
17726
17862
  }
17727
17863
  );
17728
17864
  }
17729
- const recordedAt = await chunkWBUFJ7BS_cjs.withRecordedRelationsPrecondition(
17730
- chunk7V2FGGI2_cjs.readRecordedClock(this.#backend, this.#sqlSchema(), this.graphId),
17865
+ const recordedAt = await chunkJQXSZHF2_cjs.withRecordedRelationsPrecondition(
17866
+ chunkJ7LXTUTP_cjs.readRecordedClock(this.#backend, this.#sqlSchema(), this.graphId),
17731
17867
  { dialect: this.#backend.dialect, surface: "recorded-now" }
17732
17868
  );
17733
17869
  return recordedAt === void 0 ? void 0 : chunkEQ7JKLZO_cjs.asRecordedInstant(recordedAt);
@@ -17742,7 +17878,7 @@ var StoreImplementation = class _StoreImplementation {
17742
17878
  */
17743
17879
  async revisionNow() {
17744
17880
  if (!this.#revisionTrackingEnabled) return void 0;
17745
- return chunk7V2FGGI2_cjs.readRecordedClock(this.#backend, this.#sqlSchema(), this.graphId);
17881
+ return chunkJ7LXTUTP_cjs.readRecordedClock(this.#backend, this.#sqlSchema(), this.graphId);
17746
17882
  }
17747
17883
  /**
17748
17884
  * Returns the durable random namespace for this graph's revision clock. A
@@ -17759,7 +17895,7 @@ var StoreImplementation = class _StoreImplementation {
17759
17895
  { code: "REVISION_ORIGIN_REQUIRES_TRACKING" }
17760
17896
  );
17761
17897
  }
17762
- const pendingOrigin = this.#revisionOrigin ?? chunk7V2FGGI2_cjs.ensureRevisionOrigin(this.#baseBackend, this.#sqlSchema(), this.graphId);
17898
+ const pendingOrigin = this.#revisionOrigin ?? chunkJ7LXTUTP_cjs.ensureRevisionOrigin(this.#baseBackend, this.#sqlSchema(), this.graphId);
17763
17899
  this.#revisionOrigin = pendingOrigin;
17764
17900
  try {
17765
17901
  return await pendingOrigin;
@@ -17919,7 +18055,7 @@ var StoreImplementation = class _StoreImplementation {
17919
18055
  * @returns A tuple with per-query typed results, preserving input order
17920
18056
  */
17921
18057
  async batch(...queries) {
17922
- return chunk3PRKZW6D_cjs.runOptionallyInTransaction(this.#baseBackend, async (target) => {
18058
+ return chunkEKFUG4G7_cjs.runOptionallyInTransaction(this.#baseBackend, async (target) => {
17923
18059
  const queryBackend = this.#createHookedQueryBackend(target);
17924
18060
  const results = [];
17925
18061
  for (const query of queries) {
@@ -17929,6 +18065,96 @@ var StoreImplementation = class _StoreImplementation {
17929
18065
  return results;
17930
18066
  });
17931
18067
  }
18068
+ /**
18069
+ * Reads several edge kinds from heterogeneous source nodes with round trips
18070
+ * independent of the number of licensed edge/source-kind combinations.
18071
+ *
18072
+ * Results are flattened in source-group/id order. Repeated sources receive
18073
+ * independent edge arrays, and sources with no matching edges remain present
18074
+ * with an empty array. Inputs that exceed the backend bind budget are split
18075
+ * into source chunks without splitting one source across statements.
18076
+ */
18077
+ async bulkFindEdgesFrom(params, options) {
18078
+ const sources = params.sources.flatMap(
18079
+ (group) => {
18080
+ if (!Object.hasOwn(this.#graph.nodes, group.kind)) {
18081
+ throw new chunkC4F7VJ5D_cjs.KindNotFoundError(group.kind, "node", {
18082
+ graphId: this.graphId
18083
+ });
18084
+ }
18085
+ return group.ids.map((id) => ({ kind: group.kind, id }));
18086
+ }
18087
+ );
18088
+ for (const edgeKind of params.edgeKinds) {
18089
+ if (!Object.hasOwn(this.#graph.edges, edgeKind)) {
18090
+ throw new chunkC4F7VJ5D_cjs.KindNotFoundError(edgeKind, "edge", {
18091
+ graphId: this.graphId
18092
+ });
18093
+ }
18094
+ }
18095
+ if (sources.length === 0 || params.edgeKinds.length === 0) {
18096
+ return sources.map((source) => ({ source, edges: [] }));
18097
+ }
18098
+ const readEndpointSet = this.#baseBackend.findEdgesByHeterogeneousEndpointSet;
18099
+ if (readEndpointSet === void 0) {
18100
+ throw new chunkC4F7VJ5D_cjs.ConfigurationError(
18101
+ "store.bulkFindEdgesFrom() requires a backend that can read heterogeneous endpoint and edge-kind sets in set-oriented statements.",
18102
+ {
18103
+ backend: this.#baseBackend.dialect,
18104
+ capability: "findEdgesByHeterogeneousEndpointSet",
18105
+ operation: "bulkFindEdgesFrom"
18106
+ },
18107
+ {
18108
+ suggestion: "Use per-edge-kind bulkFindFrom calls explicitly if that round-trip tradeoff is acceptable."
18109
+ }
18110
+ );
18111
+ }
18112
+ const limitPerInput = options?.limitPerInput;
18113
+ if (limitPerInput !== void 0 && (!Number.isInteger(limitPerInput) || limitPerInput <= 0)) {
18114
+ throw new chunkC4F7VJ5D_cjs.ValidationError(
18115
+ "bulk endpoint reads require limitPerInput to be a positive integer",
18116
+ {
18117
+ entityType: "edge",
18118
+ kind: params.edgeKinds.join(","),
18119
+ issues: [
18120
+ {
18121
+ path: "limitPerInput",
18122
+ message: `Expected a positive integer, received ${String(limitPerInput)}`,
18123
+ code: "invalid_value"
18124
+ }
18125
+ ]
18126
+ }
18127
+ );
18128
+ }
18129
+ const temporal = resolveTemporalReadParams(
18130
+ options,
18131
+ this.#graph.defaults.temporalMode
18132
+ );
18133
+ const endpoints = sources;
18134
+ const rows = await readEndpointSet({
18135
+ graphId: this.graphId,
18136
+ side: "from",
18137
+ endpoints,
18138
+ edgeKinds: params.edgeKinds,
18139
+ ...limitPerInput !== void 0 && this.#baseBackend.capabilities.windowFunctions && {
18140
+ limitPerEndpoint: limitPerInput
18141
+ },
18142
+ ...temporal
18143
+ });
18144
+ const edgesBySource = /* @__PURE__ */ new Map();
18145
+ for (const row of rows) {
18146
+ const edge = chunkUCQ3BFSY_cjs.rowToEdge(row);
18147
+ const key = `${edge.fromKind}\0${edge.fromId}`;
18148
+ const bucket = edgesBySource.get(key);
18149
+ if (bucket === void 0) edgesBySource.set(key, [edge]);
18150
+ else bucket.push(edge);
18151
+ }
18152
+ return sources.map((source) => {
18153
+ const bucket = edgesBySource.get(`${source.kind}\0${source.id}`) ?? [];
18154
+ const edges = limitPerInput === void 0 ? [...bucket] : bucket.slice(0, limitPerInput);
18155
+ return { source, edges };
18156
+ });
18157
+ }
17932
18158
  // === Subgraph Extraction ===
17933
18159
  /**
17934
18160
  * Extracts a typed subgraph by traversing from a root node.
@@ -17986,7 +18212,7 @@ var StoreImplementation = class _StoreImplementation {
17986
18212
  readCoordinate,
17987
18213
  "recorded-subgraph"
17988
18214
  ),
17989
- dialect: chunkOVUUTCPJ_cjs.getDialect(this.#backend.dialect),
18215
+ dialect: chunkJXUTCSXX_cjs.getDialect(this.#backend.dialect),
17990
18216
  schema: this.#schema,
17991
18217
  recordedReadBinding: this.#recordedReadBinding,
17992
18218
  options
@@ -18048,8 +18274,8 @@ var StoreImplementation = class _StoreImplementation {
18048
18274
  edges,
18049
18275
  // No real transaction: `tx.sql` is absent and there is no atomicity.
18050
18276
  sqlAvailability: "unavailable",
18051
- backend: chunk3PRKZW6D_cjs.createTransactionReadBackend(this.#backend),
18052
- [chunk7V2FGGI2_cjs.TRANSACTION_RUNTIME]: {
18277
+ backend: chunkEKFUG4G7_cjs.createTransactionReadBackend(this.#backend),
18278
+ [chunkJ7LXTUTP_cjs.TRANSACTION_RUNTIME]: {
18053
18279
  backend: this.#backend,
18054
18280
  runNodeOperationHooks: (operation, kind, id, hookedFunction) => this.#withOperationHooks(
18055
18281
  this.#createOperationContext(operation, "node", kind, id),
@@ -18058,7 +18284,7 @@ var StoreImplementation = class _StoreImplementation {
18058
18284
  },
18059
18285
  getNodeCollection: (kind) => this.#resolveDynamicNodeCollection(nodes, kind)
18060
18286
  };
18061
- Object.defineProperty(fallbackContext, chunk7V2FGGI2_cjs.TRANSACTION_RUNTIME, {
18287
+ Object.defineProperty(fallbackContext, chunkJ7LXTUTP_cjs.TRANSACTION_RUNTIME, {
18062
18288
  configurable: false,
18063
18289
  enumerable: false,
18064
18290
  writable: false
@@ -18070,8 +18296,9 @@ var StoreImplementation = class _StoreImplementation {
18070
18296
  }
18071
18297
  const pending = [];
18072
18298
  const runHooks = this.#createBufferedHookRunner(pending);
18299
+ const runBulkHooks = this.#createBufferedBulkHookRunner(pending);
18073
18300
  let recordedByGraph;
18074
- const transactionOptions = receiptRecorder !== void 0 && this.#captureEnabled ? chunk7V2FGGI2_cjs.withRecordedFlushObserver(backendOptions, (instants) => {
18301
+ const transactionOptions = receiptRecorder !== void 0 && this.#captureEnabled ? chunkJ7LXTUTP_cjs.withRecordedFlushObserver(backendOptions, (instants) => {
18075
18302
  recordedByGraph = instants;
18076
18303
  }) : backendOptions;
18077
18304
  try {
@@ -18080,7 +18307,8 @@ var StoreImplementation = class _StoreImplementation {
18080
18307
  txBackend,
18081
18308
  nativeTransaction,
18082
18309
  runHooks,
18083
- receiptRecorder
18310
+ receiptRecorder,
18311
+ runBulkHooks
18084
18312
  )
18085
18313
  );
18086
18314
  const result = this.#captureEnabled || this.#adapterBackend === void 0 ? await this.#backend.transaction(
@@ -18091,9 +18319,16 @@ var StoreImplementation = class _StoreImplementation {
18091
18319
  transactionOptions
18092
18320
  );
18093
18321
  for (const outcome of pending) {
18094
- this.#hooks.onOperationEnd?.(outcome.ctx, {
18095
- durationMs: outcome.durationMs
18096
- });
18322
+ if (outcome.type === "bulkOperation") {
18323
+ this.#hooks.onBulkOperationEnd?.(outcome.ctx, {
18324
+ affectedCount: outcome.affectedCount,
18325
+ durationMs: outcome.durationMs
18326
+ });
18327
+ } else {
18328
+ this.#hooks.onOperationEnd?.(outcome.ctx, {
18329
+ durationMs: outcome.durationMs
18330
+ });
18331
+ }
18097
18332
  }
18098
18333
  return { result, recordedByGraph };
18099
18334
  } catch (error) {
@@ -18180,7 +18415,7 @@ var StoreImplementation = class _StoreImplementation {
18180
18415
  */
18181
18416
  withTransaction(externalTx) {
18182
18417
  if (this.#captureEnabled) {
18183
- throw chunk7V2FGGI2_cjs.recordedCaptureRequiresCallbackTransactionError();
18418
+ throw chunkJ7LXTUTP_cjs.recordedCaptureRequiresCallbackTransactionError();
18184
18419
  }
18185
18420
  const adopt = this.#adapterBackend?.adoptTransaction;
18186
18421
  if (adopt === void 0) {
@@ -18204,8 +18439,8 @@ var StoreImplementation = class _StoreImplementation {
18204
18439
  }
18205
18440
  const txBackend = adopt(externalTx);
18206
18441
  if (this.#captureEnabled) {
18207
- await chunk7V2FGGI2_cjs.assertRecordedCaptureTransactionIsolation(txBackend);
18208
- await chunkNCX65HBY_cjs.lockSchemaVersionForStoreWrite(
18442
+ await chunkJ7LXTUTP_cjs.assertRecordedCaptureTransactionIsolation(txBackend);
18443
+ await chunkUCQ3BFSY_cjs.lockSchemaVersionForStoreWrite(
18209
18444
  {
18210
18445
  graphId: this.graphId,
18211
18446
  schemaVersion: this.#schemaMetadata.schemaVersion
@@ -18213,12 +18448,12 @@ var StoreImplementation = class _StoreImplementation {
18213
18448
  txBackend
18214
18449
  );
18215
18450
  }
18216
- const scope = this.#captureEnabled ? chunk7V2FGGI2_cjs.createRecordedTransactionScope(txBackend, this.#sqlSchema()) : {
18451
+ const scope = this.#captureEnabled ? chunkJ7LXTUTP_cjs.createRecordedTransactionScope(txBackend, this.#sqlSchema()) : {
18217
18452
  backend: txBackend,
18218
18453
  flush: () => Promise.resolve(EMPTY_RECORDED_FLUSH_INSTANTS)
18219
18454
  };
18220
18455
  if (this.#captureEnabled) {
18221
- await chunk7V2FGGI2_cjs.lockRecordedGraphWrite(scope.backend, this.graphId);
18456
+ await chunkJ7LXTUTP_cjs.lockRecordedGraphWrite(scope.backend, this.graphId);
18222
18457
  }
18223
18458
  const receiptRecorder = createTransactionReceiptRecorder();
18224
18459
  const invoke = fn;
@@ -18283,9 +18518,11 @@ var StoreImplementation = class _StoreImplementation {
18283
18518
  * (#140); when history capture is enabled it is replaced with a fail-loud
18284
18519
  * guard because raw graph writes would bypass recorded-time capture.
18285
18520
  */
18286
- #buildTransactionContext(txBackend, sql2, runHooks = this.#immediateHookRunner(), receiptRecorder) {
18521
+ #buildTransactionContext(txBackend, sql2, runHooks = this.#immediateHookRunner(), receiptRecorder, runBulkHooks = this.#immediateBulkHookRunner()) {
18287
18522
  const txNodeOperations = {
18288
- ...this.#buildNodeOperations(this.#createNodeOperationContext(runHooks)),
18523
+ ...this.#buildNodeOperations(
18524
+ this.#createNodeOperationContext(runHooks, runBulkHooks)
18525
+ ),
18289
18526
  createQuery: () => this.#createQueryForBackend(txBackend),
18290
18527
  maybeRefreshStatisticsAfterBulk: void 0
18291
18528
  };
@@ -18320,8 +18557,8 @@ var StoreImplementation = class _StoreImplementation {
18320
18557
  const base = {
18321
18558
  nodes,
18322
18559
  edges,
18323
- backend: chunk3PRKZW6D_cjs.createTransactionReadBackend(txBackend),
18324
- [chunk7V2FGGI2_cjs.TRANSACTION_RUNTIME]: { backend: txBackend, runNodeOperationHooks },
18560
+ backend: chunkEKFUG4G7_cjs.createTransactionReadBackend(txBackend),
18561
+ [chunkJ7LXTUTP_cjs.TRANSACTION_RUNTIME]: { backend: txBackend, runNodeOperationHooks },
18325
18562
  getNodeCollection
18326
18563
  };
18327
18564
  let withSql;
@@ -18330,7 +18567,7 @@ var StoreImplementation = class _StoreImplementation {
18330
18567
  ...base,
18331
18568
  sqlAvailability: "history"
18332
18569
  };
18333
- defineUnavailableSqlGuard(withSql, () => chunk7V2FGGI2_cjs.throwHistoryUnsafeSqlAccess());
18570
+ defineUnavailableSqlGuard(withSql, () => chunkJ7LXTUTP_cjs.throwHistoryUnsafeSqlAccess());
18334
18571
  } else if (this.#revisionTrackingEnabled) {
18335
18572
  withSql = {
18336
18573
  ...base,
@@ -18338,14 +18575,14 @@ var StoreImplementation = class _StoreImplementation {
18338
18575
  };
18339
18576
  defineUnavailableSqlGuard(
18340
18577
  withSql,
18341
- () => chunk7V2FGGI2_cjs.throwRevisionTrackingUnsafeSqlAccess()
18578
+ () => chunkJ7LXTUTP_cjs.throwRevisionTrackingUnsafeSqlAccess()
18342
18579
  );
18343
18580
  } else if (sql2 === void 0) {
18344
18581
  withSql = { ...base, sqlAvailability: "unavailable" };
18345
18582
  } else {
18346
18583
  withSql = { ...base, sql: sql2, sqlAvailability: "available" };
18347
18584
  }
18348
- Object.defineProperty(withSql, chunk7V2FGGI2_cjs.TRANSACTION_RUNTIME, {
18585
+ Object.defineProperty(withSql, chunkJ7LXTUTP_cjs.TRANSACTION_RUNTIME, {
18349
18586
  configurable: false,
18350
18587
  enumerable: false,
18351
18588
  writable: false
@@ -18365,12 +18602,12 @@ var StoreImplementation = class _StoreImplementation {
18365
18602
  async clear() {
18366
18603
  const doClear = async (target) => {
18367
18604
  if (this.#revisionTrackingEnabled) {
18368
- await chunk7V2FGGI2_cjs.lockRecordedGraphWrite(target, this.graphId);
18605
+ await chunkJ7LXTUTP_cjs.lockRecordedGraphWrite(target, this.graphId);
18369
18606
  }
18370
- const previousRevision = this.#revisionTrackingEnabled && !this.#captureEnabled ? await chunk7V2FGGI2_cjs.readRecordedClock(target, this.#sqlSchema(), this.graphId) : void 0;
18607
+ const previousRevision = this.#revisionTrackingEnabled && !this.#captureEnabled ? await chunkJ7LXTUTP_cjs.readRecordedClock(target, this.#sqlSchema(), this.graphId) : void 0;
18371
18608
  await target.clearGraph(this.graphId);
18372
18609
  if (this.#revisionTrackingEnabled && !this.#captureEnabled) {
18373
- await chunk7V2FGGI2_cjs.advanceRevisionClock(
18610
+ await chunkJ7LXTUTP_cjs.advanceRevisionClock(
18374
18611
  target,
18375
18612
  this.#sqlSchema(),
18376
18613
  this.graphId,
@@ -18453,12 +18690,14 @@ var StoreImplementation = class _StoreImplementation {
18453
18690
  /**
18454
18691
  * Evolves the graph at runtime by merging a graph extension into the
18455
18692
  * current schema, atomically committing a new schema version, and
18456
- * returning a fresh `Store` constructed against the merged graph.
18693
+ * returning the `Store` for the merged graph.
18457
18694
  *
18458
18695
  * The `Store` is immutable — its registry, collections, and operation
18459
- * contexts close over the graph at construction time — so callers
18460
- * must use the returned store (or pass a `ref` to be re-pointed) for
18461
- * any work involving the new kinds.
18696
+ * contexts close over the graph at construction time. After `evolve()`
18697
+ * resolves, callers must use the returned Store (or the re-pointed
18698
+ * `ref.current`) for every subsequent operation in the same request. A
18699
+ * Store captured before the schema commit remains pinned to the old version,
18700
+ * and its next managed write is rejected by the schema fence.
18462
18701
  *
18463
18702
  * **Cost for purely additive extensions is proportional to schema
18464
18703
  * document size, not row count.** The commit is a single CAS write.
@@ -18476,10 +18715,10 @@ var StoreImplementation = class _StoreImplementation {
18476
18715
  *
18477
18716
  * @param extension - Graph extension produced by
18478
18717
  * `defineGraphExtension(...)`.
18479
- * @param options.ref - Optional handle whose `current` is overwritten
18480
- * atomically with the schema commit. Long-lived consumers
18481
- * (request handlers, background workers) that dereference through
18482
- * the ref see the new kinds on the *next* call.
18718
+ * @param options.ref - Optional handle whose `current` is overwritten with
18719
+ * the replacement before a successful call resolves. Code awaiting this
18720
+ * call can use the returned Store or `ref.current` immediately. A
18721
+ * previously captured Store is not mutated.
18483
18722
  *
18484
18723
  * @throws {GraphExtensionValidationError} when the extension is
18485
18724
  * structurally invalid.
@@ -18499,7 +18738,7 @@ var StoreImplementation = class _StoreImplementation {
18499
18738
  */
18500
18739
  async evolve(extension, options) {
18501
18740
  const { activeRow, baseline } = await this.#loadCaughtUp("evolve");
18502
- const merged = chunk2VLBGQBY_cjs.mergeGraphExtension(baseline, extension);
18741
+ const merged = chunkZI6VQSZA_cjs.mergeGraphExtension(baseline, extension);
18503
18742
  if (merged === baseline) {
18504
18743
  if (baseline === this.#graph) {
18505
18744
  syncStoreReplacementRef(options?.ref, this);
@@ -18522,7 +18761,7 @@ var StoreImplementation = class _StoreImplementation {
18522
18761
  const baselineDocument = baseline.extension ?? Object.freeze({});
18523
18762
  const classification = classifyModifications(baselineDocument, extension);
18524
18763
  if (classification.incompatible.length > 0) {
18525
- throw new chunkQYWINYEA_cjs.IncompatibleChangeError(
18764
+ throw new chunkJ2ICGNHO_cjs.IncompatibleChangeError(
18526
18765
  classification.incompatible,
18527
18766
  this.graphId
18528
18767
  );
@@ -18532,7 +18771,7 @@ var StoreImplementation = class _StoreImplementation {
18532
18771
  merged,
18533
18772
  activeRow.version,
18534
18773
  classification
18535
- ) : await chunk2VLBGQBY_cjs.commitNewSchemaVersion(this.#backend, merged, activeRow.version);
18774
+ ) : await chunkZI6VQSZA_cjs.commitNewSchemaVersion(this.#backend, merged, activeRow.version);
18536
18775
  await materializeVectorContributions(this.#backend, merged);
18537
18776
  const evolved = this.#cloneWithGraph(
18538
18777
  merged,
@@ -18563,8 +18802,8 @@ var StoreImplementation = class _StoreImplementation {
18563
18802
  * kind that's already marked is a no-op (no version bump).
18564
18803
  *
18565
18804
  * @param names - Node or edge kind names to mark as deprecated.
18566
- * @param options.ref - Optional handle to be re-pointed atomically
18567
- * with the schema commit, mirroring `evolve()`.
18805
+ * @param options.ref - Optional handle to be re-pointed to the replacement
18806
+ * Store before a successful call resolves, mirroring `evolve()`.
18568
18807
  *
18569
18808
  * @throws {ConfigurationError} on `DEPRECATE_BEFORE_INITIALIZE` (no
18570
18809
  * schema yet) or `DEPRECATE_UNKNOWN_KIND` (name not on the graph).
@@ -18585,8 +18824,8 @@ var StoreImplementation = class _StoreImplementation {
18585
18824
  *
18586
18825
  * @param names - Node or edge kind names to remove from the
18587
18826
  * deprecated set.
18588
- * @param options.ref - Optional handle to be re-pointed atomically
18589
- * with the schema commit.
18827
+ * @param options.ref - Optional handle to be re-pointed to the replacement
18828
+ * Store before a successful call resolves.
18590
18829
  *
18591
18830
  * @throws {ConfigurationError} on `DEPRECATE_BEFORE_INITIALIZE`.
18592
18831
  * @throws {StaleVersionError} on a CAS race with another writer.
@@ -18866,6 +19105,39 @@ var StoreImplementation = class _StoreImplementation {
18866
19105
  const vectorSlots = backend.capabilities.vector?.supported === true ? chunkHAHNRASW_cjs.resolveGraphVectorSlots(this.#graph) : [];
18867
19106
  return verify(this.graphId, vectorSlots);
18868
19107
  }
19108
+ /**
19109
+ * Non-destructively repairs contribution states whose physical storage can
19110
+ * be preserved: `missing-marker` and `failed-materialization`.
19111
+ * `orphaned-marker` and `stale` findings are returned as
19112
+ * `requires-rebuild`; this method never drops contribution tables or
19113
+ * fabricates the data needed to rebuild them.
19114
+ *
19115
+ * The repair re-audits inside the backend and resolves every declaration
19116
+ * from the committed schema. Callers do not supply diagnostics, physical
19117
+ * names, or DDL. A stale Store is caught up to the active persisted graph
19118
+ * before its vector slots are enumerated, so repair does not use declarations
19119
+ * from the Store's stale in-memory graph snapshot.
19120
+ *
19121
+ * @throws {ConfigurationError} when no schema has been initialized or the
19122
+ * backend cannot probe and repair strategy-owned contributions.
19123
+ */
19124
+ async repairContributions() {
19125
+ const backend = this.#baseBackend;
19126
+ const repair = backend.repairContributions;
19127
+ if (repair === void 0) {
19128
+ throw new chunkC4F7VJ5D_cjs.ConfigurationError(
19129
+ "repairContributions requires a backend that can probe and repair strategy-owned contribution tables.",
19130
+ {
19131
+ backend: backend.dialect,
19132
+ capability: "contributions",
19133
+ operation: "repair"
19134
+ }
19135
+ );
19136
+ }
19137
+ const { baseline } = await this.#loadCaughtUp("repair");
19138
+ const vectorSlots = backend.capabilities.vector?.supported === true ? chunkHAHNRASW_cjs.resolveGraphVectorSlots(baseline) : [];
19139
+ return repair(this.graphId, vectorSlots);
19140
+ }
18869
19141
  /**
18870
19142
  * Removes extension kinds from the schema with cascading edge and
18871
19143
  * ontology cleanup. Two-phase by design:
@@ -18898,7 +19170,7 @@ var StoreImplementation = class _StoreImplementation {
18898
19170
  */
18899
19171
  async removeKinds(names, options) {
18900
19172
  const { activeRow, baseline } = await this.#loadCaughtUp("remove");
18901
- const plan = chunk2VLBGQBY_cjs.planRemovals(baseline, names);
19173
+ const plan = chunkZI6VQSZA_cjs.planRemovals(baseline, names);
18902
19174
  if (plan.removedNodeKinds.length === 0 && plan.removedEdgeKinds.length === 0) {
18903
19175
  if (baseline === this.#graph) {
18904
19176
  syncStoreReplacementRef(options?.ref, this);
@@ -18910,19 +19182,20 @@ var StoreImplementation = class _StoreImplementation {
18910
19182
  schemaMetadataFromRow(activeRow)
18911
19183
  );
18912
19184
  }
18913
- const compileTimeGraph = chunk2VLBGQBY_cjs.stripGraphExtension(this.#graph);
18914
- const merged = plan.document === void 0 ? compileTimeGraph : chunk2VLBGQBY_cjs.mergeGraphExtension(compileTimeGraph, plan.document);
18915
- const finalGraph = chunk2VLBGQBY_cjs.applyDeprecatedKinds(merged, baseline.deprecatedKinds);
18916
- const committedRow = await chunk2VLBGQBY_cjs.commitNewSchemaVersion(
19185
+ const compileTimeGraph = chunkZI6VQSZA_cjs.stripGraphExtension(this.#graph);
19186
+ const merged = plan.document === void 0 ? compileTimeGraph : chunkZI6VQSZA_cjs.mergeGraphExtension(compileTimeGraph, plan.document);
19187
+ const finalGraph = chunkZI6VQSZA_cjs.applyDeprecatedKinds(merged, baseline.deprecatedKinds);
19188
+ const committedRow = await chunkZI6VQSZA_cjs.commitNewSchemaVersion(
18917
19189
  this.#backend,
18918
19190
  finalGraph,
18919
19191
  activeRow.version
18920
19192
  );
18921
19193
  const recordKindRemoval = this.#backend.recordKindRemoval;
18922
19194
  if (recordKindRemoval !== void 0) {
18923
- if (this.#backend.ensureKindRemovalsTable !== void 0) {
18924
- await this.#backend.ensureKindRemovalsTable();
18925
- }
19195
+ await ensureFocusedStatusTable(
19196
+ this.#backend,
19197
+ this.#backend.ensureKindRemovalsTable
19198
+ );
18926
19199
  const attemptedAt = chunkZTAJL4DT_cjs.nowIso();
18927
19200
  const newSchemaVersion = committedRow.version;
18928
19201
  const queue = (kindName, entity) => recordKindRemoval(
@@ -19001,8 +19274,8 @@ var StoreImplementation = class _StoreImplementation {
19001
19274
  schemaMetadataFromRow(activeRow)
19002
19275
  );
19003
19276
  }
19004
- const merged = chunk2VLBGQBY_cjs.applyDeprecatedKinds(baseline, nextSet);
19005
- const result = await chunk2VLBGQBY_cjs.ensureSchema(this.#backend, merged, {
19277
+ const merged = chunkZI6VQSZA_cjs.applyDeprecatedKinds(baseline, nextSet);
19278
+ const result = await chunkZI6VQSZA_cjs.ensureSchema(this.#backend, merged, {
19006
19279
  preloaded: { activeRow, storedSchema },
19007
19280
  autoMigrate: true
19008
19281
  });
@@ -19010,9 +19283,9 @@ var StoreImplementation = class _StoreImplementation {
19010
19283
  return this.#cloneWithGraph(merged, options?.ref, metadata);
19011
19284
  }
19012
19285
  #catchUpToStored(storedSchema) {
19013
- const compileTimeGraph = chunk2VLBGQBY_cjs.stripGraphExtension(this.#graph);
19014
- const withGraphExtension = storedSchema.extension === void 0 ? compileTimeGraph : chunk2VLBGQBY_cjs.mergeGraphExtension(compileTimeGraph, storedSchema.extension);
19015
- return chunk2VLBGQBY_cjs.applyDeprecatedKinds(
19286
+ const compileTimeGraph = chunkZI6VQSZA_cjs.stripGraphExtension(this.#graph);
19287
+ const withGraphExtension = storedSchema.extension === void 0 ? compileTimeGraph : chunkZI6VQSZA_cjs.mergeGraphExtension(compileTimeGraph, storedSchema.extension);
19288
+ return chunkZI6VQSZA_cjs.applyDeprecatedKinds(
19016
19289
  withGraphExtension,
19017
19290
  storedSchema.deprecatedKinds
19018
19291
  );
@@ -19030,7 +19303,7 @@ var StoreImplementation = class _StoreImplementation {
19030
19303
  * serializes the actual commit.
19031
19304
  */
19032
19305
  async #loadCaughtUp(verb) {
19033
- const activeRow = await chunk2VLBGQBY_cjs.loadActiveSchemaWithBootstrap(
19306
+ const activeRow = await chunkZI6VQSZA_cjs.loadActiveSchemaWithBootstrap(
19034
19307
  this.#backend,
19035
19308
  this.graphId
19036
19309
  );
@@ -19041,7 +19314,7 @@ var StoreImplementation = class _StoreImplementation {
19041
19314
  { code }
19042
19315
  );
19043
19316
  }
19044
- const storedSchema = chunk2VLBGQBY_cjs.parseSerializedSchema(activeRow.schema_doc);
19317
+ const storedSchema = chunkZI6VQSZA_cjs.parseSerializedSchema(activeRow.schema_doc);
19045
19318
  const baseline = this.#catchUpToStored(storedSchema);
19046
19319
  return { activeRow, storedSchema, baseline };
19047
19320
  }
@@ -19061,6 +19334,10 @@ var StoreImplementation = class _StoreImplementation {
19061
19334
  (kind) => !(kind in baseline.edges)
19062
19335
  );
19063
19336
  if (addedNodes.length === 0 && addedEdges.length === 0) return;
19337
+ await ensureFocusedStatusTable(
19338
+ this.#backend,
19339
+ this.#backend.ensureKindRemovalsTable
19340
+ );
19064
19341
  const pending = await getPendingKindRemovals(this.graphId);
19065
19342
  if (pending.length === 0) return;
19066
19343
  const blocked = pending.filter(
@@ -19107,7 +19384,10 @@ var StoreImplementation = class _StoreImplementation {
19107
19384
  #immediateHookRunner() {
19108
19385
  return (ctx, fn) => this.#withOperationHooks(ctx, fn);
19109
19386
  }
19110
- #createNodeOperationContext(runHooks = this.#immediateHookRunner()) {
19387
+ #immediateBulkHookRunner() {
19388
+ return (ctx, fn) => this.#withBulkOperationHooks(ctx, fn);
19389
+ }
19390
+ #createNodeOperationContext(runHooks = this.#immediateHookRunner(), runBulkHooks = this.#immediateBulkHookRunner()) {
19111
19391
  return {
19112
19392
  graph: this.#graph,
19113
19393
  graphId: this.graphId,
@@ -19117,7 +19397,14 @@ var StoreImplementation = class _StoreImplementation {
19117
19397
  revisionSchema: this.#sqlSchema(),
19118
19398
  registry: this.#registry,
19119
19399
  createOperationContext: (operation, entity, kind, id) => this.#createOperationContext(operation, entity, kind, id),
19120
- withOperationHooks: runHooks
19400
+ withOperationHooks: runHooks,
19401
+ createBulkOperationContext: (operation, kind) => ({
19402
+ ...this.#createHookContext(),
19403
+ operation,
19404
+ entity: "node",
19405
+ kind
19406
+ }),
19407
+ withBulkOperationHooks: runBulkHooks
19121
19408
  };
19122
19409
  }
19123
19410
  #createEdgeOperationContext(runHooks = this.#immediateHookRunner()) {
@@ -19145,7 +19432,7 @@ var StoreImplementation = class _StoreImplementation {
19145
19432
  }
19146
19433
  const executeRaw = backend.executeRaw;
19147
19434
  const compileSql = backend.compileSql;
19148
- const projected = chunk7V2FGGI2_cjs.createGraphBackendProjection(backend);
19435
+ const projected = chunkJ7LXTUTP_cjs.createGraphBackendProjection(backend);
19149
19436
  return {
19150
19437
  ...projected,
19151
19438
  execute: (query) => {
@@ -19187,7 +19474,7 @@ var StoreImplementation = class _StoreImplementation {
19187
19474
  }
19188
19475
  #createHookContext() {
19189
19476
  return {
19190
- operationId: chunk7V2FGGI2_cjs.generateId(),
19477
+ operationId: chunkJ7LXTUTP_cjs.generateId(),
19191
19478
  graphId: this.graphId,
19192
19479
  startedAt: /* @__PURE__ */ new Date()
19193
19480
  };
@@ -19215,6 +19502,21 @@ var StoreImplementation = class _StoreImplementation {
19215
19502
  throw error;
19216
19503
  }
19217
19504
  }
19505
+ async #withBulkOperationHooks(ctx, fn) {
19506
+ this.#hooks.onBulkOperationStart?.(ctx);
19507
+ const startTime = Date.now();
19508
+ try {
19509
+ const result = await fn();
19510
+ this.#hooks.onBulkOperationEnd?.(ctx, {
19511
+ affectedCount: result.affectedCount,
19512
+ durationMs: Date.now() - startTime
19513
+ });
19514
+ return result;
19515
+ } catch (error) {
19516
+ this.#hooks.onError?.(ctx, asError(error));
19517
+ throw error;
19518
+ }
19519
+ }
19218
19520
  /**
19219
19521
  * A hook runner for operations that execute INSIDE an explicit
19220
19522
  * `store.transaction`: `onOperationStart` (and a failed operation's
@@ -19231,7 +19533,31 @@ var StoreImplementation = class _StoreImplementation {
19231
19533
  const startTime = Date.now();
19232
19534
  try {
19233
19535
  const result = await fn();
19234
- pending.push({ ctx, durationMs: Date.now() - startTime });
19536
+ pending.push({
19537
+ type: "operation",
19538
+ ctx,
19539
+ durationMs: Date.now() - startTime
19540
+ });
19541
+ return result;
19542
+ } catch (error) {
19543
+ this.#hooks.onError?.(ctx, asError(error));
19544
+ throw error;
19545
+ }
19546
+ };
19547
+ }
19548
+ /** Buffered counterpart for set-based operations inside `transaction()`. */
19549
+ #createBufferedBulkHookRunner(pending) {
19550
+ return async (ctx, fn) => {
19551
+ this.#hooks.onBulkOperationStart?.(ctx);
19552
+ const startTime = Date.now();
19553
+ try {
19554
+ const result = await fn();
19555
+ pending.push({
19556
+ type: "bulkOperation",
19557
+ ctx,
19558
+ affectedCount: result.affectedCount,
19559
+ durationMs: Date.now() - startTime
19560
+ });
19235
19561
  return result;
19236
19562
  } catch (error) {
19237
19563
  this.#hooks.onError?.(ctx, asError(error));
@@ -19289,8 +19615,8 @@ var AdapterStoreImplementation = class _AdapterStoreImplementation extends Store
19289
19615
  backend;
19290
19616
  constructor(graph, backend, options, schemaMetadata) {
19291
19617
  super(graph, backend, options, schemaMetadata, backend);
19292
- this.backend = options?.history === true ? createHistoryStoreBackendProjection(this[chunk7V2FGGI2_cjs.STORE_RUNTIME].backend) : Object.freeze(
19293
- chunk7V2FGGI2_cjs.createGraphBackendProjection(this[chunk7V2FGGI2_cjs.STORE_RUNTIME].backend)
19618
+ this.backend = options?.history === true ? createHistoryStoreBackendProjection(this[chunkJ7LXTUTP_cjs.STORE_RUNTIME].backend) : Object.freeze(
19619
+ chunkJ7LXTUTP_cjs.createGraphBackendProjection(this[chunkJ7LXTUTP_cjs.STORE_RUNTIME].backend)
19294
19620
  );
19295
19621
  }
19296
19622
  /**
@@ -19483,15 +19809,15 @@ async function createStoreWithSchema(graph, backend, options) {
19483
19809
  async function assertHistorySchemaOnOpen(backend, options) {
19484
19810
  if (options?.history !== true) return;
19485
19811
  const schema = options.schema === void 0 ? chunkCPEL3YIR_cjs.createSqlSchema(backend.tableNames) : chunkCPEL3YIR_cjs.requireSqlSchema(options.schema, "store schema");
19486
- await chunk7V2FGGI2_cjs.assertCurrentRecordedSchema(backend, schema);
19812
+ await chunkJ7LXTUTP_cjs.assertCurrentRecordedSchema(backend, schema);
19487
19813
  }
19488
19814
  async function prepareStoreWithSchema(graph, backend, options) {
19489
19815
  const {
19490
19816
  graph: merged,
19491
19817
  activeRow,
19492
19818
  storedSchema
19493
- } = await chunk2VLBGQBY_cjs.loadAndMergeGraphExtensionDocument(backend, graph);
19494
- const result = await chunk2VLBGQBY_cjs.ensureSchema(backend, merged, {
19819
+ } = await chunkZI6VQSZA_cjs.loadAndMergeGraphExtensionDocument(backend, graph);
19820
+ const result = await chunkZI6VQSZA_cjs.ensureSchema(backend, merged, {
19495
19821
  ...options,
19496
19822
  preloaded: { activeRow, storedSchema }
19497
19823
  });
@@ -19562,7 +19888,7 @@ async function prepareVerifiedStore(graph, backend, options) {
19562
19888
  graph: merged,
19563
19889
  activeRow,
19564
19890
  result
19565
- } = await chunk2VLBGQBY_cjs.loadAndVerifyGraph(backend, graph);
19891
+ } = await chunkZI6VQSZA_cjs.loadAndVerifyGraph(backend, graph);
19566
19892
  await assertHistorySchemaOnOpen(backend, options);
19567
19893
  return {
19568
19894
  graph: merged,
@@ -19623,5 +19949,5 @@ exports.min = min;
19623
19949
  exports.offsetFragment = offsetFragment;
19624
19950
  exports.orderByFragment = orderByFragment;
19625
19951
  exports.sum = sum;
19626
- //# sourceMappingURL=chunk-XR4YZFKW.cjs.map
19627
- //# sourceMappingURL=chunk-XR4YZFKW.cjs.map
19952
+ //# sourceMappingURL=chunk-YOALGKRE.cjs.map
19953
+ //# sourceMappingURL=chunk-YOALGKRE.cjs.map