@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,13 +1,14 @@
1
1
  'use strict';
2
2
 
3
- var chunkHJH3RMXG_cjs = require('./chunk-HJH3RMXG.cjs');
4
- var chunk6JZUSDY2_cjs = require('./chunk-6JZUSDY2.cjs');
5
- var chunkNN3QSOVS_cjs = require('./chunk-NN3QSOVS.cjs');
3
+ var chunkF4NHQHEZ_cjs = require('./chunk-F4NHQHEZ.cjs');
4
+ var chunkZ3WO6MND_cjs = require('./chunk-Z3WO6MND.cjs');
5
+ var chunkOOA273IJ_cjs = require('./chunk-OOA273IJ.cjs');
6
6
  var chunkZDH3DX3C_cjs = require('./chunk-ZDH3DX3C.cjs');
7
- var chunk3PRKZW6D_cjs = require('./chunk-3PRKZW6D.cjs');
7
+ var chunkEKFUG4G7_cjs = require('./chunk-EKFUG4G7.cjs');
8
8
  var chunkACSVZPK7_cjs = require('./chunk-ACSVZPK7.cjs');
9
- var chunkWBUFJ7BS_cjs = require('./chunk-WBUFJ7BS.cjs');
9
+ var chunkJQXSZHF2_cjs = require('./chunk-JQXSZHF2.cjs');
10
10
  var chunkZY4GXIVN_cjs = require('./chunk-ZY4GXIVN.cjs');
11
+ var chunkJXUTCSXX_cjs = require('./chunk-JXUTCSXX.cjs');
11
12
  var chunkU5W4LKZV_cjs = require('./chunk-U5W4LKZV.cjs');
12
13
  var chunk764JHTLT_cjs = require('./chunk-764JHTLT.cjs');
13
14
  var chunkC4F7VJ5D_cjs = require('./chunk-C4F7VJ5D.cjs');
@@ -15,23 +16,68 @@ var drizzleOrm = require('drizzle-orm');
15
16
 
16
17
  // src/backend/edge-endpoint-sets.ts
17
18
  var FIND_EDGES_ENDPOINT_FIXED_PARAM_COUNT = 6;
18
- function resolveEdgeEndpointIds(params) {
19
- const { limitPerEndpoint } = params;
20
- if (limitPerEndpoint !== void 0 && (!Number.isInteger(limitPerEndpoint) || limitPerEndpoint <= 0)) {
21
- throw new chunkC4F7VJ5D_cjs.ConfigurationError(
22
- `findEdgesByEndpointSet \`limitPerEndpoint\` must be a positive integer, received ${String(limitPerEndpoint)}.`,
23
- {
24
- code: "EDGE_ENDPOINT_SET_INVALID",
25
- graphId: params.graphId,
26
- kind: params.kind
27
- },
28
- {
29
- suggestion: "Pass a positive integer to cap each endpoint's rows, or omit it for an unbounded read."
30
- }
31
- );
19
+ var FIND_EDGES_HETEROGENEOUS_FIXED_PARAM_COUNT = 4;
20
+ function assertLimitPerEndpoint(operation, graphId, limitPerEndpoint, kind) {
21
+ if (limitPerEndpoint === void 0 || Number.isInteger(limitPerEndpoint) && limitPerEndpoint > 0) {
22
+ return;
32
23
  }
24
+ throw new chunkC4F7VJ5D_cjs.ConfigurationError(
25
+ `${operation} \`limitPerEndpoint\` must be a positive integer, received ${String(limitPerEndpoint)}.`,
26
+ {
27
+ code: "EDGE_ENDPOINT_SET_INVALID",
28
+ graphId,
29
+ ...kind === void 0 ? {} : { kind }
30
+ },
31
+ {
32
+ suggestion: "Pass a positive integer to cap each endpoint's rows, or omit it for an unbounded read."
33
+ }
34
+ );
35
+ }
36
+ function resolveEdgeEndpointIds(params) {
37
+ assertLimitPerEndpoint(
38
+ "findEdgesByEndpointSet",
39
+ params.graphId,
40
+ params.limitPerEndpoint,
41
+ params.kind
42
+ );
33
43
  return [...new Set(params.endpointIds)];
34
44
  }
45
+ function endpointKey(endpoint) {
46
+ return `${endpoint.kind}\0${endpoint.id}`;
47
+ }
48
+ function resolveHeterogeneousEdgeRead(params, maxBindParameters) {
49
+ assertLimitPerEndpoint(
50
+ "findEdgesByHeterogeneousEndpointSet",
51
+ params.graphId,
52
+ params.limitPerEndpoint
53
+ );
54
+ const edgeKinds = [...new Set(params.edgeKinds)];
55
+ const endpoints = [
56
+ ...new Map(
57
+ params.endpoints.map((endpoint) => [endpointKey(endpoint), endpoint])
58
+ ).values()
59
+ ];
60
+ if (edgeKinds.length === 0 || endpoints.length === 0) {
61
+ return { edgeKinds, endpoints, endpointChunkSize: 1 };
62
+ }
63
+ const endpointBindBudget = maxBindParameters - FIND_EDGES_HETEROGENEOUS_FIXED_PARAM_COUNT - edgeKinds.length;
64
+ const endpointChunkSize = Math.floor(endpointBindBudget / 2);
65
+ if (endpointChunkSize >= 1) {
66
+ return { edgeKinds, endpoints, endpointChunkSize };
67
+ }
68
+ throw new chunkC4F7VJ5D_cjs.ConfigurationError(
69
+ "findEdgesByHeterogeneousEndpointSet cannot fit one endpoint and the selected edge kinds within the backend bind-parameter budget.",
70
+ {
71
+ code: "EDGE_HETEROGENEOUS_READ_BIND_BUDGET_EXCEEDED",
72
+ graphId: params.graphId,
73
+ edgeKindCount: edgeKinds.length,
74
+ maxBindParameters
75
+ },
76
+ {
77
+ suggestion: "Select fewer edge kinds in one call or use a backend with a larger bind-parameter budget."
78
+ }
79
+ );
80
+ }
35
81
 
36
82
  // src/backend/live-node-candidates.ts
37
83
  function buildLiveNodeCandidates(nodesTableName, graphId, nodeKind, now) {
@@ -77,7 +123,7 @@ function vectorSlotFromDropIndexParams(params) {
77
123
  };
78
124
  }
79
125
  function mapVectorWriteError(error, params) {
80
- const mismatch = chunkWBUFJ7BS_cjs.parseDimensionMismatch(error);
126
+ const mismatch = chunkJQXSZHF2_cjs.parseDimensionMismatch(error);
81
127
  if (mismatch === void 0) return error;
82
128
  const attempted = mismatch.actual ?? "a different number of";
83
129
  return new chunkC4F7VJ5D_cjs.EmbeddingDimensionChangedError(
@@ -96,7 +142,7 @@ var SQLITE_CONTRIBUTION_MAT_TIMESTAMPS = {
96
142
  encode: (value) => value
97
143
  };
98
144
  var POSTGRES_CONTRIBUTION_MAT_TIMESTAMPS = {
99
- decode: chunkHJH3RMXG_cjs.formatPostgresTimestamp,
145
+ decode: chunkF4NHQHEZ_cjs.formatPostgresTimestamp,
100
146
  encode: (value) => new Date(value)
101
147
  };
102
148
  function mapContributionMaterializationRow(row, decode) {
@@ -161,6 +207,9 @@ function diagnoseContribution(row, signature, tableExists) {
161
207
  if (row.materializedAt !== void 0) return "orphaned-marker";
162
208
  return row.lastError === void 0 ? void 0 : "failed-materialization";
163
209
  }
210
+ if (row?.materializedAt !== void 0 && row.signature !== signature) {
211
+ return "stale";
212
+ }
164
213
  const state = evaluateContributionState(row, signature);
165
214
  switch (state) {
166
215
  case "initialized": {
@@ -233,7 +282,7 @@ function gateFulltextMethods(source, assert) {
233
282
  return gated;
234
283
  }
235
284
  function gateFulltext(tx, assert) {
236
- return chunk3PRKZW6D_cjs.createBackendOverlay(
285
+ return chunkEKFUG4G7_cjs.createBackendOverlay(
237
286
  tx,
238
287
  gateFulltextMethods(tx, assert)
239
288
  );
@@ -281,7 +330,7 @@ function createContributionMaterializer(deps) {
281
330
  }
282
331
  }
283
332
  function runtimeContributions() {
284
- return chunk6JZUSDY2_cjs.runtimeStrategyContributions(fulltextStrategy, fulltextTableName);
333
+ return chunkZ3WO6MND_cjs.runtimeStrategyContributions(fulltextStrategy, fulltextTableName);
285
334
  }
286
335
  function cacheInitializedSignature(key, signature) {
287
336
  if (!uncacheableKeys.has(key)) {
@@ -308,13 +357,13 @@ function createContributionMaterializer(deps) {
308
357
  await deps.recordMarker({
309
358
  ...identity,
310
359
  signature,
311
- attemptedAt: chunkHJH3RMXG_cjs.nowIso(),
360
+ attemptedAt: chunkF4NHQHEZ_cjs.nowIso(),
312
361
  materializedAt: void 0,
313
362
  error: error.message
314
363
  });
315
364
  throw error;
316
365
  }
317
- const attemptedAt = chunkHJH3RMXG_cjs.nowIso();
366
+ const attemptedAt = chunkF4NHQHEZ_cjs.nowIso();
318
367
  try {
319
368
  for (const statement of contribution.createDdl) {
320
369
  await deps.execDdl(statement);
@@ -350,12 +399,13 @@ function createContributionMaterializer(deps) {
350
399
  rows: indexMarkerRows(graphId, await deps.getMarkers(graphId))
351
400
  };
352
401
  } catch (error) {
353
- if (!chunkWBUFJ7BS_cjs.isMissingTableError(error)) throw error;
402
+ if (!chunkJQXSZHF2_cjs.isMissingTableError(error)) throw error;
354
403
  return { kind: "missing-table", error };
355
404
  }
356
405
  }
357
406
  async function ensureContributions(graphId, contributions, options) {
358
407
  const force = options?.force === true;
408
+ const bypassCache = options?.bypassCache === true;
359
409
  const entries = await Promise.all(
360
410
  contributions.map(async (contribution) => {
361
411
  const key = contributionKey(graphId, contribution);
@@ -366,7 +416,13 @@ function createContributionMaterializer(deps) {
366
416
  };
367
417
  })
368
418
  );
369
- const pending = force ? entries : entries.filter(
419
+ if (bypassCache) {
420
+ for (const entry of entries) {
421
+ uncacheableKeys.add(entry.key);
422
+ initializedSignatures.delete(entry.key);
423
+ }
424
+ }
425
+ const pending = force || bypassCache ? entries : entries.filter(
370
426
  (entry) => uncacheableKeys.has(entry.key) || initializedSignatures.get(entry.key) !== entry.signature
371
427
  );
372
428
  if (pending.length === 0) return;
@@ -471,11 +527,11 @@ function createContributionMaterializer(deps) {
471
527
  await assertContributions(graphId, contributions);
472
528
  }
473
529
  }
474
- async function verifyContributions(graphId, vectorSlots) {
475
- const targetsByGraph = /* @__PURE__ */ new Map();
530
+ function verificationTargetsByGraph(graphId, vectorSlots) {
531
+ const targets = /* @__PURE__ */ new Map();
476
532
  function addTarget(id, target) {
477
- const existing = targetsByGraph.get(id);
478
- if (existing === void 0) targetsByGraph.set(id, [target]);
533
+ const existing = targets.get(id);
534
+ if (existing === void 0) targets.set(id, [target]);
479
535
  else existing.push(target);
480
536
  }
481
537
  for (const contribution of runtimeContributions()) {
@@ -493,6 +549,10 @@ function createContributionMaterializer(deps) {
493
549
  }
494
550
  }
495
551
  }
552
+ return targets;
553
+ }
554
+ async function diagnoseContributions(graphId, vectorSlots) {
555
+ const targetsByGraph = verificationTargetsByGraph(graphId, vectorSlots);
496
556
  const probes = /* @__PURE__ */ new Map();
497
557
  function tableExists(tableName) {
498
558
  const pending = probes.get(tableName);
@@ -501,7 +561,7 @@ function createContributionMaterializer(deps) {
501
561
  probes.set(tableName, probe);
502
562
  return probe;
503
563
  }
504
- const diagnostics = [];
564
+ const diagnosed = [];
505
565
  for (const [id, targets] of targetsByGraph) {
506
566
  const read = await readMarkerRows(id);
507
567
  const rows = read.kind === "rows" ? read.rows : /* @__PURE__ */ new Map();
@@ -514,22 +574,56 @@ function createContributionMaterializer(deps) {
514
574
  await tableExists(contribution.tableName)
515
575
  );
516
576
  if (state === void 0) continue;
517
- diagnostics.push({
518
- owner: contribution.owner,
519
- logicalName: contribution.logicalName,
520
- physicalName: contribution.tableName,
521
- ...kind === void 0 ? {} : { kind },
522
- ...fieldPath === void 0 ? {} : { fieldPath },
523
- state,
524
- // The recorded reason, carried through verbatim. `state` folds
525
- // several marker verdicts together because they share a repair;
526
- // this is what keeps the fold from also discarding the one thing
527
- // the catalog can never tell the operator.
528
- ...row?.lastError === void 0 ? {} : { lastError: row.lastError }
577
+ diagnosed.push({
578
+ graphId: id,
579
+ contribution,
580
+ diagnostic: {
581
+ owner: contribution.owner,
582
+ logicalName: contribution.logicalName,
583
+ physicalName: contribution.tableName,
584
+ ...kind === void 0 ? {} : { kind },
585
+ ...fieldPath === void 0 ? {} : { fieldPath },
586
+ state,
587
+ // The recorded reason, carried through verbatim. `state` folds
588
+ // several marker verdicts together because they share a repair;
589
+ // this is what keeps the fold from also discarding the one thing
590
+ // the catalog can never tell the operator.
591
+ ...row?.lastError === void 0 ? {} : { lastError: row.lastError }
592
+ }
593
+ });
594
+ }
595
+ }
596
+ return diagnosed;
597
+ }
598
+ async function verifyContributions(graphId, vectorSlots) {
599
+ const diagnosed = await diagnoseContributions(graphId, vectorSlots);
600
+ return diagnosed.map((entry) => entry.diagnostic);
601
+ }
602
+ async function repairContributions(graphId, vectorSlots) {
603
+ const diagnosed = await diagnoseContributions(graphId, vectorSlots);
604
+ const results = [];
605
+ for (const { graphId: targetGraphId, contribution, diagnostic } of diagnosed) {
606
+ if (diagnostic.state === "stale" || diagnostic.state === "orphaned-marker") {
607
+ results.push({ diagnostic, status: "requires-rebuild" });
608
+ continue;
609
+ }
610
+ try {
611
+ await ensureContributions(targetGraphId, [contribution], {
612
+ bypassCache: true
613
+ });
614
+ results.push({ diagnostic, status: "repaired" });
615
+ } catch (error) {
616
+ results.push({
617
+ diagnostic,
618
+ status: "failed",
619
+ error: error instanceof Error ? error.message : String(error)
529
620
  });
530
621
  }
531
622
  }
532
- return diagnostics;
623
+ return {
624
+ results,
625
+ remaining: await verifyContributions(graphId, vectorSlots)
626
+ };
533
627
  }
534
628
  function evictVectorSlot(slot) {
535
629
  if (deps.vectorStrategy === void 0) return;
@@ -559,7 +653,8 @@ function createContributionMaterializer(deps) {
559
653
  assertVectorSlots,
560
654
  dropVectorSlot,
561
655
  evictVectorSlot,
562
- verifyContributions
656
+ verifyContributions,
657
+ repairContributions
563
658
  };
564
659
  }
565
660
  var SQLITE_INDEX_MAT_TIMESTAMPS = {
@@ -567,7 +662,7 @@ var SQLITE_INDEX_MAT_TIMESTAMPS = {
567
662
  encode: (value) => value
568
663
  };
569
664
  var POSTGRES_INDEX_MAT_TIMESTAMPS = {
570
- decode: chunkHJH3RMXG_cjs.formatPostgresTimestamp,
665
+ decode: chunkF4NHQHEZ_cjs.formatPostgresTimestamp,
571
666
  encode: (value) => new Date(value)
572
667
  };
573
668
  function mapMaterializationRow(row, decode) {
@@ -625,7 +720,7 @@ var SQLITE_KIND_REMOVAL_TIMESTAMPS = {
625
720
  encode: (value) => value
626
721
  };
627
722
  var POSTGRES_KIND_REMOVAL_TIMESTAMPS = {
628
- decode: chunkHJH3RMXG_cjs.formatPostgresTimestamp,
723
+ decode: chunkF4NHQHEZ_cjs.formatPostgresTimestamp,
629
724
  encode: (value) => new Date(value)
630
725
  };
631
726
  function mapKindRemovalRow(row, decode) {
@@ -792,12 +887,12 @@ function present(value) {
792
887
  function mapHybridSearchRow(row, toNodeRow) {
793
888
  return {
794
889
  node: toNodeRow(row),
795
- fusedScore: chunkHJH3RMXG_cjs.coerceNumericScore(row["fused_score"]),
890
+ fusedScore: chunkF4NHQHEZ_cjs.coerceNumericScore(row["fused_score"]),
796
891
  ...present(row["vector_rank"]) ? { vectorRank: Number(row["vector_rank"]) } : {},
797
- ...present(row["vector_score"]) ? { vectorScore: chunkHJH3RMXG_cjs.coerceNumericScore(row["vector_score"]) } : {},
892
+ ...present(row["vector_score"]) ? { vectorScore: chunkF4NHQHEZ_cjs.coerceNumericScore(row["vector_score"]) } : {},
798
893
  ...present(row["fulltext_rank"]) ? { fulltextRank: Number(row["fulltext_rank"]) } : {},
799
894
  ...present(row["fulltext_score"]) ? {
800
- fulltextScore: chunkHJH3RMXG_cjs.coerceNumericScore(
895
+ fulltextScore: chunkF4NHQHEZ_cjs.coerceNumericScore(
801
896
  row["fulltext_score"]
802
897
  )
803
898
  } : {},
@@ -1009,6 +1104,58 @@ function buildFindEdgesByEndpointSet(tables, params, endpointIds) {
1009
1104
  ORDER BY ${derivedOrderByClause}
1010
1105
  `;
1011
1106
  }
1107
+ function buildFindEdgesByHeterogeneousEndpointSet(tables, params, endpoints, edgeKinds) {
1108
+ const { edges } = tables;
1109
+ const fromSide = params.side === "from";
1110
+ const kindColumn = fromSide ? edges.fromKind : edges.toKind;
1111
+ const idColumn = fromSide ? edges.fromId : edges.toId;
1112
+ const requestedKind = drizzleOrm.sql.raw(`requested_endpoints."endpoint_kind"`);
1113
+ const requestedId = drizzleOrm.sql.raw(`requested_endpoints."endpoint_id"`);
1114
+ const requestedRows = drizzleOrm.sql.join(
1115
+ endpoints.map((endpoint) => drizzleOrm.sql`(${endpoint.kind}, ${endpoint.id})`),
1116
+ drizzleOrm.sql`, `
1117
+ );
1118
+ const whereClause = drizzleOrm.sql.join(
1119
+ [
1120
+ drizzleOrm.sql`${edges.graphId} = ${params.graphId}`,
1121
+ buildIdSetCondition(edges.kind, edgeKinds),
1122
+ ...buildTemporalConditions(edges, params)
1123
+ ],
1124
+ drizzleOrm.sql` AND `
1125
+ );
1126
+ const joinClause = drizzleOrm.sql`
1127
+ FROM ${edges}
1128
+ INNER JOIN requested_endpoints
1129
+ ON ${kindColumn} = ${requestedKind}
1130
+ AND ${idColumn} = ${requestedId}
1131
+ WHERE ${whereClause}
1132
+ `;
1133
+ const { qualified: orderByClause, bare: derivedOrderByClause } = buildEdgeOrdering(tables, void 0);
1134
+ if (params.limitPerEndpoint === void 0) {
1135
+ return drizzleOrm.sql`
1136
+ WITH requested_endpoints(endpoint_kind, endpoint_id) AS (
1137
+ VALUES ${requestedRows}
1138
+ )
1139
+ SELECT ${edges}.*
1140
+ ${joinClause}
1141
+ ORDER BY ${orderByClause}
1142
+ `;
1143
+ }
1144
+ const ranked = drizzleOrm.sql`
1145
+ SELECT ${edges}.*, ROW_NUMBER() OVER (
1146
+ PARTITION BY ${kindColumn}, ${idColumn} ORDER BY ${orderByClause}
1147
+ ) AS endpoint_rank
1148
+ ${joinClause}
1149
+ `;
1150
+ return drizzleOrm.sql`
1151
+ WITH requested_endpoints(endpoint_kind, endpoint_id) AS (
1152
+ VALUES ${requestedRows}
1153
+ )
1154
+ SELECT * FROM (${ranked}) AS ranked_edges
1155
+ WHERE endpoint_rank <= ${params.limitPerEndpoint}
1156
+ ORDER BY ${derivedOrderByClause}
1157
+ `;
1158
+ }
1012
1159
  function buildCountEdgesByKind(tables, params) {
1013
1160
  const { edges } = tables;
1014
1161
  const conditions = [
@@ -1255,11 +1402,11 @@ function buildFulltextSearch(tableName, params, strategy, dialect, candidates) {
1255
1402
  assertValidSearchParams(params);
1256
1403
  const mode = resolveMode(params.mode);
1257
1404
  const table = quotedTableName(tableName);
1258
- const matchCondition = chunkNN3QSOVS_cjs.toDrizzleSql(
1405
+ const matchCondition = chunkOOA273IJ_cjs.toDrizzleSql(
1259
1406
  strategy.matchCondition(tableName, params.query, mode, params.language),
1260
1407
  dialect
1261
1408
  );
1262
- const rankExpression = chunkNN3QSOVS_cjs.toDrizzleSql(
1409
+ const rankExpression = chunkOOA273IJ_cjs.toDrizzleSql(
1263
1410
  strategy.rankExpression(tableName, params.query, mode, params.language),
1264
1411
  dialect
1265
1412
  );
@@ -1272,10 +1419,10 @@ function buildFulltextSearch(tableName, params, strategy, dialect, candidates) {
1272
1419
  conditions.push(drizzleOrm.sql`${rankExpression} >= ${params.minScore}`);
1273
1420
  }
1274
1421
  if (candidates !== void 0) {
1275
- const candidateSql = chunkU5W4LKZV_cjs.isSqlFragment(candidates) ? chunkNN3QSOVS_cjs.toDrizzleSql(candidates, dialect) : candidates;
1422
+ const candidateSql = chunkU5W4LKZV_cjs.isSqlFragment(candidates) ? chunkOOA273IJ_cjs.toDrizzleSql(candidates, dialect) : candidates;
1276
1423
  conditions.push(drizzleOrm.sql`"node_id" IN (${candidateSql})`);
1277
1424
  }
1278
- const snippetExpr = params.includeSnippets === true && strategy.supportsSnippets ? chunkNN3QSOVS_cjs.toDrizzleSql(
1425
+ const snippetExpr = params.includeSnippets === true && strategy.supportsSnippets ? chunkOOA273IJ_cjs.toDrizzleSql(
1279
1426
  strategy.snippetExpression(
1280
1427
  tableName,
1281
1428
  params.query,
@@ -1418,6 +1565,37 @@ function buildUpdateNode(tables, params, timestamp) {
1418
1565
  RETURNING *
1419
1566
  `;
1420
1567
  }
1568
+ function buildUpdateNodeSet(tables, dialect, params, timestamp) {
1569
+ const { nodes } = tables;
1570
+ const adapter = chunkJXUTCSXX_cjs.getDialect(dialect);
1571
+ const patchedProps = chunkOOA273IJ_cjs.toDrizzleSql(
1572
+ adapter.jsonSetProperties(
1573
+ chunkU5W4LKZV_cjs.sql.identifier(nodes.props.name),
1574
+ params.patch,
1575
+ params.unsetProperties ?? []
1576
+ ),
1577
+ dialect
1578
+ );
1579
+ const candidateIds = chunkOOA273IJ_cjs.toDrizzleSql(params.candidateIds, dialect);
1580
+ const candidateIdColumn = chunkOOA273IJ_cjs.toDrizzleSql(
1581
+ chunkU5W4LKZV_cjs.sql.identifier(params.candidateIdColumn),
1582
+ dialect
1583
+ );
1584
+ return drizzleOrm.sql`
1585
+ UPDATE ${nodes}
1586
+ SET ${quotedColumn(nodes.props)} = ${patchedProps},
1587
+ ${quotedColumn(nodes.updatedAt)} = ${timestamp},
1588
+ ${quotedColumn(nodes.version)} = ${quotedColumn(nodes.version)} + 1
1589
+ WHERE ${nodes.graphId} = ${params.graphId}
1590
+ AND ${nodes.kind} = ${params.kind}
1591
+ AND ${nodes.deletedAt} IS NULL
1592
+ AND ${nodes.id} IN (
1593
+ SELECT ${candidateIdColumn}
1594
+ FROM (${candidateIds}) AS tg_set_candidates
1595
+ )
1596
+ RETURNING *
1597
+ `;
1598
+ }
1421
1599
  function buildDeleteNode(tables, params, timestamp) {
1422
1600
  const { nodes } = tables;
1423
1601
  return drizzleOrm.sql`
@@ -1653,12 +1831,23 @@ function buildDeleteUnique(tables, params, timestamp) {
1653
1831
  AND ${uniques.deletedAt} IS NULL
1654
1832
  `;
1655
1833
  }
1656
- function buildHardDeleteUniquesByNode(tables, graphId, nodeId) {
1834
+ function buildHardDeleteUniquesByNode(tables, graphId, concreteKind, nodeId) {
1835
+ return buildHardDeleteUniquesByNodeIds(tables, {
1836
+ graphId,
1837
+ concreteKind,
1838
+ nodeIds: [nodeId]
1839
+ });
1840
+ }
1841
+ function buildHardDeleteUniquesByNodeIds(tables, params) {
1657
1842
  const { uniques } = tables;
1658
1843
  return drizzleOrm.sql`
1659
1844
  DELETE FROM ${uniques}
1660
- WHERE ${uniques.graphId} = ${graphId}
1661
- AND ${uniques.nodeId} = ${nodeId}
1845
+ WHERE ${uniques.graphId} = ${params.graphId}
1846
+ AND ${uniques.concreteKind} = ${params.concreteKind}
1847
+ AND ${uniques.nodeId} IN (${drizzleOrm.sql.join(
1848
+ params.nodeIds.map((nodeId) => drizzleOrm.sql`${nodeId}`),
1849
+ drizzleOrm.sql`, `
1850
+ )})
1662
1851
  `;
1663
1852
  }
1664
1853
  function buildCheckUnique(tables, params) {
@@ -1747,9 +1936,11 @@ var COMMON_TABLE_OPERATION_BUILDERS = {
1747
1936
  buildCountNodesByKind,
1748
1937
  buildFindEdgesByKind,
1749
1938
  buildFindEdgesByEndpointSet,
1939
+ buildFindEdgesByHeterogeneousEndpointSet,
1750
1940
  buildCountEdgesByKind,
1751
1941
  buildDeleteUnique,
1752
1942
  buildHardDeleteUniquesByNode,
1943
+ buildHardDeleteUniquesByNodeIds,
1753
1944
  buildCheckUnique,
1754
1945
  buildCheckUniqueBatch,
1755
1946
  buildGetSchemaVersion
@@ -1762,15 +1953,15 @@ function createCommonOperationStrategy(tables, dialect, fulltextStrategy) {
1762
1953
  const fulltextTable = tables.fulltextTableName;
1763
1954
  const contributionMaterializations = tables.contributionMaterializations;
1764
1955
  const fulltextBuilders = {
1765
- buildUpsertFulltext: (params, timestamp) => fulltextStrategy.buildUpsert(fulltextTable, params, timestamp).map((statement) => chunkNN3QSOVS_cjs.toDrizzleSql(statement, dialect)),
1766
- buildDeleteFulltext: (params) => fulltextStrategy.buildDelete(fulltextTable, params).map((statement) => chunkNN3QSOVS_cjs.toDrizzleSql(statement, dialect)),
1956
+ buildUpsertFulltext: (params, timestamp) => fulltextStrategy.buildUpsert(fulltextTable, params, timestamp).map((statement) => chunkOOA273IJ_cjs.toDrizzleSql(statement, dialect)),
1957
+ buildDeleteFulltext: (params) => fulltextStrategy.buildDelete(fulltextTable, params).map((statement) => chunkOOA273IJ_cjs.toDrizzleSql(statement, dialect)),
1767
1958
  buildDeleteFulltextByNode: (graphId, nodeKind, nodeId) => fulltextStrategy.buildDelete(fulltextTable, {
1768
1959
  graphId,
1769
1960
  nodeKind,
1770
1961
  nodeId
1771
- }).map((statement) => chunkNN3QSOVS_cjs.toDrizzleSql(statement, dialect)),
1772
- buildUpsertFulltextBatch: (params, timestamp) => fulltextStrategy.buildBatchUpsert(fulltextTable, params, timestamp).map((statement) => chunkNN3QSOVS_cjs.toDrizzleSql(statement, dialect)),
1773
- buildDeleteFulltextBatch: (params) => fulltextStrategy.buildBatchDelete(fulltextTable, params).map((statement) => chunkNN3QSOVS_cjs.toDrizzleSql(statement, dialect)),
1962
+ }).map((statement) => chunkOOA273IJ_cjs.toDrizzleSql(statement, dialect)),
1963
+ buildUpsertFulltextBatch: (params, timestamp) => fulltextStrategy.buildBatchUpsert(fulltextTable, params, timestamp).map((statement) => chunkOOA273IJ_cjs.toDrizzleSql(statement, dialect)),
1964
+ buildDeleteFulltextBatch: (params) => fulltextStrategy.buildBatchDelete(fulltextTable, params).map((statement) => chunkOOA273IJ_cjs.toDrizzleSql(statement, dialect)),
1774
1965
  buildFulltextSearch: (params) => buildFulltextSearch(
1775
1966
  fulltextTable,
1776
1967
  params,
@@ -1782,7 +1973,7 @@ function createCommonOperationStrategy(tables, dialect, fulltextStrategy) {
1782
1973
  tables.nodes,
1783
1974
  params.graphId,
1784
1975
  params.nodeKind,
1785
- chunkHJH3RMXG_cjs.nowIso()
1976
+ chunkF4NHQHEZ_cjs.nowIso()
1786
1977
  )
1787
1978
  ),
1788
1979
  buildHybridSearch: (params, vectorSql, vectorScoreDescending) => {
@@ -1790,7 +1981,7 @@ function createCommonOperationStrategy(tables, dialect, fulltextStrategy) {
1790
1981
  tables.nodes,
1791
1982
  params.graphId,
1792
1983
  params.nodeKind,
1793
- chunkHJH3RMXG_cjs.nowIso()
1984
+ chunkF4NHQHEZ_cjs.nowIso()
1794
1985
  );
1795
1986
  const fulltextSql = buildFulltextSearch(
1796
1987
  fulltextTable,
@@ -1811,7 +2002,7 @@ function createCommonOperationStrategy(tables, dialect, fulltextStrategy) {
1811
2002
  hybridCandidatesRef()
1812
2003
  );
1813
2004
  return buildHybridSearchStatement({
1814
- candidatesSql: chunkU5W4LKZV_cjs.isSqlFragment(candidates) ? chunkNN3QSOVS_cjs.toDrizzleSql(candidates, dialect) : candidates,
2005
+ candidatesSql: chunkU5W4LKZV_cjs.isSqlFragment(candidates) ? chunkOOA273IJ_cjs.toDrizzleSql(candidates, dialect) : candidates,
1815
2006
  vectorSql,
1816
2007
  vectorScoreDescending,
1817
2008
  fulltextSql,
@@ -1839,6 +2030,9 @@ function createCommonOperationStrategy(tables, dialect, fulltextStrategy) {
1839
2030
  return {
1840
2031
  ...tableOperations,
1841
2032
  ...fulltextBuilders,
2033
+ buildUpdateNodeSet(params, timestamp) {
2034
+ return buildUpdateNodeSet(tables, dialect, params, timestamp);
2035
+ },
1842
2036
  buildDeleteContributionMaterialization,
1843
2037
  buildInsertUnique(params) {
1844
2038
  return buildInsertUnique(tables, dialect, params);
@@ -1969,8 +2163,14 @@ async function commitSchemaVersionIfKindsEmpty(backend, params, probes) {
1969
2163
  };
1970
2164
  }
1971
2165
  function createCommonOperationBackend(options) {
1972
- const { batchConfig, execution, operationStrategy, rowMappers } = options;
1973
- const nowIso2 = options.nowIso ?? chunkHJH3RMXG_cjs.nowIso;
2166
+ const {
2167
+ batchConfig,
2168
+ execution,
2169
+ maxBindParameters,
2170
+ operationStrategy,
2171
+ rowMappers
2172
+ } = options;
2173
+ const nowIso2 = options.nowIso ?? chunkF4NHQHEZ_cjs.nowIso;
1974
2174
  const tableExists = createCachedTableExistence(
1975
2175
  (tableName) => execution.execGet(
1976
2176
  operationStrategy.buildTableExists(tableName)
@@ -2071,6 +2271,25 @@ function createCommonOperationBackend(options) {
2071
2271
  );
2072
2272
  return rowMappers.toNodeRow(row);
2073
2273
  },
2274
+ async updateNodeSet(params) {
2275
+ if (Object.keys(params.patch).length === 0 && (params.unsetProperties?.length ?? 0) === 0) {
2276
+ throw new chunkC4F7VJ5D_cjs.ConfigurationError(
2277
+ "Set-based node update requires at least one property",
2278
+ { operation: "updateNodeSet", kind: params.kind }
2279
+ );
2280
+ }
2281
+ if (params.candidateIdColumn.length === 0) {
2282
+ throw new chunkC4F7VJ5D_cjs.ConfigurationError(
2283
+ "Set-based node update requires a candidate id column",
2284
+ { operation: "updateNodeSet", kind: params.kind }
2285
+ );
2286
+ }
2287
+ const timestamp = nowIso2();
2288
+ const query = operationStrategy.buildUpdateNodeSet(params, timestamp);
2289
+ const rows = await execution.execAll(query);
2290
+ const updatedRows = rows.map((row) => rowMappers.toNodeRow(row));
2291
+ return { affectedCount: updatedRows.length, rows: updatedRows };
2292
+ },
2074
2293
  async deleteNode(params) {
2075
2294
  const timestamp = nowIso2();
2076
2295
  const query = operationStrategy.buildDeleteNode(params, timestamp);
@@ -2088,6 +2307,7 @@ function createCommonOperationBackend(options) {
2088
2307
  async hardDeleteNode(params) {
2089
2308
  const deleteUniquesQuery = operationStrategy.buildHardDeleteUniquesByNode(
2090
2309
  params.graphId,
2310
+ params.kind,
2091
2311
  params.id
2092
2312
  );
2093
2313
  await execution.execRun(deleteUniquesQuery);
@@ -2262,6 +2482,21 @@ function createCommonOperationBackend(options) {
2262
2482
  }
2263
2483
  return edgeRows;
2264
2484
  },
2485
+ async findEdgesByHeterogeneousEndpointSet(params) {
2486
+ const { edgeKinds, endpoints, endpointChunkSize } = resolveHeterogeneousEdgeRead(params, maxBindParameters);
2487
+ if (edgeKinds.length === 0 || endpoints.length === 0) return [];
2488
+ const edgeRows = [];
2489
+ for (const endpointChunk of chunkZDH3DX3C_cjs.chunk(endpoints, endpointChunkSize)) {
2490
+ const query = operationStrategy.buildFindEdgesByHeterogeneousEndpointSet(
2491
+ params,
2492
+ endpointChunk,
2493
+ edgeKinds
2494
+ );
2495
+ const rows = await execution.execAll(query);
2496
+ for (const row of rows) edgeRows.push(rowMappers.toEdgeRow(row));
2497
+ }
2498
+ return edgeRows;
2499
+ },
2265
2500
  async countEdgesByKind(params) {
2266
2501
  const query = operationStrategy.buildCountEdgesByKind(params);
2267
2502
  const row = await execution.execGet(query);
@@ -2332,6 +2567,19 @@ function createCommonOperationBackend(options) {
2332
2567
  const query = operationStrategy.buildDeleteUnique(params, timestamp);
2333
2568
  await execution.execRun(query);
2334
2569
  },
2570
+ async hardDeleteUniquesByNodeIds(params) {
2571
+ const nodeIds = [...new Set(params.nodeIds)];
2572
+ for (const chunk2 of chunkZDH3DX3C_cjs.chunk(
2573
+ nodeIds,
2574
+ batchConfig.uniqueDeleteChunkSize
2575
+ )) {
2576
+ const query = operationStrategy.buildHardDeleteUniquesByNodeIds({
2577
+ ...params,
2578
+ nodeIds: chunk2
2579
+ });
2580
+ await execution.execRun(query);
2581
+ }
2582
+ },
2335
2583
  async checkUnique(params) {
2336
2584
  const query = operationStrategy.buildCheckUnique(params);
2337
2585
  const row = await execution.execGet(query);
@@ -2775,5 +3023,5 @@ exports.tableExistsFromRow = tableExistsFromRow;
2775
3023
  exports.vectorSlotFromCreateIndexParams = vectorSlotFromCreateIndexParams;
2776
3024
  exports.vectorSlotFromDropIndexParams = vectorSlotFromDropIndexParams;
2777
3025
  exports.vectorSlotFromParams = vectorSlotFromParams;
2778
- //# sourceMappingURL=chunk-ST3LPB2V.cjs.map
2779
- //# sourceMappingURL=chunk-ST3LPB2V.cjs.map
3026
+ //# sourceMappingURL=chunk-H7VE3FL4.cjs.map
3027
+ //# sourceMappingURL=chunk-H7VE3FL4.cjs.map