@nicia-ai/typegraph 0.43.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 (307) hide show
  1. package/dist/backend/drizzle/indexes.cjs +9 -9
  2. package/dist/backend/drizzle/indexes.d.cts +1 -1
  3. package/dist/backend/drizzle/indexes.d.ts +1 -1
  4. package/dist/backend/drizzle/indexes.js +5 -5
  5. package/dist/backend/index.cjs +50 -50
  6. package/dist/backend/index.d.cts +3 -3
  7. package/dist/backend/index.d.ts +3 -3
  8. package/dist/backend/index.js +11 -11
  9. package/dist/backend/postgres/index.cjs +26 -26
  10. package/dist/backend/postgres/index.d.cts +6 -5
  11. package/dist/backend/postgres/index.d.ts +6 -5
  12. package/dist/backend/postgres/index.js +13 -13
  13. package/dist/backend/postgres/pglite-store.cjs +32 -33
  14. package/dist/backend/postgres/pglite-store.cjs.map +1 -1
  15. package/dist/backend/postgres/pglite-store.d.cts +7 -7
  16. package/dist/backend/postgres/pglite-store.d.ts +7 -7
  17. package/dist/backend/postgres/pglite-store.js +28 -29
  18. package/dist/backend/postgres/pglite-store.js.map +1 -1
  19. package/dist/backend/postgres/pglite.cjs +15 -15
  20. package/dist/backend/postgres/pglite.d.cts +3 -2
  21. package/dist/backend/postgres/pglite.d.ts +3 -2
  22. package/dist/backend/postgres/pglite.js +14 -14
  23. package/dist/backend/sqlite/index.cjs +23 -23
  24. package/dist/backend/sqlite/index.d.cts +7 -6
  25. package/dist/backend/sqlite/index.d.ts +7 -6
  26. package/dist/backend/sqlite/index.js +11 -11
  27. package/dist/backend/sqlite/libsql.cjs +17 -17
  28. package/dist/backend/sqlite/libsql.cjs.map +1 -1
  29. package/dist/backend/sqlite/libsql.d.cts +3 -2
  30. package/dist/backend/sqlite/libsql.d.ts +3 -2
  31. package/dist/backend/sqlite/libsql.js +13 -13
  32. package/dist/backend/sqlite/libsql.js.map +1 -1
  33. package/dist/backend/sqlite/local-store.cjs +33 -34
  34. package/dist/backend/sqlite/local-store.cjs.map +1 -1
  35. package/dist/backend/sqlite/local-store.d.cts +8 -7
  36. package/dist/backend/sqlite/local-store.d.ts +8 -7
  37. package/dist/backend/sqlite/local-store.js +29 -30
  38. package/dist/backend/sqlite/local-store.js.map +1 -1
  39. package/dist/backend/sqlite/local.cjs +16 -16
  40. package/dist/backend/sqlite/local.d.cts +3 -2
  41. package/dist/backend/sqlite/local.d.ts +3 -2
  42. package/dist/backend/sqlite/local.js +14 -14
  43. package/dist/{chunk-2OOY4OYT.js → chunk-2L54C2C2.js} +4 -4
  44. package/dist/{chunk-2OOY4OYT.js.map → chunk-2L54C2C2.js.map} +1 -1
  45. package/dist/{chunk-4WYFRACU.js → chunk-42PYUGLS.js} +58 -4
  46. package/dist/chunk-42PYUGLS.js.map +1 -0
  47. package/dist/{chunk-EQOQOT55.js → chunk-4GUBTVPV.js} +4 -5
  48. package/dist/chunk-4GUBTVPV.js.map +1 -0
  49. package/dist/{chunk-ZIRC2U6G.js → chunk-4GUTQPVO.js} +102 -16
  50. package/dist/chunk-4GUTQPVO.js.map +1 -0
  51. package/dist/{chunk-OYJSYDIH.js → chunk-4MB3AQAQ.js} +13 -3
  52. package/dist/chunk-4MB3AQAQ.js.map +1 -0
  53. package/dist/{chunk-5Q3P6OIC.cjs → chunk-4MEWSUVM.cjs} +12 -12
  54. package/dist/chunk-4MEWSUVM.cjs.map +1 -0
  55. package/dist/{chunk-VC26BUNP.js → chunk-4QIKLIGG.js} +17 -5
  56. package/dist/chunk-4QIKLIGG.js.map +1 -0
  57. package/dist/chunk-4SZ6XPTG.cjs +12 -0
  58. package/dist/{chunk-VGMNGWBR.cjs.map → chunk-4SZ6XPTG.cjs.map} +1 -1
  59. package/dist/{chunk-UZLEQFTV.js → chunk-55ITBQJI.js} +4 -4
  60. package/dist/chunk-55ITBQJI.js.map +1 -0
  61. package/dist/{chunk-JOYPNY33.js → chunk-5EKPX6QU.js} +9 -9
  62. package/dist/{chunk-JOYPNY33.js.map → chunk-5EKPX6QU.js.map} +1 -1
  63. package/dist/{chunk-TRC646QQ.cjs → chunk-5GAONX5G.cjs} +7 -7
  64. package/dist/{chunk-TRC646QQ.cjs.map → chunk-5GAONX5G.cjs.map} +1 -1
  65. package/dist/{chunk-M4GYQF2H.js → chunk-6DCB664D.js} +7 -4
  66. package/dist/chunk-6DCB664D.js.map +1 -0
  67. package/dist/{chunk-64LERBFM.cjs → chunk-6RYPD3NJ.cjs} +75 -65
  68. package/dist/chunk-6RYPD3NJ.cjs.map +1 -0
  69. package/dist/{chunk-5AERZSHC.cjs → chunk-7PF2L3H6.cjs} +4 -4
  70. package/dist/{chunk-5AERZSHC.cjs.map → chunk-7PF2L3H6.cjs.map} +1 -1
  71. package/dist/chunk-B3F2D3SP.cjs +12 -0
  72. package/dist/{chunk-U3YRCZ5L.cjs.map → chunk-B3F2D3SP.cjs.map} +1 -1
  73. package/dist/{chunk-Z3WIL6S3.js → chunk-BGYJW37L.js} +5 -5
  74. package/dist/{chunk-Z3WIL6S3.js.map → chunk-BGYJW37L.js.map} +1 -1
  75. package/dist/{chunk-DMZEVJGL.cjs → chunk-BNS75YNF.cjs} +12 -13
  76. package/dist/chunk-BNS75YNF.cjs.map +1 -0
  77. package/dist/{chunk-KTBTSHU6.cjs → chunk-C4F7VJ5D.cjs} +13 -3
  78. package/dist/chunk-C4F7VJ5D.cjs.map +1 -0
  79. package/dist/{chunk-L2BYRYHC.js → chunk-CBKG6HEP.js} +43 -33
  80. package/dist/chunk-CBKG6HEP.js.map +1 -0
  81. package/dist/{chunk-CVK4T34X.cjs → chunk-CPEL3YIR.cjs} +22 -22
  82. package/dist/{chunk-CVK4T34X.cjs.map → chunk-CPEL3YIR.cjs.map} +1 -1
  83. package/dist/{chunk-O2GZM7UK.cjs → chunk-D54WH24V.cjs} +62 -7
  84. package/dist/chunk-D54WH24V.cjs.map +1 -0
  85. package/dist/{chunk-33PAKPED.cjs → chunk-D56XG4EI.cjs} +53 -41
  86. package/dist/chunk-D56XG4EI.cjs.map +1 -0
  87. package/dist/{chunk-O3USVVWS.js → chunk-DK2S42XB.js} +3 -3
  88. package/dist/{chunk-O3USVVWS.js.map → chunk-DK2S42XB.js.map} +1 -1
  89. package/dist/{chunk-HHBKGPEI.js → chunk-DXEEHSGN.js} +517 -26
  90. package/dist/chunk-DXEEHSGN.js.map +1 -0
  91. package/dist/{chunk-UJRWOV5B.js → chunk-EFEOOCJ3.js} +5 -5
  92. package/dist/{chunk-UJRWOV5B.js.map → chunk-EFEOOCJ3.js.map} +1 -1
  93. package/dist/{chunk-ECU53PMN.cjs → chunk-EKFUG4G7.cjs} +5 -5
  94. package/dist/chunk-EKFUG4G7.cjs.map +1 -0
  95. package/dist/{chunk-FSCJOTHF.cjs → chunk-EQ7JKLZO.cjs} +10 -10
  96. package/dist/{chunk-FSCJOTHF.cjs.map → chunk-EQ7JKLZO.cjs.map} +1 -1
  97. package/dist/{chunk-AQR6BHB3.cjs → chunk-F4NHQHEZ.cjs} +10 -10
  98. package/dist/{chunk-AQR6BHB3.cjs.map → chunk-F4NHQHEZ.cjs.map} +1 -1
  99. package/dist/{chunk-2G6ZEGYO.js → chunk-FL5UQRES.js} +4 -4
  100. package/dist/{chunk-2G6ZEGYO.js.map → chunk-FL5UQRES.js.map} +1 -1
  101. package/dist/{chunk-ZP2KPDNN.js → chunk-FLEQ2HBK.js} +3 -3
  102. package/dist/{chunk-ZP2KPDNN.js.map → chunk-FLEQ2HBK.js.map} +1 -1
  103. package/dist/{chunk-RAWG2FEU.js → chunk-FQ7ZPOTZ.js} +264 -18
  104. package/dist/chunk-FQ7ZPOTZ.js.map +1 -0
  105. package/dist/{chunk-O7XVCLXW.cjs → chunk-H7VE3FL4.cjs} +577 -82
  106. package/dist/chunk-H7VE3FL4.cjs.map +1 -0
  107. package/dist/{chunk-JNXZQBN3.js → chunk-ID4WXTKL.js} +1039 -482
  108. package/dist/chunk-ID4WXTKL.js.map +1 -0
  109. package/dist/{chunk-ZGOUVMVS.js → chunk-ISLPNELU.js} +17 -5
  110. package/dist/chunk-ISLPNELU.js.map +1 -0
  111. package/dist/{chunk-I73ATSAH.cjs → chunk-IX64T5OL.cjs} +4 -4
  112. package/dist/{chunk-I73ATSAH.cjs.map → chunk-IX64T5OL.cjs.map} +1 -1
  113. package/dist/{chunk-XDMPDUKL.cjs → chunk-J2ICGNHO.cjs} +8 -9
  114. package/dist/chunk-J2ICGNHO.cjs.map +1 -0
  115. package/dist/{chunk-KDRF3NR2.cjs → chunk-J7LXTUTP.cjs} +295 -201
  116. package/dist/chunk-J7LXTUTP.cjs.map +1 -0
  117. package/dist/{chunk-AO2WPYFZ.cjs → chunk-JQXSZHF2.cjs} +14 -4
  118. package/dist/chunk-JQXSZHF2.cjs.map +1 -0
  119. package/dist/{chunk-UTTW2Q3M.cjs → chunk-JXUTCSXX.cjs} +197 -133
  120. package/dist/chunk-JXUTCSXX.cjs.map +1 -0
  121. package/dist/{chunk-GT7NEXSU.js → chunk-KCO5EFJU.js} +3 -3
  122. package/dist/{chunk-GT7NEXSU.js.map → chunk-KCO5EFJU.js.map} +1 -1
  123. package/dist/{chunk-ARN3ZODS.cjs → chunk-KKYELPZ2.cjs} +6 -6
  124. package/dist/{chunk-ARN3ZODS.cjs.map → chunk-KKYELPZ2.cjs.map} +1 -1
  125. package/dist/{chunk-7Y6BV3TK.cjs → chunk-KMXWZLQX.cjs} +100 -100
  126. package/dist/{chunk-7Y6BV3TK.cjs.map → chunk-KMXWZLQX.cjs.map} +1 -1
  127. package/dist/{chunk-CDYRPI5U.js → chunk-MIJKEVV7.js} +4 -4
  128. package/dist/{chunk-CDYRPI5U.js.map → chunk-MIJKEVV7.js.map} +1 -1
  129. package/dist/{chunk-FFQGI67R.cjs → chunk-NAAMUYMS.cjs} +56 -44
  130. package/dist/chunk-NAAMUYMS.cjs.map +1 -0
  131. package/dist/{chunk-6TJ6PKPS.cjs → chunk-OOA273IJ.cjs} +27 -27
  132. package/dist/{chunk-6TJ6PKPS.cjs.map → chunk-OOA273IJ.cjs.map} +1 -1
  133. package/dist/{chunk-F2KVJ6FF.cjs → chunk-P7GTYOLB.cjs} +203 -117
  134. package/dist/chunk-P7GTYOLB.cjs.map +1 -0
  135. package/dist/{chunk-42XYPKZU.js → chunk-PVUI6KGR.js} +67 -3
  136. package/dist/chunk-PVUI6KGR.js.map +1 -0
  137. package/dist/{chunk-L5AUCL5P.js → chunk-Q6EDCUXV.js} +274 -14
  138. package/dist/chunk-Q6EDCUXV.js.map +1 -0
  139. package/dist/{chunk-ZPCKPLMX.cjs → chunk-QB6VMOJ2.cjs} +8 -8
  140. package/dist/{chunk-ZPCKPLMX.cjs.map → chunk-QB6VMOJ2.cjs.map} +1 -1
  141. package/dist/{chunk-3RPQDGUE.cjs → chunk-QC4MCOFV.cjs} +5 -5
  142. package/dist/{chunk-3RPQDGUE.cjs.map → chunk-QC4MCOFV.cjs.map} +1 -1
  143. package/dist/{chunk-4XRP2N6B.js → chunk-QLUXRWKL.js} +3 -3
  144. package/dist/{chunk-4XRP2N6B.js.map → chunk-QLUXRWKL.js.map} +1 -1
  145. package/dist/{chunk-OM6RIOA5.cjs → chunk-QR24DJDF.cjs} +13 -13
  146. package/dist/{chunk-OM6RIOA5.cjs.map → chunk-QR24DJDF.cjs.map} +1 -1
  147. package/dist/{chunk-YPVQYM3L.js → chunk-QRNYDV5Z.js} +138 -31
  148. package/dist/chunk-QRNYDV5Z.js.map +1 -0
  149. package/dist/{chunk-ZOHCFYXE.js → chunk-QT6V3YRH.js} +3 -3
  150. package/dist/{chunk-ZOHCFYXE.js.map → chunk-QT6V3YRH.js.map} +1 -1
  151. package/dist/{chunk-5C75HQYQ.js → chunk-RFRM3Q5K.js} +17 -5
  152. package/dist/chunk-RFRM3Q5K.js.map +1 -0
  153. package/dist/{chunk-NXIZL7ZZ.js → chunk-RUQS6M7G.js} +6 -6
  154. package/dist/chunk-RUQS6M7G.js.map +1 -0
  155. package/dist/{chunk-CI5NPLXX.js → chunk-S3ZRKJHY.js} +3 -3
  156. package/dist/{chunk-CI5NPLXX.js.map → chunk-S3ZRKJHY.js.map} +1 -1
  157. package/dist/{chunk-3V6D5DEC.js → chunk-S4KQ5LV4.js} +3 -3
  158. package/dist/{chunk-3V6D5DEC.js.map → chunk-S4KQ5LV4.js.map} +1 -1
  159. package/dist/{chunk-CTWZPYJW.js → chunk-TKORQCG4.js} +108 -15
  160. package/dist/chunk-TKORQCG4.js.map +1 -0
  161. package/dist/{chunk-2HKIID5K.js → chunk-TKP5T34P.js} +4 -5
  162. package/dist/chunk-TKP5T34P.js.map +1 -0
  163. package/dist/{chunk-X2XOQZT3.cjs → chunk-U5W4LKZV.cjs} +13 -9
  164. package/dist/chunk-U5W4LKZV.cjs.map +1 -0
  165. package/dist/{chunk-BLBG2VZ5.cjs → chunk-UCQ3BFSY.cjs} +372 -110
  166. package/dist/chunk-UCQ3BFSY.cjs.map +1 -0
  167. package/dist/{chunk-CUPJL6TS.js → chunk-V34A6R5V.js} +13 -4
  168. package/dist/chunk-V34A6R5V.js.map +1 -0
  169. package/dist/{chunk-LQLVJWUH.js → chunk-VTN3C3CH.js} +7 -7
  170. package/dist/chunk-VTN3C3CH.js.map +1 -0
  171. package/dist/{chunk-FY4VY5EV.cjs → chunk-VVQM4CZD.cjs} +20 -20
  172. package/dist/chunk-VVQM4CZD.cjs.map +1 -0
  173. package/dist/{chunk-LDCWO5B6.js → chunk-WDAVPX46.js} +3 -3
  174. package/dist/{chunk-LDCWO5B6.js.map → chunk-WDAVPX46.js.map} +1 -1
  175. package/dist/{chunk-5GV4JQNA.cjs → chunk-WDBXJOU5.cjs} +55 -43
  176. package/dist/chunk-WDBXJOU5.cjs.map +1 -0
  177. package/dist/{chunk-FMPZPOUD.js → chunk-WUFASQUO.js} +3 -3
  178. package/dist/{chunk-FMPZPOUD.js.map → chunk-WUFASQUO.js.map} +1 -1
  179. package/dist/{chunk-5ZPRE4CV.cjs → chunk-YDWLUT5V.cjs} +237 -130
  180. package/dist/chunk-YDWLUT5V.cjs.map +1 -0
  181. package/dist/{chunk-CVNGKTHO.js → chunk-YMTXMPV6.js} +4 -4
  182. package/dist/{chunk-CVNGKTHO.js.map → chunk-YMTXMPV6.js.map} +1 -1
  183. package/dist/{chunk-NDQLPKBX.cjs → chunk-YOALGKRE.cjs} +2092 -1535
  184. package/dist/chunk-YOALGKRE.cjs.map +1 -0
  185. package/dist/{chunk-OMQ2NBOR.cjs → chunk-Z3WO6MND.cjs} +27 -27
  186. package/dist/{chunk-OMQ2NBOR.cjs.map → chunk-Z3WO6MND.cjs.map} +1 -1
  187. package/dist/{chunk-V2GZBPY2.cjs → chunk-ZI6VQSZA.cjs} +310 -61
  188. package/dist/chunk-ZI6VQSZA.cjs.map +1 -0
  189. package/dist/{chunk-ZBV4LQD2.cjs → chunk-ZTAJL4DT.cjs} +4 -4
  190. package/dist/{chunk-ZBV4LQD2.cjs.map → chunk-ZTAJL4DT.cjs.map} +1 -1
  191. package/dist/core/index.cjs +27 -28
  192. package/dist/core/index.d.cts +5 -5
  193. package/dist/core/index.d.ts +5 -5
  194. package/dist/core/index.js +7 -8
  195. package/dist/{ddl-3unqC-kg.d.cts → ddl-BG4J805L.d.cts} +3 -3
  196. package/dist/{ddl-Bc4Dl8fu.d.ts → ddl-CgiS9QLj.d.ts} +3 -3
  197. package/dist/{define-graph-DBFnc7u_.d.ts → define-graph-BGrJahvp.d.ts} +1 -1
  198. package/dist/{define-graph-Byslw2OO.d.cts → define-graph-alREY2wj.d.cts} +1 -1
  199. package/dist/graph-extension/index.cjs +19 -20
  200. package/dist/graph-extension/index.d.cts +4 -4
  201. package/dist/graph-extension/index.d.ts +4 -4
  202. package/dist/graph-extension/index.js +4 -5
  203. package/dist/graph-merge/index.cjs +103 -104
  204. package/dist/graph-merge/index.cjs.map +1 -1
  205. package/dist/graph-merge/index.d.cts +9 -8
  206. package/dist/graph-merge/index.d.ts +9 -8
  207. package/dist/graph-merge/index.js +23 -24
  208. package/dist/graph-merge/index.js.map +1 -1
  209. package/dist/{index-DHXw7QAl.d.cts → index-BBxZCUdu.d.ts} +37 -7
  210. package/dist/{index-DQzVJBHa.d.ts → index-C3y_98iN.d.cts} +37 -7
  211. package/dist/index.cjs +209 -202
  212. package/dist/index.cjs.map +1 -1
  213. package/dist/index.d.cts +13 -13
  214. package/dist/index.d.ts +13 -13
  215. package/dist/index.js +33 -34
  216. package/dist/index.js.map +1 -1
  217. package/dist/indexes/index.cjs +13 -13
  218. package/dist/indexes/index.d.cts +4 -4
  219. package/dist/indexes/index.d.ts +4 -4
  220. package/dist/indexes/index.js +6 -6
  221. package/dist/interchange/index.cjs +50 -41
  222. package/dist/interchange/index.cjs.map +1 -1
  223. package/dist/interchange/index.d.cts +11 -11
  224. package/dist/interchange/index.d.ts +11 -11
  225. package/dist/interchange/index.js +24 -15
  226. package/dist/interchange/index.js.map +1 -1
  227. package/dist/{manager-U9_zopqr.d.cts → manager-KS7CGQQT.d.cts} +44 -6
  228. package/dist/{manager-Dl0-er1G.d.ts → manager-YoLEfcc1.d.ts} +44 -6
  229. package/dist/{materialize-indexes-BM3u0aXE.d.ts → materialize-indexes-Bhhyb1B3.d.ts} +1 -1
  230. package/dist/{materialize-indexes-DzMCetZe.d.cts → materialize-indexes-OHRWypW6.d.cts} +1 -1
  231. package/dist/{postgres-DpJqtbSX.d.cts → postgres-DpkW3R5Y.d.cts} +1 -1
  232. package/dist/{postgres-C5-WMKFA.d.ts → postgres-DwqyIniy.d.ts} +1 -1
  233. package/dist/profiler/index.d.cts +10 -9
  234. package/dist/profiler/index.d.ts +10 -9
  235. package/dist/provenance/index.cjs +38 -38
  236. package/dist/provenance/index.cjs.map +1 -1
  237. package/dist/provenance/index.d.cts +7 -7
  238. package/dist/provenance/index.d.ts +7 -7
  239. package/dist/provenance/index.js +8 -8
  240. package/dist/provenance/index.js.map +1 -1
  241. package/dist/schema/index.cjs +40 -41
  242. package/dist/schema/index.d.cts +7 -7
  243. package/dist/schema/index.d.ts +7 -7
  244. package/dist/schema/index.js +13 -14
  245. package/dist/{searchable-B4mUXZT6.d.cts → searchable-CIZL8Hyw.d.cts} +2 -2
  246. package/dist/{searchable-C7jmPNLT.d.ts → searchable-DLWEfC4a.d.ts} +2 -2
  247. package/dist/{sqlite-Ch5tSYQY.d.ts → sqlite-DY0WODUK.d.cts} +1 -1
  248. package/dist/{sqlite-Da7jiYu9.d.cts → sqlite-L-VIRzqA.d.ts} +1 -1
  249. package/dist/{store-view-DdwBNjZQ.d.ts → store-view-66p92IPi.d.ts} +1974 -1751
  250. package/dist/{store-view-D1F6KqsE.d.cts → store-view-A85FFRnk.d.cts} +1974 -1751
  251. package/dist/{temporal-CMpigMCW.d.cts → temporal-BNbjXqer.d.cts} +1 -1
  252. package/dist/{temporal-BtrTYTiB.d.ts → temporal-Bob6Nfbp.d.ts} +1 -1
  253. package/dist/{types-Dh-EgT-w.d.cts → types-Ch9a0Dx6.d.cts} +483 -20
  254. package/dist/{types-Dh-EgT-w.d.ts → types-Ch9a0Dx6.d.ts} +483 -20
  255. package/dist/{types-D2rU5Taq.d.ts → types-ClCzT-dT.d.ts} +1 -1
  256. package/dist/{types-G4sVM-76.d.cts → types-DeORZhxn.d.cts} +1 -1
  257. package/dist/{where-DbZ9XDOI.d.cts → where-DPw52ksb.d.cts} +1 -1
  258. package/dist/{where-B8Y21kig.d.ts → where-kWUZPvEA.d.ts} +1 -1
  259. package/package.json +1 -1
  260. package/dist/chunk-2HKIID5K.js.map +0 -1
  261. package/dist/chunk-33PAKPED.cjs.map +0 -1
  262. package/dist/chunk-42XYPKZU.js.map +0 -1
  263. package/dist/chunk-4WYFRACU.js.map +0 -1
  264. package/dist/chunk-5C75HQYQ.js.map +0 -1
  265. package/dist/chunk-5GV4JQNA.cjs.map +0 -1
  266. package/dist/chunk-5Q3P6OIC.cjs.map +0 -1
  267. package/dist/chunk-5ZPRE4CV.cjs.map +0 -1
  268. package/dist/chunk-64LERBFM.cjs.map +0 -1
  269. package/dist/chunk-AO2WPYFZ.cjs.map +0 -1
  270. package/dist/chunk-BLBG2VZ5.cjs.map +0 -1
  271. package/dist/chunk-CTWZPYJW.js.map +0 -1
  272. package/dist/chunk-CUPJL6TS.js.map +0 -1
  273. package/dist/chunk-DMZEVJGL.cjs.map +0 -1
  274. package/dist/chunk-ECU53PMN.cjs.map +0 -1
  275. package/dist/chunk-EQOQOT55.js.map +0 -1
  276. package/dist/chunk-F2KVJ6FF.cjs.map +0 -1
  277. package/dist/chunk-F7TDKSVB.cjs +0 -61
  278. package/dist/chunk-F7TDKSVB.cjs.map +0 -1
  279. package/dist/chunk-FFQGI67R.cjs.map +0 -1
  280. package/dist/chunk-FY4VY5EV.cjs.map +0 -1
  281. package/dist/chunk-HHBKGPEI.js.map +0 -1
  282. package/dist/chunk-JNXZQBN3.js.map +0 -1
  283. package/dist/chunk-KDRF3NR2.cjs.map +0 -1
  284. package/dist/chunk-KTBTSHU6.cjs.map +0 -1
  285. package/dist/chunk-L2BYRYHC.js.map +0 -1
  286. package/dist/chunk-L5AUCL5P.js.map +0 -1
  287. package/dist/chunk-LQLVJWUH.js.map +0 -1
  288. package/dist/chunk-M4GYQF2H.js.map +0 -1
  289. package/dist/chunk-NDQLPKBX.cjs.map +0 -1
  290. package/dist/chunk-NXIZL7ZZ.js.map +0 -1
  291. package/dist/chunk-O2GZM7UK.cjs.map +0 -1
  292. package/dist/chunk-O7XVCLXW.cjs.map +0 -1
  293. package/dist/chunk-OYJSYDIH.js.map +0 -1
  294. package/dist/chunk-RAWG2FEU.js.map +0 -1
  295. package/dist/chunk-RXOAXO3R.js +0 -59
  296. package/dist/chunk-RXOAXO3R.js.map +0 -1
  297. package/dist/chunk-U3YRCZ5L.cjs +0 -12
  298. package/dist/chunk-UTTW2Q3M.cjs.map +0 -1
  299. package/dist/chunk-UZLEQFTV.js.map +0 -1
  300. package/dist/chunk-V2GZBPY2.cjs.map +0 -1
  301. package/dist/chunk-VC26BUNP.js.map +0 -1
  302. package/dist/chunk-VGMNGWBR.cjs +0 -12
  303. package/dist/chunk-X2XOQZT3.cjs.map +0 -1
  304. package/dist/chunk-XDMPDUKL.cjs.map +0 -1
  305. package/dist/chunk-YPVQYM3L.js.map +0 -1
  306. package/dist/chunk-ZGOUVMVS.js.map +0 -1
  307. package/dist/chunk-ZIRC2U6G.js.map +0 -1
@@ -1,16 +1,17 @@
1
1
  'use strict';
2
2
 
3
- var chunkKDRF3NR2_cjs = require('./chunk-KDRF3NR2.cjs');
4
- var chunkCVK4T34X_cjs = require('./chunk-CVK4T34X.cjs');
5
- var chunkECU53PMN_cjs = require('./chunk-ECU53PMN.cjs');
6
- var chunkARN3ZODS_cjs = require('./chunk-ARN3ZODS.cjs');
3
+ var chunkJ7LXTUTP_cjs = require('./chunk-J7LXTUTP.cjs');
4
+ var chunkCPEL3YIR_cjs = require('./chunk-CPEL3YIR.cjs');
5
+ var chunkEKFUG4G7_cjs = require('./chunk-EKFUG4G7.cjs');
6
+ var chunkKKYELPZ2_cjs = require('./chunk-KKYELPZ2.cjs');
7
7
  var chunkACSVZPK7_cjs = require('./chunk-ACSVZPK7.cjs');
8
- var chunkZBV4LQD2_cjs = require('./chunk-ZBV4LQD2.cjs');
9
- var chunkUTTW2Q3M_cjs = require('./chunk-UTTW2Q3M.cjs');
10
- var chunkX2XOQZT3_cjs = require('./chunk-X2XOQZT3.cjs');
8
+ var chunkZTAJL4DT_cjs = require('./chunk-ZTAJL4DT.cjs');
9
+ var chunkJXUTCSXX_cjs = require('./chunk-JXUTCSXX.cjs');
10
+ var chunkU5W4LKZV_cjs = require('./chunk-U5W4LKZV.cjs');
11
11
  var chunk764JHTLT_cjs = require('./chunk-764JHTLT.cjs');
12
- var chunkO2GZM7UK_cjs = require('./chunk-O2GZM7UK.cjs');
13
- var chunkKTBTSHU6_cjs = require('./chunk-KTBTSHU6.cjs');
12
+ var chunkHAHNRASW_cjs = require('./chunk-HAHNRASW.cjs');
13
+ var chunkD54WH24V_cjs = require('./chunk-D54WH24V.cjs');
14
+ var chunkC4F7VJ5D_cjs = require('./chunk-C4F7VJ5D.cjs');
14
15
  var chunkTDXIBCGY_cjs = require('./chunk-TDXIBCGY.cjs');
15
16
 
16
17
  // src/store/row-mappers.ts
@@ -18,8 +19,8 @@ function nullToUndefined(value) {
18
19
  return value === null ? void 0 : value;
19
20
  }
20
21
  function rowToNode(row) {
21
- const rawProps = chunkECU53PMN_cjs.rowPropsToObject(row.props);
22
- const props = chunkO2GZM7UK_cjs.filterReservedKeys(rawProps, chunkO2GZM7UK_cjs.RESERVED_NODE_KEYS);
22
+ const rawProps = chunkEKFUG4G7_cjs.rowPropsToObject(row.props);
23
+ const props = chunkD54WH24V_cjs.filterReservedKeys(rawProps, chunkD54WH24V_cjs.RESERVED_NODE_KEYS);
23
24
  return {
24
25
  kind: row.kind,
25
26
  id: row.id,
@@ -38,8 +39,8 @@ function rowToNodeMeta(row) {
38
39
  };
39
40
  }
40
41
  function rowToEdge(row) {
41
- const rawProps = chunkECU53PMN_cjs.rowPropsToObject(row.props);
42
- const props = chunkO2GZM7UK_cjs.filterReservedKeys(rawProps, chunkO2GZM7UK_cjs.RESERVED_EDGE_KEYS);
42
+ const rawProps = chunkEKFUG4G7_cjs.rowPropsToObject(row.props);
43
+ const props = chunkD54WH24V_cjs.filterReservedKeys(rawProps, chunkD54WH24V_cjs.RESERVED_EDGE_KEYS);
43
44
  return {
44
45
  id: row.id,
45
46
  kind: row.kind,
@@ -62,13 +63,41 @@ function rowToEdgeMeta(row) {
62
63
  }
63
64
 
64
65
  // src/store/operations/write-transaction.ts
65
- function runInWriteTransaction(ctx, backend, fn) {
66
+ async function lockSchemaVersionForStoreWrite(ctx, backend) {
67
+ const expectedVersion = ctx.schemaVersion;
68
+ if (expectedVersion === void 0) return;
69
+ if ("transaction" in backend && !backend.capabilities.transactions) {
70
+ throw new chunkC4F7VJ5D_cjs.ConfigurationError(
71
+ "Schema-managed Store writes require a transactional backend so schema changes and entity writes can share one fence.",
72
+ {
73
+ code: "SCHEMA_WRITE_FENCE_UNSUPPORTED",
74
+ graphId: ctx.graphId
75
+ }
76
+ );
77
+ }
78
+ const lockSchemaVersionForWrite = backend.lockSchemaVersionForWrite;
79
+ if (lockSchemaVersionForWrite === void 0) {
80
+ throw new chunkC4F7VJ5D_cjs.ConfigurationError(
81
+ "This backend cannot fence schema-managed Store writes against a concurrent schema change.",
82
+ {
83
+ code: "SCHEMA_WRITE_FENCE_UNSUPPORTED",
84
+ graphId: ctx.graphId
85
+ }
86
+ );
87
+ }
88
+ await lockSchemaVersionForWrite({
89
+ graphId: ctx.graphId,
90
+ expectedVersion
91
+ });
92
+ }
93
+ function runInWriteTransaction(ctx, backend, fn, options) {
66
94
  const ownsWriteLock = "transaction" in backend && backend.capabilities.transactions;
67
- return chunkECU53PMN_cjs.runOptionallyInTransaction(backend, async (target) => {
68
- const lock = ctx.historyEnabled || ctx.revisionTrackingEnabled ? await chunkKDRF3NR2_cjs.lockRecordedGraphWrite(target, ctx.graphId) : chunkKDRF3NR2_cjs.uncapturedGraphWriteLock();
95
+ return chunkEKFUG4G7_cjs.runOptionallyInTransaction(backend, async (target) => {
96
+ await lockSchemaVersionForStoreWrite(ctx, target);
97
+ const lock = ctx.historyEnabled || ctx.revisionTrackingEnabled ? await chunkJ7LXTUTP_cjs.lockRecordedGraphWrite(target, ctx.graphId) : chunkJ7LXTUTP_cjs.uncapturedGraphWriteLock();
69
98
  const result = await fn(target, lock);
70
- if (ctx.revisionTrackingEnabled && !ctx.historyEnabled) {
71
- await chunkKDRF3NR2_cjs.advanceRevisionClock(
99
+ if (ctx.revisionTrackingEnabled && !ctx.historyEnabled && (options?.didWrite?.(result) ?? true)) {
100
+ await chunkJ7LXTUTP_cjs.advanceRevisionClock(
72
101
  target,
73
102
  ctx.revisionSchema,
74
103
  ctx.graphId,
@@ -91,7 +120,7 @@ async function checkDisjointnessConstraint(ctx, kind, id) {
91
120
  for (const disjointKind of disjointKinds) {
92
121
  const existing = await ctx.backend.getNode(ctx.graphId, disjointKind, id);
93
122
  if (existing && !existing.deleted_at) {
94
- const error = chunkKDRF3NR2_cjs.checkDisjointness(id, kind, [disjointKind], ctx.registry);
123
+ const error = chunkJ7LXTUTP_cjs.checkDisjointness(id, kind, [disjointKind], ctx.registry);
95
124
  if (error) throw error;
96
125
  }
97
126
  }
@@ -108,7 +137,7 @@ async function checkCardinalityConstraint(ctx, edgeKind, cardinality, fromKind,
108
137
  fromKind,
109
138
  fromId
110
139
  });
111
- const error = chunkKDRF3NR2_cjs.checkCardinality(
140
+ const error = chunkJ7LXTUTP_cjs.checkCardinality(
112
141
  edgeKind,
113
142
  fromKind,
114
143
  fromId,
@@ -128,7 +157,7 @@ async function checkCardinalityConstraint(ctx, edgeKind, cardinality, fromKind,
128
157
  toKind,
129
158
  toId
130
159
  });
131
- const error = chunkKDRF3NR2_cjs.checkUniqueEdge(
160
+ const error = chunkJ7LXTUTP_cjs.checkUniqueEdge(
132
161
  edgeKind,
133
162
  fromKind,
134
163
  fromId,
@@ -150,7 +179,7 @@ async function checkCardinalityConstraint(ctx, edgeKind, cardinality, fromKind,
150
179
  fromId,
151
180
  activeOnly: true
152
181
  });
153
- const error = chunkKDRF3NR2_cjs.checkCardinality(
182
+ const error = chunkJ7LXTUTP_cjs.checkCardinality(
154
183
  edgeKind,
155
184
  fromKind,
156
185
  fromId,
@@ -167,7 +196,7 @@ async function checkCardinalityConstraint(ctx, edgeKind, cardinality, fromKind,
167
196
  // src/store/operations/node-operations.ts
168
197
  function getNodeRegistration(graph, kind) {
169
198
  const registration = graph.nodes[kind];
170
- if (registration === void 0) throw new chunkKTBTSHU6_cjs.KindNotFoundError(kind, "node");
199
+ if (registration === void 0) throw new chunkC4F7VJ5D_cjs.KindNotFoundError(kind, "node");
171
200
  return registration;
172
201
  }
173
202
  var CACHE_KEY_SEPARATOR = "\0";
@@ -178,7 +207,7 @@ function buildUniqueCacheKey(graphId, nodeKind, constraintName, key) {
178
207
  return `${graphId}${CACHE_KEY_SEPARATOR}${nodeKind}${CACHE_KEY_SEPARATOR}${constraintName}${CACHE_KEY_SEPARATOR}${key}`;
179
208
  }
180
209
  function createNodeAlreadyExistsError(kind, id) {
181
- return new chunkKTBTSHU6_cjs.ValidationError(
210
+ return new chunkC4F7VJ5D_cjs.ValidationError(
182
211
  `Node already exists: ${kind}/${id}`,
183
212
  {
184
213
  entityType: "node",
@@ -219,7 +248,7 @@ function resolveConstraint(graph, kind, constraintName) {
219
248
  (candidate) => candidate.name === constraintName
220
249
  );
221
250
  if (constraint === void 0) {
222
- throw new chunkKTBTSHU6_cjs.NodeConstraintNotFoundError(constraintName, kind);
251
+ throw new chunkC4F7VJ5D_cjs.NodeConstraintNotFoundError(constraintName, kind);
223
252
  }
224
253
  return constraint;
225
254
  }
@@ -280,8 +309,8 @@ function createNodeBatchValidationBackend(graphId, registry, backend) {
280
309
  }
281
310
  function registerPendingUniqueEntries(kind, id, props, constraints) {
282
311
  for (const constraint of constraints) {
283
- if (!chunkKDRF3NR2_cjs.checkWherePredicate(constraint, props)) continue;
284
- const key = chunkKDRF3NR2_cjs.computeUniqueKey(
312
+ if (!chunkJ7LXTUTP_cjs.checkWherePredicate(constraint, props)) continue;
313
+ const key = chunkJ7LXTUTP_cjs.computeUniqueKey(
285
314
  props,
286
315
  constraint.fields,
287
316
  constraint.collation
@@ -294,7 +323,7 @@ function createNodeBatchValidationBackend(graphId, registry, backend) {
294
323
  );
295
324
  pendingUniqueOwners.set(concreteEntryKey, id);
296
325
  if (constraint.scope !== "kind") {
297
- const kindsToCheck = chunkKDRF3NR2_cjs.getKindsForUniquenessCheck(
326
+ const kindsToCheck = chunkJ7LXTUTP_cjs.getKindsForUniquenessCheck(
298
327
  kind,
299
328
  constraint.scope,
300
329
  registry
@@ -313,12 +342,12 @@ function createNodeBatchValidationBackend(graphId, registry, backend) {
313
342
  }
314
343
  function registerAppliedNodeUpdate(kind, id, oldProps, newProps, constraints) {
315
344
  for (const constraint of constraints) {
316
- const oldApplies = chunkKDRF3NR2_cjs.checkWherePredicate(constraint, oldProps);
317
- const newApplies = chunkKDRF3NR2_cjs.checkWherePredicate(constraint, newProps);
318
- const oldKey = oldApplies ? chunkKDRF3NR2_cjs.computeUniqueKey(oldProps, constraint.fields, constraint.collation) : void 0;
319
- const newKey = newApplies ? chunkKDRF3NR2_cjs.computeUniqueKey(newProps, constraint.fields, constraint.collation) : void 0;
345
+ const oldApplies = chunkJ7LXTUTP_cjs.checkWherePredicate(constraint, oldProps);
346
+ const newApplies = chunkJ7LXTUTP_cjs.checkWherePredicate(constraint, newProps);
347
+ const oldKey = oldApplies ? chunkJ7LXTUTP_cjs.computeUniqueKey(oldProps, constraint.fields, constraint.collation) : void 0;
348
+ const newKey = newApplies ? chunkJ7LXTUTP_cjs.computeUniqueKey(newProps, constraint.fields, constraint.collation) : void 0;
320
349
  if (oldKey === newKey) continue;
321
- const kindsToCheck = chunkKDRF3NR2_cjs.getKindsForUniquenessCheck(
350
+ const kindsToCheck = chunkJ7LXTUTP_cjs.getKindsForUniquenessCheck(
322
351
  kind,
323
352
  constraint.scope,
324
353
  registry
@@ -358,7 +387,7 @@ function createNodeBatchValidationBackend(graphId, registry, backend) {
358
387
  if (uniqueCache.has(cacheKey)) return;
359
388
  uniqueCache.set(cacheKey, row);
360
389
  }
361
- const validationBackend = chunkECU53PMN_cjs.createBackendOverlay(backend, {
390
+ const validationBackend = chunkEKFUG4G7_cjs.createBackendOverlay(backend, {
362
391
  getNode: getNodeCached,
363
392
  checkUnique: checkUniqueCached
364
393
  });
@@ -375,7 +404,7 @@ function draftNodeCreate(ctx, input, id, options) {
375
404
  const kind = input.kind;
376
405
  const registration = getNodeRegistration(ctx.graph, kind);
377
406
  const nodeKind = registration.type;
378
- const validatedProps = options?.propsPreValidated === true ? input.props : chunkARN3ZODS_cjs.validateNodeProps(nodeKind.schema, input.props, {
407
+ const validatedProps = options?.propsPreValidated === true ? input.props : chunkKKYELPZ2_cjs.validateNodeProps(nodeKind.schema, input.props, {
379
408
  kind,
380
409
  operation: "create"
381
410
  });
@@ -385,8 +414,8 @@ function draftNodeCreate(ctx, input, id, options) {
385
414
  nodeKind,
386
415
  uniqueConstraints: registration.unique ?? [],
387
416
  validatedProps,
388
- validFrom: chunkZBV4LQD2_cjs.validateOptionalCanonicalIsoDate(input.validFrom, "validFrom"),
389
- validTo: chunkZBV4LQD2_cjs.validateOptionalCanonicalIsoDate(input.validTo, "validTo")
417
+ validFrom: chunkZTAJL4DT_cjs.validateOptionalCanonicalIsoDate(input.validFrom, "validFrom"),
418
+ validTo: chunkZTAJL4DT_cjs.validateOptionalCanonicalIsoDate(input.validTo, "validTo")
390
419
  };
391
420
  }
392
421
  async function finishNodeCreatePreparation(ctx, draft, backend) {
@@ -401,8 +430,8 @@ async function finishNodeCreatePreparation(ctx, draft, backend) {
401
430
  backend
402
431
  };
403
432
  await checkDisjointnessConstraint(constraintContext, kind, id);
404
- await chunkKDRF3NR2_cjs.checkUniquenessConstraints(
405
- chunkKDRF3NR2_cjs.createUniquenessContext(ctx.graphId, ctx.registry, backend),
433
+ await chunkJ7LXTUTP_cjs.checkUniquenessConstraints(
434
+ chunkJ7LXTUTP_cjs.createUniquenessContext(ctx.graphId, ctx.registry, backend),
406
435
  kind,
407
436
  id,
408
437
  validatedProps,
@@ -432,8 +461,8 @@ async function validateAndPrepareNodeCreate(ctx, input, id, backend, options) {
432
461
  );
433
462
  }
434
463
  async function finalizeNodeCreateBatch(ctx, preparedCreates, backend, lock) {
435
- await chunkKDRF3NR2_cjs.applyNodeInsertSideEffectsBatch(
436
- chunkKDRF3NR2_cjs.createNodeWriteContext(ctx.graphId, ctx.registry, lock),
464
+ await chunkJ7LXTUTP_cjs.applyNodeInsertSideEffectsBatch(
465
+ chunkJ7LXTUTP_cjs.createNodeWriteContext(ctx.graphId, ctx.registry, lock),
437
466
  preparedCreates.map((prepared) => ({
438
467
  kind: prepared.kind,
439
468
  id: prepared.id,
@@ -445,8 +474,8 @@ async function finalizeNodeCreateBatch(ctx, preparedCreates, backend, lock) {
445
474
  );
446
475
  }
447
476
  async function finalizeNodeCreate(ctx, prepared, backend, lock) {
448
- await chunkKDRF3NR2_cjs.applyNodeInsertSideEffects(
449
- chunkKDRF3NR2_cjs.createNodeWriteContext(ctx.graphId, ctx.registry, lock),
477
+ await chunkJ7LXTUTP_cjs.applyNodeInsertSideEffects(
478
+ chunkJ7LXTUTP_cjs.createNodeWriteContext(ctx.graphId, ctx.registry, lock),
450
479
  {
451
480
  kind: prepared.kind,
452
481
  id: prepared.id,
@@ -459,7 +488,7 @@ async function finalizeNodeCreate(ctx, prepared, backend, lock) {
459
488
  }
460
489
  function computeNodeUpdate(ctx, kind, id, existingProps, inputProps) {
461
490
  const registration = getNodeRegistration(ctx.graph, kind);
462
- const validatedProps = chunkARN3ZODS_cjs.validateNodeProps(
491
+ const validatedProps = chunkKKYELPZ2_cjs.validateNodeProps(
463
492
  registration.type.schema,
464
493
  { ...existingProps, ...inputProps },
465
494
  { kind, operation: "update", id }
@@ -467,7 +496,7 @@ function computeNodeUpdate(ctx, kind, id, existingProps, inputProps) {
467
496
  return { registration, validatedProps };
468
497
  }
469
498
  function resolveNodeUpdateProps(ctx, existing, inputProps) {
470
- const existingProps = chunkECU53PMN_cjs.rowPropsToObject(existing.props);
499
+ const existingProps = chunkEKFUG4G7_cjs.rowPropsToObject(existing.props);
471
500
  const { registration, validatedProps } = computeNodeUpdate(
472
501
  ctx,
473
502
  existing.kind,
@@ -493,15 +522,15 @@ function nodeUpsertDirtyCheck(ctx, kind, id, existingProps, inputProps) {
493
522
  async function performNodeUpdate(ctx, input, backend, lock, options) {
494
523
  const { kind, id } = input;
495
524
  const existing = await backend.getNode(ctx.graphId, kind, id);
496
- if (!existing) throw new chunkKTBTSHU6_cjs.NodeNotFoundError(kind, id);
525
+ if (!existing) throw new chunkC4F7VJ5D_cjs.NodeNotFoundError(kind, id);
497
526
  const { registration, validatedProps } = resolveNodeUpdateProps(
498
527
  ctx,
499
528
  existing,
500
529
  input.props
501
530
  );
502
531
  const nodeKind = registration.type;
503
- const validTo = chunkZBV4LQD2_cjs.validateOptionalCanonicalIsoDate(input.validTo, "validTo");
504
- const writeContext = chunkKDRF3NR2_cjs.createNodeWriteContext(ctx.graphId, ctx.registry, lock);
532
+ const validTo = chunkZTAJL4DT_cjs.validateOptionalCanonicalIsoDate(input.validTo, "validTo");
533
+ const writeContext = chunkJ7LXTUTP_cjs.createNodeWriteContext(ctx.graphId, ctx.registry, lock);
505
534
  const shared = {
506
535
  schema: nodeKind.schema,
507
536
  validatedProps,
@@ -509,15 +538,15 @@ async function performNodeUpdate(ctx, input, backend, lock, options) {
509
538
  ...validTo !== void 0 && { validTo }
510
539
  };
511
540
  if (options?.clearDeleted) {
512
- const row2 = await chunkKDRF3NR2_cjs.applyNodeUpdate(
541
+ const row2 = await chunkJ7LXTUTP_cjs.applyNodeUpdate(
513
542
  writeContext,
514
543
  { ...shared, existing, clearDeleted: true },
515
544
  backend
516
545
  );
517
546
  return rowToNode(row2);
518
547
  }
519
- if (!chunkECU53PMN_cjs.isLiveNodeRow(existing)) throw new chunkKTBTSHU6_cjs.NodeNotFoundError(kind, id);
520
- const row = await chunkKDRF3NR2_cjs.applyNodeUpdate(
548
+ if (!chunkEKFUG4G7_cjs.isLiveNodeRow(existing)) throw new chunkC4F7VJ5D_cjs.NodeNotFoundError(kind, id);
549
+ const row = await chunkJ7LXTUTP_cjs.applyNodeUpdate(
521
550
  writeContext,
522
551
  { ...shared, existing },
523
552
  backend
@@ -545,13 +574,13 @@ async function primeBatchValidationCaches(ctx, drafts, backend, seams) {
545
574
  const groups = /* @__PURE__ */ new Map();
546
575
  for (const draft of drafts) {
547
576
  for (const constraint of draft.uniqueConstraints) {
548
- if (!chunkKDRF3NR2_cjs.checkWherePredicate(constraint, draft.validatedProps)) continue;
549
- const key = chunkKDRF3NR2_cjs.computeUniqueKey(
577
+ if (!chunkJ7LXTUTP_cjs.checkWherePredicate(constraint, draft.validatedProps)) continue;
578
+ const key = chunkJ7LXTUTP_cjs.computeUniqueKey(
550
579
  draft.validatedProps,
551
580
  constraint.fields,
552
581
  constraint.collation
553
582
  );
554
- const kindsToCheck = chunkKDRF3NR2_cjs.getKindsForUniquenessCheck(
583
+ const kindsToCheck = chunkJ7LXTUTP_cjs.getKindsForUniquenessCheck(
555
584
  draft.kind,
556
585
  constraint.scope,
557
586
  ctx.registry
@@ -597,7 +626,7 @@ async function prepareBatchCreates(ctx, inputs, backend, options) {
597
626
  seedUniqueRow
598
627
  } = createNodeBatchValidationBackend(ctx.graphId, ctx.registry, backend);
599
628
  const drafts = inputs.map(
600
- (input) => draftNodeCreate(ctx, input, input.id ?? chunkKDRF3NR2_cjs.generateId(), options)
629
+ (input) => draftNodeCreate(ctx, input, input.id ?? chunkJ7LXTUTP_cjs.generateId(), options)
601
630
  );
602
631
  await primeBatchValidationCaches(ctx, drafts, backend, {
603
632
  seedNodeRow,
@@ -673,7 +702,7 @@ async function batchCheckUniqueAcrossKinds(backend, graphId, constraintName, uni
673
702
  }
674
703
  async function executeNodeCreateInternal(ctx, input, backend, options) {
675
704
  const kind = input.kind;
676
- const id = input.id ?? chunkKDRF3NR2_cjs.generateId();
705
+ const id = input.id ?? chunkJ7LXTUTP_cjs.generateId();
677
706
  const opContext = ctx.createOperationContext("create", "node", kind, id);
678
707
  const shouldReturnRow = options?.returnRow ?? true;
679
708
  return runHookedWriteOperation(
@@ -692,8 +721,8 @@ async function executeNodeCreateInternal(ctx, input, backend, options) {
692
721
  if (shouldReturnRow) {
693
722
  row = await target.insertNode(prepared.insertParams);
694
723
  } else {
695
- await chunkKDRF3NR2_cjs.runInsertNoReturn(
696
- chunkKDRF3NR2_cjs.nodeInsertDispatch(target),
724
+ await chunkJ7LXTUTP_cjs.runInsertNoReturn(
725
+ chunkJ7LXTUTP_cjs.nodeInsertDispatch(target),
697
726
  prepared.insertParams
698
727
  );
699
728
  }
@@ -709,7 +738,7 @@ async function executeNodeCreate(ctx, input, backend, options) {
709
738
  ...options
710
739
  });
711
740
  if (!result) {
712
- throw new chunkKTBTSHU6_cjs.DatabaseOperationError(
741
+ throw new chunkC4F7VJ5D_cjs.DatabaseOperationError(
713
742
  "Node create failed: expected created node row",
714
743
  { operation: "insert", entity: "node" }
715
744
  );
@@ -724,7 +753,7 @@ async function executeNodeCreateNoReturnBatch(ctx, inputs, backend) {
724
753
  inputs,
725
754
  target
726
755
  );
727
- await chunkKDRF3NR2_cjs.runInsertBatch(chunkKDRF3NR2_cjs.nodeInsertDispatch(target), batchInsertParams);
756
+ await chunkJ7LXTUTP_cjs.runInsertBatch(chunkJ7LXTUTP_cjs.nodeInsertDispatch(target), batchInsertParams);
728
757
  await finalizeNodeCreateBatch(ctx, preparedCreates, target, lock);
729
758
  });
730
759
  }
@@ -737,8 +766,8 @@ async function executeNodeCreateBatch(ctx, inputs, backend, options) {
737
766
  target,
738
767
  options
739
768
  );
740
- const rows = await chunkKDRF3NR2_cjs.runInsertBatchReturning(
741
- chunkKDRF3NR2_cjs.nodeInsertDispatch(target),
769
+ const rows = await chunkJ7LXTUTP_cjs.runInsertBatchReturning(
770
+ chunkJ7LXTUTP_cjs.nodeInsertDispatch(target),
742
771
  batchInsertParams
743
772
  );
744
773
  await finalizeNodeCreateBatch(ctx, preparedCreates, target, lock);
@@ -759,6 +788,237 @@ async function executeNodeUpdate(ctx, input, backend, options) {
759
788
  (target, lock) => performNodeUpdate(ctx, input, target, lock, options)
760
789
  );
761
790
  }
791
+ async function executeNodeUpdateWhere(ctx, kind, inputPatch, candidateIds, candidateIdColumn, backend) {
792
+ const registration = getNodeRegistration(ctx.graph, kind);
793
+ const schema = registration.type.schema;
794
+ const uniqueConstraints = registration.unique ?? [];
795
+ if (!backend.capabilities.transactions) {
796
+ throw new chunkC4F7VJ5D_cjs.ConfigurationError(
797
+ "updateWhere() requires a transactional backend so validation and sidecars are atomic",
798
+ { code: "SET_UPDATE_TRANSACTIONS_REQUIRED", kind }
799
+ );
800
+ }
801
+ if (backend.updateNodeSet === void 0) {
802
+ throw new chunkC4F7VJ5D_cjs.ConfigurationError(
803
+ "This backend does not support set-based node updates",
804
+ { code: "SET_UPDATE_UNSUPPORTED", kind }
805
+ );
806
+ }
807
+ if (Object.keys(inputPatch).length === 0) {
808
+ throw new chunkC4F7VJ5D_cjs.ValidationError("updateWhere() patch must not be empty", {
809
+ entityType: "node",
810
+ kind,
811
+ operation: "update",
812
+ issues: [{ path: "patch", message: "Provide at least one property" }]
813
+ });
814
+ }
815
+ const unknownProperty = Object.keys(inputPatch).find(
816
+ (property) => !Object.hasOwn(schema.shape, property)
817
+ );
818
+ if (unknownProperty !== void 0) {
819
+ throw new chunkC4F7VJ5D_cjs.ValidationError(
820
+ `Unknown ${kind} property in updateWhere() patch: ${unknownProperty}`,
821
+ {
822
+ entityType: "node",
823
+ kind,
824
+ operation: "update",
825
+ issues: [
826
+ {
827
+ path: unknownProperty,
828
+ message: "Property is not declared by the node schema"
829
+ }
830
+ ]
831
+ }
832
+ );
833
+ }
834
+ const parsedPatch = chunkKKYELPZ2_cjs.validateNodeProps(schema.partial(), inputPatch, {
835
+ kind,
836
+ operation: "update"
837
+ });
838
+ const patch = {};
839
+ const unsetProperties = [];
840
+ for (const [property, value] of Object.entries(parsedPatch)) {
841
+ if (value === void 0) {
842
+ unsetProperties.push(property);
843
+ continue;
844
+ }
845
+ chunkD54WH24V_cjs.assertJsonValue(value, property, `Node "${kind}" updateWhere patch`);
846
+ patch[property] = value;
847
+ }
848
+ if (Object.keys(patch).length === 0 && unsetProperties.length === 0) {
849
+ throw new chunkC4F7VJ5D_cjs.ValidationError(
850
+ "updateWhere() patch has no recognized properties",
851
+ {
852
+ entityType: "node",
853
+ kind,
854
+ operation: "update",
855
+ issues: [
856
+ { path: "patch", message: "Provide a declared node property" }
857
+ ]
858
+ }
859
+ );
860
+ }
861
+ if (uniqueConstraints.length > 0 && (backend.hardDeleteUniquesByNodeIds === void 0 || backend.insertUniqueBatch === void 0 || backend.checkUniqueBatch === void 0)) {
862
+ throw new chunkC4F7VJ5D_cjs.ConfigurationError(
863
+ "updateWhere() requires batched uniqueness sidecar operations for constrained nodes",
864
+ { code: "SET_UPDATE_UNIQUENESS_UNSUPPORTED", kind }
865
+ );
866
+ }
867
+ if (chunkHAHNRASW_cjs.getSearchableFields(schema).length > 0 && (backend.upsertFulltext === void 0 || backend.deleteFulltext === void 0 || backend.upsertFulltextBatch === void 0 || backend.deleteFulltextBatch === void 0)) {
868
+ throw new chunkC4F7VJ5D_cjs.ConfigurationError(
869
+ "updateWhere() requires batched fulltext sidecar operations for searchable nodes",
870
+ { code: "SET_UPDATE_FULLTEXT_UNSUPPORTED", kind }
871
+ );
872
+ }
873
+ if (chunkJ7LXTUTP_cjs.getEmbeddingFields(schema).length > 0 && (backend.upsertEmbedding === void 0 || backend.deleteEmbedding === void 0 || backend.upsertEmbeddingBatch === void 0 || backend.deleteEmbeddingBatch === void 0)) {
874
+ throw new chunkC4F7VJ5D_cjs.ConfigurationError(
875
+ "updateWhere() requires batched vector sidecar operations for embedded nodes",
876
+ { code: "SET_UPDATE_VECTOR_UNSUPPORTED", kind }
877
+ );
878
+ }
879
+ const hookContext = ctx.createBulkOperationContext("updateWhere", kind);
880
+ return ctx.withBulkOperationHooks(
881
+ hookContext,
882
+ () => runInWriteTransaction(
883
+ ctx,
884
+ backend,
885
+ async (target, lock) => {
886
+ const updateNodeSet = target.updateNodeSet;
887
+ if (updateNodeSet === void 0) {
888
+ throw new chunkC4F7VJ5D_cjs.ConfigurationError(
889
+ "The transaction backend does not support set-based node updates",
890
+ { code: "SET_UPDATE_UNSUPPORTED", kind }
891
+ );
892
+ }
893
+ const hardDeleteUniquesByNodeIds = target.hardDeleteUniquesByNodeIds;
894
+ if (uniqueConstraints.length > 0 && (hardDeleteUniquesByNodeIds === void 0 || target.insertUniqueBatch === void 0 || target.checkUniqueBatch === void 0)) {
895
+ throw new chunkC4F7VJ5D_cjs.ConfigurationError(
896
+ "The transaction backend lacks batched uniqueness operations",
897
+ { code: "SET_UPDATE_UNIQUENESS_UNSUPPORTED", kind }
898
+ );
899
+ }
900
+ if (chunkHAHNRASW_cjs.getSearchableFields(schema).length > 0 && (target.upsertFulltext === void 0 || target.deleteFulltext === void 0 || target.upsertFulltextBatch === void 0 || target.deleteFulltextBatch === void 0)) {
901
+ throw new chunkC4F7VJ5D_cjs.ConfigurationError(
902
+ "The transaction backend lacks batched fulltext operations",
903
+ { code: "SET_UPDATE_FULLTEXT_UNSUPPORTED", kind }
904
+ );
905
+ }
906
+ if (chunkJ7LXTUTP_cjs.getEmbeddingFields(schema).length > 0 && (target.upsertEmbedding === void 0 || target.deleteEmbedding === void 0 || target.upsertEmbeddingBatch === void 0 || target.deleteEmbeddingBatch === void 0)) {
907
+ throw new chunkC4F7VJ5D_cjs.ConfigurationError(
908
+ "The transaction backend lacks batched vector operations",
909
+ { code: "SET_UPDATE_VECTOR_UNSUPPORTED", kind }
910
+ );
911
+ }
912
+ const result = await updateNodeSet({
913
+ graphId: ctx.graphId,
914
+ kind,
915
+ patch,
916
+ unsetProperties,
917
+ candidateIds,
918
+ candidateIdColumn
919
+ });
920
+ if (result.affectedCount === 0) return { affectedCount: 0 };
921
+ const sidecarItems = result.rows.map((row) => {
922
+ const props = chunkEKFUG4G7_cjs.rowPropsToObject(row.props);
923
+ const validatedProps = chunkKKYELPZ2_cjs.validateNodeProps(schema, props, {
924
+ kind,
925
+ operation: "update",
926
+ id: row.id
927
+ });
928
+ if (!chunkACSVZPK7_cjs.canonicalEqual(validatedProps, props)) {
929
+ throw new chunkC4F7VJ5D_cjs.ValidationError(
930
+ `Set update would persist a non-canonical ${kind} row`,
931
+ {
932
+ entityType: "node",
933
+ kind,
934
+ operation: "update",
935
+ id: row.id,
936
+ issues: [
937
+ {
938
+ path: "props",
939
+ message: "The complete row requires schema normalization"
940
+ }
941
+ ]
942
+ }
943
+ );
944
+ }
945
+ return {
946
+ kind,
947
+ id: row.id,
948
+ schema,
949
+ props: validatedProps,
950
+ uniqueConstraints
951
+ };
952
+ });
953
+ if (uniqueConstraints.length > 0) {
954
+ const affectedIds = new Set(result.rows.map((row) => row.id));
955
+ for (const constraint of uniqueConstraints) {
956
+ const keyToId = /* @__PURE__ */ new Map();
957
+ for (const item of sidecarItems) {
958
+ if (!chunkJ7LXTUTP_cjs.checkWherePredicate(constraint, item.props)) continue;
959
+ const key = chunkJ7LXTUTP_cjs.computeUniqueKey(
960
+ item.props,
961
+ constraint.fields,
962
+ constraint.collation
963
+ );
964
+ const priorId = keyToId.get(key);
965
+ if (priorId !== void 0 && priorId !== item.id) {
966
+ throw new chunkC4F7VJ5D_cjs.UniquenessError({
967
+ constraintName: constraint.name,
968
+ kind,
969
+ existingId: priorId,
970
+ newId: item.id,
971
+ fields: constraint.fields
972
+ });
973
+ }
974
+ keyToId.set(key, item.id);
975
+ }
976
+ const keys = [...keyToId.keys()];
977
+ if (keys.length === 0) continue;
978
+ for (const kindToCheck of chunkJ7LXTUTP_cjs.getKindsForUniquenessCheck(
979
+ kind,
980
+ constraint.scope,
981
+ ctx.registry
982
+ )) {
983
+ const existingRows = await chunk764JHTLT_cjs.requireDefined(
984
+ target.checkUniqueBatch
985
+ )({
986
+ graphId: ctx.graphId,
987
+ nodeKind: kindToCheck,
988
+ constraintName: constraint.name,
989
+ keys
990
+ });
991
+ for (const existing of existingRows) {
992
+ if (existing.concrete_kind === kind && affectedIds.has(existing.node_id)) {
993
+ continue;
994
+ }
995
+ throw new chunkC4F7VJ5D_cjs.UniquenessError({
996
+ constraintName: constraint.name,
997
+ kind: kindToCheck,
998
+ existingId: existing.node_id,
999
+ newId: chunk764JHTLT_cjs.requireDefined(keyToId.get(existing.key)),
1000
+ fields: constraint.fields
1001
+ });
1002
+ }
1003
+ }
1004
+ }
1005
+ await chunk764JHTLT_cjs.requireDefined(hardDeleteUniquesByNodeIds)({
1006
+ graphId: ctx.graphId,
1007
+ concreteKind: kind,
1008
+ nodeIds: result.rows.map((row) => row.id)
1009
+ });
1010
+ }
1011
+ await chunkJ7LXTUTP_cjs.applyNodeInsertSideEffectsBatch(
1012
+ chunkJ7LXTUTP_cjs.createNodeWriteContext(ctx.graphId, ctx.registry, lock),
1013
+ sidecarItems,
1014
+ target
1015
+ );
1016
+ return { affectedCount: result.affectedCount };
1017
+ },
1018
+ { didWrite: (result) => result.affectedCount > 0 }
1019
+ )
1020
+ );
1021
+ }
762
1022
  async function executeNodeUpsertUpdate(ctx, input, backend, options) {
763
1023
  return runInWriteTransaction(
764
1024
  ctx,
@@ -777,9 +1037,9 @@ async function executeNodeDelete(ctx, kind, id, backend) {
777
1037
  async (target, lock) => {
778
1038
  const registration = getNodeRegistration(ctx.graph, kind);
779
1039
  const preflight = await target.getNode(ctx.graphId, kind, id);
780
- if (!preflight || !chunkECU53PMN_cjs.isLiveNodeRow(preflight)) return;
781
- await chunkKDRF3NR2_cjs.applyNodeSoftDelete(
782
- chunkKDRF3NR2_cjs.createNodeWriteContext(ctx.graphId, ctx.registry, lock),
1040
+ if (!preflight || !chunkEKFUG4G7_cjs.isLiveNodeRow(preflight)) return;
1041
+ await chunkJ7LXTUTP_cjs.applyNodeSoftDelete(
1042
+ chunkJ7LXTUTP_cjs.createNodeWriteContext(ctx.graphId, ctx.registry, lock),
783
1043
  {
784
1044
  existing: preflight,
785
1045
  schema: registration.type.schema,
@@ -801,8 +1061,8 @@ async function executeNodeHardDelete(ctx, kind, id, backend) {
801
1061
  backend,
802
1062
  async (target, lock) => {
803
1063
  const registration = getNodeRegistration(ctx.graph, kind);
804
- await chunkKDRF3NR2_cjs.applyNodeHardDelete(
805
- chunkKDRF3NR2_cjs.createNodeWriteContext(ctx.graphId, ctx.registry, lock),
1064
+ await chunkJ7LXTUTP_cjs.applyNodeHardDelete(
1065
+ chunkJ7LXTUTP_cjs.createNodeWriteContext(ctx.graphId, ctx.registry, lock),
806
1066
  {
807
1067
  kind,
808
1068
  id,
@@ -818,12 +1078,12 @@ async function executeNodeGetOrCreateByConstraint(ctx, kind, constraintName, pro
818
1078
  const ifExists = options?.ifExists ?? "return";
819
1079
  const registration = getNodeRegistration(ctx.graph, kind);
820
1080
  const nodeKind = registration.type;
821
- const validatedProps = chunkARN3ZODS_cjs.validateNodeProps(nodeKind.schema, props, {
1081
+ const validatedProps = chunkKKYELPZ2_cjs.validateNodeProps(nodeKind.schema, props, {
822
1082
  kind,
823
1083
  operation: "create"
824
1084
  });
825
1085
  const constraint = resolveConstraint(ctx.graph, kind, constraintName);
826
- if (!chunkKDRF3NR2_cjs.checkWherePredicate(constraint, validatedProps)) {
1086
+ if (!chunkJ7LXTUTP_cjs.checkWherePredicate(constraint, validatedProps)) {
827
1087
  const node = await executeNodeCreate(
828
1088
  ctx,
829
1089
  { kind, props: validatedProps },
@@ -832,12 +1092,12 @@ async function executeNodeGetOrCreateByConstraint(ctx, kind, constraintName, pro
832
1092
  );
833
1093
  return { node, action: "created" };
834
1094
  }
835
- const key = chunkKDRF3NR2_cjs.computeUniqueKey(
1095
+ const key = chunkJ7LXTUTP_cjs.computeUniqueKey(
836
1096
  validatedProps,
837
1097
  constraint.fields,
838
1098
  constraint.collation
839
1099
  );
840
- const kindsToCheck = chunkKDRF3NR2_cjs.getKindsForUniquenessCheck(
1100
+ const kindsToCheck = chunkJ7LXTUTP_cjs.getKindsForUniquenessCheck(
841
1101
  kind,
842
1102
  constraint.scope,
843
1103
  ctx.registry
@@ -894,25 +1154,25 @@ async function executeNodeGetOrCreateByConstraint(ctx, kind, constraintName, pro
894
1154
  try {
895
1155
  return await attempt();
896
1156
  } catch (error) {
897
- if (!(error instanceof chunkKTBTSHU6_cjs.UniquenessError)) throw error;
1157
+ if (!(error instanceof chunkC4F7VJ5D_cjs.UniquenessError)) throw error;
898
1158
  return attempt();
899
1159
  }
900
1160
  }
901
1161
  async function executeNodeFindByConstraint(ctx, kind, constraintName, props, backend) {
902
1162
  const registration = getNodeRegistration(ctx.graph, kind);
903
1163
  const nodeKind = registration.type;
904
- const validatedProps = chunkARN3ZODS_cjs.validateNodeProps(nodeKind.schema, props, {
1164
+ const validatedProps = chunkKKYELPZ2_cjs.validateNodeProps(nodeKind.schema, props, {
905
1165
  kind,
906
1166
  operation: "create"
907
1167
  });
908
1168
  const constraint = resolveConstraint(ctx.graph, kind, constraintName);
909
- if (!chunkKDRF3NR2_cjs.checkWherePredicate(constraint, validatedProps)) return void 0;
910
- const key = chunkKDRF3NR2_cjs.computeUniqueKey(
1169
+ if (!chunkJ7LXTUTP_cjs.checkWherePredicate(constraint, validatedProps)) return void 0;
1170
+ const key = chunkJ7LXTUTP_cjs.computeUniqueKey(
911
1171
  validatedProps,
912
1172
  constraint.fields,
913
1173
  constraint.collation
914
1174
  );
915
- const kindsToCheck = chunkKDRF3NR2_cjs.getKindsForUniquenessCheck(
1175
+ const kindsToCheck = chunkJ7LXTUTP_cjs.getKindsForUniquenessCheck(
916
1176
  kind,
917
1177
  constraint.scope,
918
1178
  ctx.registry
@@ -938,12 +1198,12 @@ async function executeNodeFindByConstraint(ctx, kind, constraintName, props, bac
938
1198
  function validateAndComputeKeys(nodeKind, kind, constraint, items) {
939
1199
  const validated = [];
940
1200
  for (const item of items) {
941
- const validatedProps = chunkARN3ZODS_cjs.validateNodeProps(nodeKind.schema, item.props, {
1201
+ const validatedProps = chunkKKYELPZ2_cjs.validateNodeProps(nodeKind.schema, item.props, {
942
1202
  kind,
943
1203
  operation: "create"
944
1204
  });
945
- const applies = chunkKDRF3NR2_cjs.checkWherePredicate(constraint, validatedProps);
946
- const key = applies ? chunkKDRF3NR2_cjs.computeUniqueKey(
1205
+ const applies = chunkJ7LXTUTP_cjs.checkWherePredicate(constraint, validatedProps);
1206
+ const key = applies ? chunkJ7LXTUTP_cjs.computeUniqueKey(
947
1207
  validatedProps,
948
1208
  constraint.fields,
949
1209
  constraint.collation
@@ -966,7 +1226,7 @@ async function executeNodeBulkFindByConstraint(ctx, kind, constraintName, items,
966
1226
  const constraint = resolveConstraint(ctx.graph, kind, constraintName);
967
1227
  const validated = validateAndComputeKeys(nodeKind, kind, constraint, items);
968
1228
  const uniqueKeys = collectUniqueKeys(validated);
969
- const kindsToCheck = chunkKDRF3NR2_cjs.getKindsForUniquenessCheck(
1229
+ const kindsToCheck = chunkJ7LXTUTP_cjs.getKindsForUniquenessCheck(
970
1230
  kind,
971
1231
  constraint.scope,
972
1232
  ctx.registry
@@ -1016,10 +1276,10 @@ function resolveNodeIndex(graph, kind, indexName) {
1016
1276
  (candidate) => candidate.entity === "node" && candidate.kind === kind && candidate.name === indexName
1017
1277
  );
1018
1278
  if (declaration?.entity !== "node") {
1019
- throw new chunkKTBTSHU6_cjs.NodeIndexNotFoundError(indexName, kind);
1279
+ throw new chunkC4F7VJ5D_cjs.NodeIndexNotFoundError(indexName, kind);
1020
1280
  }
1021
1281
  if (declaration.method !== void 0) {
1022
- throw new chunkKTBTSHU6_cjs.ConfigurationError(
1282
+ throw new chunkC4F7VJ5D_cjs.ConfigurationError(
1023
1283
  `bulkFindByIndex cannot probe index "${indexName}" (method "${declaration.method}"): only btree indexes serve equality probes.`,
1024
1284
  { indexName, kind, method: declaration.method }
1025
1285
  );
@@ -1057,7 +1317,7 @@ function validateIndexProbeValue(value, valueType, pointer, kind) {
1057
1317
  }
1058
1318
  }
1059
1319
  function indexProbeTypeError(pointer, kind, expected, value) {
1060
- return new chunkKTBTSHU6_cjs.ValidationError(
1320
+ return new chunkC4F7VJ5D_cjs.ValidationError(
1061
1321
  `Index probe value for "${pointer}" on node kind "${kind}" has an incompatible type`,
1062
1322
  {
1063
1323
  entityType: "node",
@@ -1091,7 +1351,7 @@ async function executeNodeBulkFindByIndex(ctx, kind, indexName, items, backend,
1091
1351
  if (items.length === 0) return [];
1092
1352
  const index = resolveNodeIndex(ctx.graph, kind, indexName);
1093
1353
  if (index.fields.length === 0) {
1094
- throw new chunkKTBTSHU6_cjs.ConfigurationError(
1354
+ throw new chunkC4F7VJ5D_cjs.ConfigurationError(
1095
1355
  `bulkFindByIndex requires an index with at least one prop-based field on index "${indexName}" (node kind "${kind}")`,
1096
1356
  { indexName, kind },
1097
1357
  {
@@ -1100,7 +1360,7 @@ async function executeNodeBulkFindByIndex(ctx, kind, indexName, items, backend,
1100
1360
  );
1101
1361
  }
1102
1362
  if (index.fieldValueTypes.includes("date")) {
1103
- throw new chunkKTBTSHU6_cjs.ConfigurationError(
1363
+ throw new chunkC4F7VJ5D_cjs.ConfigurationError(
1104
1364
  `bulkFindByIndex does not support date-typed key fields on index "${indexName}" (node kind "${kind}")`,
1105
1365
  { indexName, kind },
1106
1366
  {
@@ -1110,7 +1370,7 @@ async function executeNodeBulkFindByIndex(ctx, kind, indexName, items, backend,
1110
1370
  }
1111
1371
  const limitPerInput = options?.limitPerInput;
1112
1372
  if (limitPerInput !== void 0 && (!Number.isInteger(limitPerInput) || limitPerInput <= 0)) {
1113
- throw new chunkKTBTSHU6_cjs.ValidationError(
1373
+ throw new chunkC4F7VJ5D_cjs.ValidationError(
1114
1374
  "bulkFindByIndex limitPerInput must be a positive integer",
1115
1375
  {
1116
1376
  entityType: "node",
@@ -1125,7 +1385,7 @@ async function executeNodeBulkFindByIndex(ctx, kind, indexName, items, backend,
1125
1385
  }
1126
1386
  );
1127
1387
  }
1128
- const adapter = chunkUTTW2Q3M_cjs.getDialect(backend.dialect);
1388
+ const adapter = chunkJXUTCSXX_cjs.getDialect(backend.dialect);
1129
1389
  const probes = items.map(
1130
1390
  (item) => index.fields.map((pointer, position) => {
1131
1391
  const value = chunkTDXIBCGY_cjs.resolveJsonPointer(item.props, pointer);
@@ -1152,47 +1412,47 @@ async function executeNodeBulkFindByIndex(ctx, kind, indexName, items, backend,
1152
1412
  }
1153
1413
  groupToInputs[existing]?.push(inputIndex);
1154
1414
  }
1155
- const schema = backend.tableNames ? chunkCVK4T34X_cjs.createSqlSchema(backend.tableNames) : chunkCVK4T34X_cjs.DEFAULT_SQL_SCHEMA;
1415
+ const schema = backend.tableNames ? chunkCPEL3YIR_cjs.createSqlSchema(backend.tableNames) : chunkCPEL3YIR_cjs.DEFAULT_SQL_SCHEMA;
1156
1416
  const compileContext = {
1157
1417
  dialect: backend.dialect,
1158
- propsColumn: chunkX2XOQZT3_cjs.sql.raw(`"props"`),
1159
- systemColumn: (column) => chunkX2XOQZT3_cjs.sql.raw(`"${column}"`)
1418
+ propsColumn: chunkU5W4LKZV_cjs.sql.raw(`"props"`),
1419
+ systemColumn: (column) => chunkU5W4LKZV_cjs.sql.raw(`"${column}"`)
1160
1420
  };
1161
- const fieldKeys = chunkUTTW2Q3M_cjs.compileNodeIndexFieldKeys(index, compileContext);
1421
+ const fieldKeys = chunkJXUTCSXX_cjs.compileNodeIndexFieldKeys(index, compileContext);
1162
1422
  const groupPredicates = groupProbes.map(
1163
- (probe) => chunkX2XOQZT3_cjs.sql`(${chunkX2XOQZT3_cjs.sql.join(
1423
+ (probe) => chunkU5W4LKZV_cjs.sql`(${chunkU5W4LKZV_cjs.sql.join(
1164
1424
  fieldKeys.map((fieldKey, position) => {
1165
1425
  const value = probe[position];
1166
1426
  if (value === void 0 || value === null) {
1167
- return chunkX2XOQZT3_cjs.sql`${fieldKey} IS NULL`;
1427
+ return chunkU5W4LKZV_cjs.sql`${fieldKey} IS NULL`;
1168
1428
  }
1169
1429
  return adapter.nullSafeEquals(
1170
1430
  fieldKey,
1171
- chunkX2XOQZT3_cjs.sql`${coerceIndexProbeBind(value, adapter)}`
1431
+ chunkU5W4LKZV_cjs.sql`${coerceIndexProbeBind(value, adapter)}`
1172
1432
  );
1173
1433
  }),
1174
- chunkX2XOQZT3_cjs.sql` AND `
1434
+ chunkU5W4LKZV_cjs.sql` AND `
1175
1435
  )})`
1176
1436
  );
1177
1437
  const caseBranches = groupPredicates.map(
1178
- (predicate, group) => chunkX2XOQZT3_cjs.sql`WHEN ${predicate} THEN ${chunkX2XOQZT3_cjs.sql.raw(String(group))}`
1438
+ (predicate, group) => chunkU5W4LKZV_cjs.sql`WHEN ${predicate} THEN ${chunkU5W4LKZV_cjs.sql.raw(String(group))}`
1179
1439
  );
1180
- const probeIndexExpr = chunkX2XOQZT3_cjs.sql`CASE ${chunkX2XOQZT3_cjs.sql.join(caseBranches, chunkX2XOQZT3_cjs.sql` `)} ELSE NULL END`;
1440
+ const probeIndexExpr = chunkU5W4LKZV_cjs.sql`CASE ${chunkU5W4LKZV_cjs.sql.join(caseBranches, chunkU5W4LKZV_cjs.sql` `)} ELSE NULL END`;
1181
1441
  const conditions = [
1182
- chunkX2XOQZT3_cjs.sql`"graph_id" = ${ctx.graphId}`,
1183
- chunkX2XOQZT3_cjs.sql`"kind" = ${kind}`,
1184
- chunkX2XOQZT3_cjs.sql`"deleted_at" IS NULL`
1442
+ chunkU5W4LKZV_cjs.sql`"graph_id" = ${ctx.graphId}`,
1443
+ chunkU5W4LKZV_cjs.sql`"kind" = ${kind}`,
1444
+ chunkU5W4LKZV_cjs.sql`"deleted_at" IS NULL`
1185
1445
  ];
1186
1446
  if (index.where !== void 0) {
1187
- conditions.push(chunkUTTW2Q3M_cjs.compileIndexWhere(compileContext, index.where));
1447
+ conditions.push(chunkJXUTCSXX_cjs.compileIndexWhere(compileContext, index.where));
1188
1448
  }
1189
- conditions.push(chunkX2XOQZT3_cjs.sql`(${chunkX2XOQZT3_cjs.sql.join(groupPredicates, chunkX2XOQZT3_cjs.sql` OR `)})`);
1190
- const whereClause = chunkX2XOQZT3_cjs.sql.join(conditions, chunkX2XOQZT3_cjs.sql` AND `);
1191
- const probedSelect = chunkX2XOQZT3_cjs.sql`SELECT "id", ${probeIndexExpr} AS probe_idx FROM ${schema.nodesTable} WHERE ${whereClause}`;
1449
+ conditions.push(chunkU5W4LKZV_cjs.sql`(${chunkU5W4LKZV_cjs.sql.join(groupPredicates, chunkU5W4LKZV_cjs.sql` OR `)})`);
1450
+ const whereClause = chunkU5W4LKZV_cjs.sql.join(conditions, chunkU5W4LKZV_cjs.sql` AND `);
1451
+ const probedSelect = chunkU5W4LKZV_cjs.sql`SELECT "id", ${probeIndexExpr} AS probe_idx FROM ${schema.nodesTable} WHERE ${whereClause}`;
1192
1452
  const capInSql = limitPerInput !== void 0 && backend.capabilities.windowFunctions;
1193
- const query = capInSql ? chunkX2XOQZT3_cjs.sql`SELECT "id", probe_idx FROM (SELECT "id", probe_idx, ROW_NUMBER() OVER (PARTITION BY probe_idx ORDER BY "id") AS probe_rank FROM (${probedSelect}) AS probed) AS ranked WHERE probe_rank <= ${limitPerInput} ORDER BY probe_idx, "id"` : chunkX2XOQZT3_cjs.sql`${probedSelect} ORDER BY probe_idx, "id"`;
1453
+ const query = capInSql ? chunkU5W4LKZV_cjs.sql`SELECT "id", probe_idx FROM (SELECT "id", probe_idx, ROW_NUMBER() OVER (PARTITION BY probe_idx ORDER BY "id") AS probe_rank FROM (${probedSelect}) AS probed) AS ranked WHERE probe_rank <= ${limitPerInput} ORDER BY probe_idx, "id"` : chunkU5W4LKZV_cjs.sql`${probedSelect} ORDER BY probe_idx, "id"`;
1194
1454
  const rawMatches = await backend.execute(
1195
- chunkX2XOQZT3_cjs.asCompiledRowsSql(query)
1455
+ chunkU5W4LKZV_cjs.asCompiledRowsSql(query)
1196
1456
  );
1197
1457
  const matches = limitPerInput !== void 0 && !capInSql ? capMatchesPerGroup(rawMatches, limitPerInput) : rawMatches;
1198
1458
  const nodesById = await hydrateNodesById(
@@ -1225,7 +1485,7 @@ function capMatchesPerGroup(matches, limitPerInput) {
1225
1485
  return capped;
1226
1486
  }
1227
1487
  async function hydrateNodesById(backend, graphId, kind, ids) {
1228
- const rowsById = await chunkKDRF3NR2_cjs.getNodeRowsByIds(backend, graphId, kind, ids);
1488
+ const rowsById = await chunkJ7LXTUTP_cjs.getNodeRowsByIds(backend, graphId, kind, ids);
1229
1489
  const nodesById = /* @__PURE__ */ new Map();
1230
1490
  for (const [id, row] of rowsById) {
1231
1491
  if (row.deleted_at !== void 0) continue;
@@ -1241,7 +1501,7 @@ async function executeNodeBulkGetOrCreateByConstraint(ctx, kind, constraintName,
1241
1501
  const constraint = resolveConstraint(ctx.graph, kind, constraintName);
1242
1502
  const validated = validateAndComputeKeys(nodeKind, kind, constraint, items);
1243
1503
  const uniqueKeys = collectUniqueKeys(validated);
1244
- const kindsToCheck = chunkKDRF3NR2_cjs.getKindsForUniquenessCheck(
1504
+ const kindsToCheck = chunkJ7LXTUTP_cjs.getKindsForUniquenessCheck(
1245
1505
  kind,
1246
1506
  constraint.scope,
1247
1507
  ctx.registry
@@ -1354,7 +1614,9 @@ exports.executeNodeFindByConstraint = executeNodeFindByConstraint;
1354
1614
  exports.executeNodeGetOrCreateByConstraint = executeNodeGetOrCreateByConstraint;
1355
1615
  exports.executeNodeHardDelete = executeNodeHardDelete;
1356
1616
  exports.executeNodeUpdate = executeNodeUpdate;
1617
+ exports.executeNodeUpdateWhere = executeNodeUpdateWhere;
1357
1618
  exports.executeNodeUpsertUpdate = executeNodeUpsertUpdate;
1619
+ exports.lockSchemaVersionForStoreWrite = lockSchemaVersionForStoreWrite;
1358
1620
  exports.nodeUpsertDirtyCheck = nodeUpsertDirtyCheck;
1359
1621
  exports.primeBatchValidationCaches = primeBatchValidationCaches;
1360
1622
  exports.rowToEdge = rowToEdge;
@@ -1363,5 +1625,5 @@ exports.rowToNode = rowToNode;
1363
1625
  exports.rowToNodeMeta = rowToNodeMeta;
1364
1626
  exports.runHookedWriteOperation = runHookedWriteOperation;
1365
1627
  exports.runInWriteTransaction = runInWriteTransaction;
1366
- //# sourceMappingURL=chunk-BLBG2VZ5.cjs.map
1367
- //# sourceMappingURL=chunk-BLBG2VZ5.cjs.map
1628
+ //# sourceMappingURL=chunk-UCQ3BFSY.cjs.map
1629
+ //# sourceMappingURL=chunk-UCQ3BFSY.cjs.map