@nicia-ai/typegraph 0.41.0 → 0.42.1

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 +9 -9
  2. package/dist/backend/drizzle/indexes.d.cts +1 -2
  3. package/dist/backend/drizzle/indexes.d.ts +1 -2
  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 -4
  7. package/dist/backend/index.d.ts +3 -4
  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 +5 -6
  11. package/dist/backend/postgres/index.d.ts +5 -6
  12. package/dist/backend/postgres/index.js +13 -13
  13. package/dist/backend/postgres/pglite-store.cjs +34 -34
  14. package/dist/backend/postgres/pglite-store.d.cts +7 -8
  15. package/dist/backend/postgres/pglite-store.d.ts +7 -8
  16. package/dist/backend/postgres/pglite-store.js +30 -30
  17. package/dist/backend/postgres/pglite.cjs +15 -15
  18. package/dist/backend/postgres/pglite.d.cts +2 -3
  19. package/dist/backend/postgres/pglite.d.ts +2 -3
  20. package/dist/backend/postgres/pglite.js +14 -14
  21. package/dist/backend/sqlite/index.cjs +23 -23
  22. package/dist/backend/sqlite/index.d.cts +5 -6
  23. package/dist/backend/sqlite/index.d.ts +5 -6
  24. package/dist/backend/sqlite/index.js +11 -11
  25. package/dist/backend/sqlite/libsql.cjs +17 -17
  26. package/dist/backend/sqlite/libsql.d.cts +2 -3
  27. package/dist/backend/sqlite/libsql.d.ts +2 -3
  28. package/dist/backend/sqlite/libsql.js +13 -13
  29. package/dist/backend/sqlite/local-store.cjs +35 -35
  30. package/dist/backend/sqlite/local-store.d.cts +7 -8
  31. package/dist/backend/sqlite/local-store.d.ts +7 -8
  32. package/dist/backend/sqlite/local-store.js +31 -31
  33. package/dist/backend/sqlite/local.cjs +16 -16
  34. package/dist/backend/sqlite/local.d.cts +2 -3
  35. package/dist/backend/sqlite/local.d.ts +2 -3
  36. package/dist/backend/sqlite/local.js +14 -14
  37. package/dist/{chunk-LOKG3KQV.cjs → chunk-277UZV7X.cjs} +1113 -1089
  38. package/dist/chunk-277UZV7X.cjs.map +1 -0
  39. package/dist/{chunk-2I3DNNBU.js → chunk-2G6ZEGYO.js} +4 -4
  40. package/dist/{chunk-2I3DNNBU.js.map → chunk-2G6ZEGYO.js.map} +1 -1
  41. package/dist/{chunk-76HE7DJP.js → chunk-2HKIID5K.js} +5 -5
  42. package/dist/{chunk-76HE7DJP.js.map → chunk-2HKIID5K.js.map} +1 -1
  43. package/dist/{chunk-QOHTVDHU.js → chunk-2OOY4OYT.js} +4 -4
  44. package/dist/{chunk-QOHTVDHU.js.map → chunk-2OOY4OYT.js.map} +1 -1
  45. package/dist/{chunk-UCHW2MGP.cjs → chunk-2SO5I5AI.cjs} +196 -196
  46. package/dist/{chunk-UCHW2MGP.cjs.map → chunk-2SO5I5AI.cjs.map} +1 -1
  47. package/dist/{chunk-LFFVD5ZR.cjs → chunk-33PAKPED.cjs} +41 -41
  48. package/dist/{chunk-LFFVD5ZR.cjs.map → chunk-33PAKPED.cjs.map} +1 -1
  49. package/dist/{chunk-QCKD3RCI.cjs → chunk-3RPQDGUE.cjs} +5 -5
  50. package/dist/{chunk-QCKD3RCI.cjs.map → chunk-3RPQDGUE.cjs.map} +1 -1
  51. package/dist/{chunk-PH4IJ3V5.js → chunk-3V6D5DEC.js} +3 -3
  52. package/dist/{chunk-PH4IJ3V5.js.map → chunk-3V6D5DEC.js.map} +1 -1
  53. package/dist/{chunk-Y5UC3IXF.js → chunk-42XYPKZU.js} +3 -3
  54. package/dist/{chunk-Y5UC3IXF.js.map → chunk-42XYPKZU.js.map} +1 -1
  55. package/dist/{chunk-XZA3Y4YH.js → chunk-4WYFRACU.js} +3 -3
  56. package/dist/{chunk-XZA3Y4YH.js.map → chunk-4WYFRACU.js.map} +1 -1
  57. package/dist/{chunk-AQVDAKXH.js → chunk-4XRP2N6B.js} +3 -3
  58. package/dist/{chunk-AQVDAKXH.js.map → chunk-4XRP2N6B.js.map} +1 -1
  59. package/dist/{chunk-PWXGB77L.cjs → chunk-5AERZSHC.cjs} +4 -4
  60. package/dist/{chunk-PWXGB77L.cjs.map → chunk-5AERZSHC.cjs.map} +1 -1
  61. package/dist/{chunk-K6CD6W5J.js → chunk-5C75HQYQ.js} +5 -5
  62. package/dist/{chunk-K6CD6W5J.js.map → chunk-5C75HQYQ.js.map} +1 -1
  63. package/dist/{chunk-2J5NMMVR.cjs → chunk-5GV4JQNA.cjs} +43 -43
  64. package/dist/{chunk-2J5NMMVR.cjs.map → chunk-5GV4JQNA.cjs.map} +1 -1
  65. package/dist/{chunk-KHNKYSGP.cjs → chunk-5P6IPIT6.cjs} +41 -41
  66. package/dist/{chunk-KHNKYSGP.cjs.map → chunk-5P6IPIT6.cjs.map} +1 -1
  67. package/dist/{chunk-M2RPZS7J.cjs → chunk-5Q3P6OIC.cjs} +12 -12
  68. package/dist/{chunk-M2RPZS7J.cjs.map → chunk-5Q3P6OIC.cjs.map} +1 -1
  69. package/dist/{chunk-QXKVUJLI.cjs → chunk-5ZPRE4CV.cjs} +206 -166
  70. package/dist/chunk-5ZPRE4CV.cjs.map +1 -0
  71. package/dist/{chunk-53BSOG3O.js → chunk-6NB73BXV.js} +11 -11
  72. package/dist/{chunk-53BSOG3O.js.map → chunk-6NB73BXV.js.map} +1 -1
  73. package/dist/{chunk-SE422RES.cjs → chunk-6TJ6PKPS.cjs} +27 -27
  74. package/dist/{chunk-SE422RES.cjs.map → chunk-6TJ6PKPS.cjs.map} +1 -1
  75. package/dist/{chunk-7WLEQIHA.cjs → chunk-7Y6BV3TK.cjs} +100 -100
  76. package/dist/{chunk-7WLEQIHA.cjs.map → chunk-7Y6BV3TK.cjs.map} +1 -1
  77. package/dist/{chunk-HP6LWBLB.cjs → chunk-AO2WPYFZ.cjs} +4 -4
  78. package/dist/{chunk-HP6LWBLB.cjs.map → chunk-AO2WPYFZ.cjs.map} +1 -1
  79. package/dist/{chunk-7UTUKH4E.cjs → chunk-AQR6BHB3.cjs} +10 -10
  80. package/dist/{chunk-7UTUKH4E.cjs.map → chunk-AQR6BHB3.cjs.map} +1 -1
  81. package/dist/{chunk-X4PVHAZ6.cjs → chunk-ARN3ZODS.cjs} +6 -6
  82. package/dist/{chunk-X4PVHAZ6.cjs.map → chunk-ARN3ZODS.cjs.map} +1 -1
  83. package/dist/{chunk-YYLMXERH.js → chunk-CDYRPI5U.js} +4 -4
  84. package/dist/{chunk-YYLMXERH.js.map → chunk-CDYRPI5U.js.map} +1 -1
  85. package/dist/{chunk-3LKL3S6X.js → chunk-CI5NPLXX.js} +3 -3
  86. package/dist/{chunk-3LKL3S6X.js.map → chunk-CI5NPLXX.js.map} +1 -1
  87. package/dist/{chunk-UUIBACKJ.js → chunk-CUPJL6TS.js} +3 -3
  88. package/dist/{chunk-UUIBACKJ.js.map → chunk-CUPJL6TS.js.map} +1 -1
  89. package/dist/{chunk-JZYMOHHM.cjs → chunk-CVK4T34X.cjs} +22 -22
  90. package/dist/{chunk-JZYMOHHM.cjs.map → chunk-CVK4T34X.cjs.map} +1 -1
  91. package/dist/{chunk-L3DDZUZP.js → chunk-CVNGKTHO.js} +4 -4
  92. package/dist/{chunk-L3DDZUZP.js.map → chunk-CVNGKTHO.js.map} +1 -1
  93. package/dist/{chunk-RW24SAHI.cjs → chunk-DMZEVJGL.cjs} +13 -13
  94. package/dist/{chunk-RW24SAHI.cjs.map → chunk-DMZEVJGL.cjs.map} +1 -1
  95. package/dist/{chunk-MQBF3XGY.js → chunk-DP7KC6CL.js} +47 -23
  96. package/dist/chunk-DP7KC6CL.js.map +1 -0
  97. package/dist/{chunk-QYDUCWD2.cjs → chunk-ECU53PMN.cjs} +4 -4
  98. package/dist/{chunk-QYDUCWD2.cjs.map → chunk-ECU53PMN.cjs.map} +1 -1
  99. package/dist/{chunk-SCTZRFW5.js → chunk-EQOQOT55.js} +5 -5
  100. package/dist/{chunk-SCTZRFW5.js.map → chunk-EQOQOT55.js.map} +1 -1
  101. package/dist/{chunk-JHK6NPFV.js → chunk-EVFL2ZY5.js} +9 -9
  102. package/dist/{chunk-JHK6NPFV.js.map → chunk-EVFL2ZY5.js.map} +1 -1
  103. package/dist/{chunk-SAMJLDGG.cjs → chunk-F2KVJ6FF.cjs} +112 -112
  104. package/dist/{chunk-SAMJLDGG.cjs.map → chunk-F2KVJ6FF.cjs.map} +1 -1
  105. package/dist/{chunk-NMQ6C6TS.cjs → chunk-F7TDKSVB.cjs} +4 -4
  106. package/dist/{chunk-NMQ6C6TS.cjs.map → chunk-F7TDKSVB.cjs.map} +1 -1
  107. package/dist/{chunk-HQRZEYYB.cjs → chunk-FFQGI67R.cjs} +44 -44
  108. package/dist/{chunk-HQRZEYYB.cjs.map → chunk-FFQGI67R.cjs.map} +1 -1
  109. package/dist/{chunk-YIRLBUNN.js → chunk-FMPZPOUD.js} +3 -3
  110. package/dist/{chunk-YIRLBUNN.js.map → chunk-FMPZPOUD.js.map} +1 -1
  111. package/dist/{chunk-LL5D5T5W.cjs → chunk-FSCJOTHF.cjs} +10 -10
  112. package/dist/{chunk-LL5D5T5W.cjs.map → chunk-FSCJOTHF.cjs.map} +1 -1
  113. package/dist/{chunk-2X73QTIC.cjs → chunk-FY4VY5EV.cjs} +20 -20
  114. package/dist/{chunk-2X73QTIC.cjs.map → chunk-FY4VY5EV.cjs.map} +1 -1
  115. package/dist/{chunk-3SHAUJRB.js → chunk-GT7NEXSU.js} +3 -3
  116. package/dist/{chunk-3SHAUJRB.js.map → chunk-GT7NEXSU.js.map} +1 -1
  117. package/dist/{chunk-W66YCXWT.js → chunk-HHBKGPEI.js} +11 -10
  118. package/dist/chunk-HHBKGPEI.js.map +1 -0
  119. package/dist/{chunk-CKFBZ4LV.cjs → chunk-I73ATSAH.cjs} +4 -4
  120. package/dist/{chunk-CKFBZ4LV.cjs.map → chunk-I73ATSAH.cjs.map} +1 -1
  121. package/dist/{chunk-ELA3V6UN.js → chunk-JOYPNY33.js} +9 -9
  122. package/dist/{chunk-ELA3V6UN.js.map → chunk-JOYPNY33.js.map} +1 -1
  123. package/dist/{chunk-YIX3BEBR.cjs → chunk-K2HHCWZO.cjs} +108 -108
  124. package/dist/{chunk-YIX3BEBR.cjs.map → chunk-K2HHCWZO.cjs.map} +1 -1
  125. package/dist/{chunk-SAFZ6JTI.cjs → chunk-KTBTSHU6.cjs} +19 -2
  126. package/dist/chunk-KTBTSHU6.cjs.map +1 -0
  127. package/dist/{chunk-KOI7UEI5.js → chunk-LDCWO5B6.js} +3 -3
  128. package/dist/{chunk-KOI7UEI5.js.map → chunk-LDCWO5B6.js.map} +1 -1
  129. package/dist/{chunk-I5CRUPKO.js → chunk-LQLVJWUH.js} +7 -7
  130. package/dist/{chunk-I5CRUPKO.js.map → chunk-LQLVJWUH.js.map} +1 -1
  131. package/dist/{chunk-6N7QBIWN.js → chunk-M4GYQF2H.js} +3 -3
  132. package/dist/{chunk-6N7QBIWN.js.map → chunk-M4GYQF2H.js.map} +1 -1
  133. package/dist/{chunk-ZE7E46IZ.js → chunk-NXIZL7ZZ.js} +6 -6
  134. package/dist/{chunk-ZE7E46IZ.js.map → chunk-NXIZL7ZZ.js.map} +1 -1
  135. package/dist/{chunk-XRU7V7FF.cjs → chunk-O2GZM7UK.cjs} +7 -7
  136. package/dist/{chunk-XRU7V7FF.cjs.map → chunk-O2GZM7UK.cjs.map} +1 -1
  137. package/dist/{chunk-ZE6NVENI.js → chunk-O3USVVWS.js} +3 -3
  138. package/dist/{chunk-ZE6NVENI.js.map → chunk-O3USVVWS.js.map} +1 -1
  139. package/dist/{chunk-UDS5DZNY.cjs → chunk-O7XVCLXW.cjs} +68 -67
  140. package/dist/chunk-O7XVCLXW.cjs.map +1 -0
  141. package/dist/{chunk-KLR77R5A.cjs → chunk-OM6RIOA5.cjs} +13 -13
  142. package/dist/{chunk-KLR77R5A.cjs.map → chunk-OM6RIOA5.cjs.map} +1 -1
  143. package/dist/{chunk-LLHMAHG4.cjs → chunk-OMQ2NBOR.cjs} +27 -27
  144. package/dist/{chunk-LLHMAHG4.cjs.map → chunk-OMQ2NBOR.cjs.map} +1 -1
  145. package/dist/{chunk-DPNA466P.js → chunk-OYJSYDIH.js} +19 -3
  146. package/dist/chunk-OYJSYDIH.js.map +1 -0
  147. package/dist/{chunk-V3S74J44.js → chunk-RAWG2FEU.js} +134 -22
  148. package/dist/chunk-RAWG2FEU.js.map +1 -0
  149. package/dist/{chunk-TAUGGLNQ.js → chunk-RXOAXO3R.js} +3 -3
  150. package/dist/{chunk-TAUGGLNQ.js.map → chunk-RXOAXO3R.js.map} +1 -1
  151. package/dist/{chunk-LLE25NRD.cjs → chunk-TRC646QQ.cjs} +7 -7
  152. package/dist/{chunk-LLE25NRD.cjs.map → chunk-TRC646QQ.cjs.map} +1 -1
  153. package/dist/chunk-U3YRCZ5L.cjs +12 -0
  154. package/dist/{chunk-IMQKXL4E.cjs.map → chunk-U3YRCZ5L.cjs.map} +1 -1
  155. package/dist/{chunk-ZVME6OSV.js → chunk-UJRWOV5B.js} +5 -5
  156. package/dist/{chunk-ZVME6OSV.js.map → chunk-UJRWOV5B.js.map} +1 -1
  157. package/dist/{chunk-HAQVISUF.cjs → chunk-UTTW2Q3M.cjs} +133 -133
  158. package/dist/{chunk-HAQVISUF.cjs.map → chunk-UTTW2Q3M.cjs.map} +1 -1
  159. package/dist/{chunk-L5ET7FYQ.js → chunk-UZLEQFTV.js} +3 -3
  160. package/dist/{chunk-L5ET7FYQ.js.map → chunk-UZLEQFTV.js.map} +1 -1
  161. package/dist/{chunk-JP5EICR6.cjs → chunk-V2GZBPY2.cjs} +179 -65
  162. package/dist/chunk-V2GZBPY2.cjs.map +1 -0
  163. package/dist/{chunk-BUZWMDNL.js → chunk-VC26BUNP.js} +5 -5
  164. package/dist/{chunk-BUZWMDNL.js.map → chunk-VC26BUNP.js.map} +1 -1
  165. package/dist/chunk-VGMNGWBR.cjs +12 -0
  166. package/dist/{chunk-5YBDB7UG.cjs.map → chunk-VGMNGWBR.cjs.map} +1 -1
  167. package/dist/{chunk-XMEYZYGE.js → chunk-WYQILW5V.js} +8 -8
  168. package/dist/{chunk-XMEYZYGE.js.map → chunk-WYQILW5V.js.map} +1 -1
  169. package/dist/{chunk-YX3H63VV.cjs → chunk-X2XOQZT3.cjs} +9 -9
  170. package/dist/{chunk-YX3H63VV.cjs.map → chunk-X2XOQZT3.cjs.map} +1 -1
  171. package/dist/{chunk-N2V3HJFV.cjs → chunk-XDMPDUKL.cjs} +9 -9
  172. package/dist/{chunk-N2V3HJFV.cjs.map → chunk-XDMPDUKL.cjs.map} +1 -1
  173. package/dist/{chunk-EFZ4S22A.js → chunk-YPVQYM3L.js} +107 -67
  174. package/dist/chunk-YPVQYM3L.js.map +1 -0
  175. package/dist/{chunk-5J4VNCUD.js → chunk-Z3WIL6S3.js} +5 -5
  176. package/dist/{chunk-5J4VNCUD.js.map → chunk-Z3WIL6S3.js.map} +1 -1
  177. package/dist/{chunk-MNURF4RF.cjs → chunk-ZBV4LQD2.cjs} +4 -4
  178. package/dist/{chunk-MNURF4RF.cjs.map → chunk-ZBV4LQD2.cjs.map} +1 -1
  179. package/dist/{chunk-YGX4PMG6.js → chunk-ZGOUVMVS.js} +5 -5
  180. package/dist/{chunk-YGX4PMG6.js.map → chunk-ZGOUVMVS.js.map} +1 -1
  181. package/dist/{chunk-QZYGZVUI.js → chunk-ZIRC2U6G.js} +11 -11
  182. package/dist/{chunk-QZYGZVUI.js.map → chunk-ZIRC2U6G.js.map} +1 -1
  183. package/dist/{chunk-6QP4QXBR.js → chunk-ZOHCFYXE.js} +3 -3
  184. package/dist/{chunk-6QP4QXBR.js.map → chunk-ZOHCFYXE.js.map} +1 -1
  185. package/dist/{chunk-VWEFXG73.js → chunk-ZP2KPDNN.js} +3 -3
  186. package/dist/{chunk-VWEFXG73.js.map → chunk-ZP2KPDNN.js.map} +1 -1
  187. package/dist/{chunk-NT6ILURI.cjs → chunk-ZPCKPLMX.cjs} +8 -8
  188. package/dist/{chunk-NT6ILURI.cjs.map → chunk-ZPCKPLMX.cjs.map} +1 -1
  189. package/dist/core/index.cjs +28 -28
  190. package/dist/core/index.d.cts +5 -6
  191. package/dist/core/index.d.ts +5 -6
  192. package/dist/core/index.js +8 -8
  193. package/dist/{ddl-BCXFRLWg.d.cts → ddl-3unqC-kg.d.cts} +3 -3
  194. package/dist/{ddl-ByLmGgn9.d.ts → ddl-Bc4Dl8fu.d.ts} +3 -3
  195. package/dist/{define-graph-BSviZubs.d.ts → define-graph-Byslw2OO.d.cts} +1 -2
  196. package/dist/{define-graph-XyJheaFm.d.cts → define-graph-DBFnc7u_.d.ts} +1 -2
  197. package/dist/graph-extension/index.cjs +20 -20
  198. package/dist/graph-extension/index.d.cts +4 -4
  199. package/dist/graph-extension/index.d.ts +4 -4
  200. package/dist/graph-extension/index.js +5 -5
  201. package/dist/graph-merge/index.cjs +105 -105
  202. package/dist/graph-merge/index.d.cts +8 -9
  203. package/dist/graph-merge/index.d.ts +8 -9
  204. package/dist/graph-merge/index.js +25 -25
  205. package/dist/{index-BD_3TCgh.d.ts → index-DHXw7QAl.d.cts} +19 -4
  206. package/dist/{index-BihFPsPu.d.cts → index-DQzVJBHa.d.ts} +19 -4
  207. package/dist/index.cjs +206 -202
  208. package/dist/index.d.cts +13 -15
  209. package/dist/index.d.ts +13 -15
  210. package/dist/index.js +35 -35
  211. package/dist/indexes/index.cjs +13 -13
  212. package/dist/indexes/index.d.cts +4 -5
  213. package/dist/indexes/index.d.ts +4 -5
  214. package/dist/indexes/index.js +6 -6
  215. package/dist/interchange/index.cjs +40 -40
  216. package/dist/interchange/index.d.cts +9 -10
  217. package/dist/interchange/index.d.ts +9 -10
  218. package/dist/interchange/index.js +14 -14
  219. package/dist/{manager-C7iC5bk_.d.ts → manager-Dl0-er1G.d.ts} +21 -156
  220. package/dist/{manager-Dm6MCYO7.d.cts → manager-U9_zopqr.d.cts} +21 -156
  221. package/dist/materialize-indexes-BM3u0aXE.d.ts +258 -0
  222. package/dist/materialize-indexes-DzMCetZe.d.cts +258 -0
  223. package/dist/{postgres-DZxwzCQ8.d.cts → postgres-C5-WMKFA.d.ts} +1 -1
  224. package/dist/{postgres-Cb6ceh4-.d.ts → postgres-DpJqtbSX.d.cts} +1 -1
  225. package/dist/profiler/index.d.cts +9 -10
  226. package/dist/profiler/index.d.ts +9 -10
  227. package/dist/provenance/index.cjs +39 -39
  228. package/dist/provenance/index.d.cts +7 -8
  229. package/dist/provenance/index.d.ts +7 -8
  230. package/dist/provenance/index.js +9 -9
  231. package/dist/schema/index.cjs +48 -39
  232. package/dist/schema/index.d.cts +7 -8
  233. package/dist/schema/index.d.ts +7 -8
  234. package/dist/schema/index.js +15 -14
  235. package/dist/{searchable-aUaKh3_r.d.cts → searchable-B4mUXZT6.d.cts} +2 -2
  236. package/dist/{searchable-Cet4Oztt.d.ts → searchable-C7jmPNLT.d.ts} +2 -2
  237. package/dist/{sqlite-Cb3Ilj9_.d.ts → sqlite-Ch5tSYQY.d.ts} +1 -1
  238. package/dist/{sqlite-Dxklpizv.d.cts → sqlite-Da7jiYu9.d.cts} +1 -1
  239. package/dist/{store-view-PCT7vTKH.d.cts → store-view-6C2vTWqf.d.ts} +8 -7
  240. package/dist/{store-view-BDjGFjpN.d.ts → store-view-CNcOG8bQ.d.cts} +8 -7
  241. package/dist/{temporal-CyFsSPe8.d.ts → temporal-BtrTYTiB.d.ts} +1 -1
  242. package/dist/{temporal-Dn_JADWY.d.cts → temporal-CMpigMCW.d.cts} +1 -1
  243. package/dist/{types-CFZiEEPh.d.ts → types-D2rU5Taq.d.ts} +1 -2
  244. package/dist/{types-D-vOo_pM.d.ts → types-Dh-EgT-w.d.cts} +569 -2
  245. package/dist/{types-ho4DJJb_.d.cts → types-Dh-EgT-w.d.ts} +569 -2
  246. package/dist/{types-CsaG00wS.d.cts → types-G4sVM-76.d.cts} +1 -2
  247. package/dist/{where-DLYaXa4L.d.ts → where-B8Y21kig.d.ts} +1 -2
  248. package/dist/{where-udes1WRA.d.cts → where-DbZ9XDOI.d.cts} +1 -2
  249. package/package.json +1 -1
  250. package/dist/chunk-5YBDB7UG.cjs +0 -12
  251. package/dist/chunk-DPNA466P.js.map +0 -1
  252. package/dist/chunk-EFZ4S22A.js.map +0 -1
  253. package/dist/chunk-IMQKXL4E.cjs +0 -12
  254. package/dist/chunk-JP5EICR6.cjs.map +0 -1
  255. package/dist/chunk-LOKG3KQV.cjs.map +0 -1
  256. package/dist/chunk-MQBF3XGY.js.map +0 -1
  257. package/dist/chunk-QXKVUJLI.cjs.map +0 -1
  258. package/dist/chunk-SAFZ6JTI.cjs.map +0 -1
  259. package/dist/chunk-UDS5DZNY.cjs.map +0 -1
  260. package/dist/chunk-V3S74J44.js.map +0 -1
  261. package/dist/chunk-W66YCXWT.js.map +0 -1
  262. package/dist/extension-types-BLEVH4SG.d.cts +0 -571
  263. package/dist/extension-types-BLEVH4SG.d.ts +0 -571
  264. package/dist/materialize-indexes-D4iei4Kp.d.ts +0 -90
  265. package/dist/materialize-indexes-ExQ6OrAh.d.cts +0 -90
@@ -1,17 +1,17 @@
1
1
  'use strict';
2
2
 
3
- var chunkUDS5DZNY_cjs = require('./chunk-UDS5DZNY.cjs');
4
- var chunkLFFVD5ZR_cjs = require('./chunk-LFFVD5ZR.cjs');
5
- var chunk7UTUKH4E_cjs = require('./chunk-7UTUKH4E.cjs');
6
- var chunkLLHMAHG4_cjs = require('./chunk-LLHMAHG4.cjs');
7
- var chunkSE422RES_cjs = require('./chunk-SE422RES.cjs');
3
+ var chunkO7XVCLXW_cjs = require('./chunk-O7XVCLXW.cjs');
4
+ var chunk33PAKPED_cjs = require('./chunk-33PAKPED.cjs');
5
+ var chunkAQR6BHB3_cjs = require('./chunk-AQR6BHB3.cjs');
6
+ var chunkOMQ2NBOR_cjs = require('./chunk-OMQ2NBOR.cjs');
7
+ var chunk6TJ6PKPS_cjs = require('./chunk-6TJ6PKPS.cjs');
8
8
  var chunkZDH3DX3C_cjs = require('./chunk-ZDH3DX3C.cjs');
9
- var chunkQYDUCWD2_cjs = require('./chunk-QYDUCWD2.cjs');
10
- var chunkHP6LWBLB_cjs = require('./chunk-HP6LWBLB.cjs');
11
- var chunkHAQVISUF_cjs = require('./chunk-HAQVISUF.cjs');
12
- var chunkYX3H63VV_cjs = require('./chunk-YX3H63VV.cjs');
9
+ var chunkECU53PMN_cjs = require('./chunk-ECU53PMN.cjs');
10
+ var chunkAO2WPYFZ_cjs = require('./chunk-AO2WPYFZ.cjs');
11
+ var chunkUTTW2Q3M_cjs = require('./chunk-UTTW2Q3M.cjs');
12
+ var chunkX2XOQZT3_cjs = require('./chunk-X2XOQZT3.cjs');
13
13
  var chunk764JHTLT_cjs = require('./chunk-764JHTLT.cjs');
14
- var chunkSAFZ6JTI_cjs = require('./chunk-SAFZ6JTI.cjs');
14
+ var chunkKTBTSHU6_cjs = require('./chunk-KTBTSHU6.cjs');
15
15
  var drizzleOrm = require('drizzle-orm');
16
16
  var pgCore = require('drizzle-orm/pg-core');
17
17
 
@@ -29,6 +29,10 @@ function isPgNativeClient(candidate) {
29
29
  function isPgliteClient(candidate) {
30
30
  return typeof candidate === "object" && hasFunctionProperty(candidate, "query") && hasFunctionProperty(candidate, "dumpDataDir");
31
31
  }
32
+ var PGLITE_MAX_BIND_PARAMETERS = 32767;
33
+ function isPgliteDatabase(db) {
34
+ return isPgliteClient(db.$client);
35
+ }
32
36
  function transactionSession(carrier) {
33
37
  return carrier.session ?? carrier._?.session;
34
38
  }
@@ -46,7 +50,7 @@ var DEFAULT_POSTGRES_STATEMENT_CACHE_MAX = 256;
46
50
  var STATEMENT_NAME_CACHE = /* @__PURE__ */ new Map();
47
51
  var nextStatementId = 0;
48
52
  function statementNameFor(sqlText, cacheMax) {
49
- return chunkUDS5DZNY_cjs.getOrCreateLru(STATEMENT_NAME_CACHE, sqlText, cacheMax, () => {
53
+ return chunkO7XVCLXW_cjs.getOrCreateLru(STATEMENT_NAME_CACHE, sqlText, cacheMax, () => {
50
54
  const name = `tg_${nextStatementId}`;
51
55
  nextStatementId += 1;
52
56
  return name;
@@ -140,9 +144,10 @@ async function executeDrizzleQuery(db, query) {
140
144
  }
141
145
  return result.rows;
142
146
  }
143
- function createPgPreparedStatement(pgClient, sqlText) {
147
+ function createPgPreparedStatement(pgClient, sqlText, maxBindParameters) {
144
148
  return {
145
149
  async execute(params) {
150
+ assertWithinBindParameterLimit(params.length, maxBindParameters);
146
151
  const result = await pgClient.query(sqlText, params);
147
152
  return result.rows;
148
153
  }
@@ -151,6 +156,7 @@ function createPgPreparedStatement(pgClient, sqlText) {
151
156
  function createPostgresExecutionAdapter(db, options = {}) {
152
157
  const prepareStatements = options.prepareStatements ?? true;
153
158
  const cacheMax = options.preparedStatementCacheMax ?? DEFAULT_POSTGRES_STATEMENT_CACHE_MAX;
159
+ const maxBindParameters = options.maxBindParameters;
154
160
  const pgClient = resolvePgClient(
155
161
  db,
156
162
  prepareStatements,
@@ -158,21 +164,29 @@ function createPostgresExecutionAdapter(db, options = {}) {
158
164
  options.useTransactionClient ?? false
159
165
  );
160
166
  function compile(query) {
161
- return chunkSE422RES_cjs.compileQueryWithDialect(db, query, "PostgreSQL");
167
+ return chunk6TJ6PKPS_cjs.compileQueryWithDialect(db, query, "PostgreSQL");
168
+ }
169
+ function assertCompiledWithinBindParameterLimit(compiledQuery) {
170
+ assertWithinBindParameterLimit(
171
+ compiledQuery.params.length,
172
+ maxBindParameters
173
+ );
162
174
  }
163
175
  if (pgClient === void 0) {
164
176
  return {
165
177
  compile,
166
178
  async execute(query) {
179
+ assertCompiledWithinBindParameterLimit(compile(query));
167
180
  return executeDrizzleQuery(
168
181
  db,
169
- chunkYX3H63VV_cjs.isSqlFragment(query) ? chunkSE422RES_cjs.toDrizzleSql(query, "postgres") : query
182
+ chunkX2XOQZT3_cjs.isSqlFragment(query) ? chunk6TJ6PKPS_cjs.toDrizzleSql(query, "postgres") : query
170
183
  );
171
184
  }
172
185
  };
173
186
  }
174
187
  const pgQueryClient = pgClient;
175
188
  async function executeCompiled(compiledQuery) {
189
+ assertCompiledWithinBindParameterLimit(compiledQuery);
176
190
  const result = await pgQueryClient.query(
177
191
  compiledQuery.sql,
178
192
  compiledQuery.params
@@ -183,7 +197,8 @@ function createPostgresExecutionAdapter(db, options = {}) {
183
197
  compile,
184
198
  async execute(query) {
185
199
  const compiled = compile(query);
186
- if (chunkYX3H63VV_cjs.isSqlFragment(query) && chunkYX3H63VV_cjs.shouldForceCustomPlan(query)) {
200
+ assertCompiledWithinBindParameterLimit(compiled);
201
+ if (chunkX2XOQZT3_cjs.isSqlFragment(query) && chunkX2XOQZT3_cjs.shouldForceCustomPlan(query)) {
187
202
  const result = await pgQueryClient.queryUnnamed(
188
203
  compiled.sql,
189
204
  compiled.params
@@ -194,10 +209,30 @@ function createPostgresExecutionAdapter(db, options = {}) {
194
209
  },
195
210
  executeCompiled,
196
211
  prepare(sqlText) {
197
- return createPgPreparedStatement(pgQueryClient, sqlText);
212
+ return createPgPreparedStatement(
213
+ pgQueryClient,
214
+ sqlText,
215
+ maxBindParameters
216
+ );
198
217
  }
199
218
  };
200
219
  }
220
+ function assertWithinBindParameterLimit(parameterCount, maxBindParameters) {
221
+ if (maxBindParameters === void 0 || parameterCount <= maxBindParameters) {
222
+ return;
223
+ }
224
+ throw new chunkKTBTSHU6_cjs.ConfigurationError(
225
+ `PostgreSQL statement uses ${parameterCount} bound parameters, exceeding this backend's limit of ${maxBindParameters}.`,
226
+ {
227
+ capability: "maxBindParameters",
228
+ maxBindParameters,
229
+ parameterCount
230
+ },
231
+ {
232
+ suggestion: "Split the operation into smaller batches or lower the batch size before retrying."
233
+ }
234
+ );
235
+ }
201
236
 
202
237
  // src/backend/drizzle/execution/statement-queue.ts
203
238
  function ignoreOutcome() {
@@ -207,7 +242,7 @@ function createStatementQueue() {
207
242
  let closed = false;
208
243
  return {
209
244
  enqueue(task) {
210
- if (closed) return Promise.reject(new chunkSAFZ6JTI_cjs.TransactionClosedError());
245
+ if (closed) return Promise.reject(new chunkKTBTSHU6_cjs.TransactionClosedError());
211
246
  const result = tail.then(() => task());
212
247
  tail = result.then(ignoreOutcome, ignoreOutcome);
213
248
  return result;
@@ -253,59 +288,69 @@ function createSerialExecutionAdapter(adapter) {
253
288
  // src/backend/drizzle/postgres.ts
254
289
  var NODE_INSERT_PARAM_COUNT = 9;
255
290
  var EDGE_INSERT_PARAM_COUNT = 12;
256
- var POSTGRES_NODE_INSERT_BATCH_SIZE = Math.max(
257
- 1,
258
- Math.floor(chunkQYDUCWD2_cjs.POSTGRES_MAX_BIND_PARAMETERS / NODE_INSERT_PARAM_COUNT)
259
- );
260
- var POSTGRES_EDGE_INSERT_BATCH_SIZE = Math.max(
261
- 1,
262
- Math.floor(chunkQYDUCWD2_cjs.POSTGRES_MAX_BIND_PARAMETERS / EDGE_INSERT_PARAM_COUNT)
263
- );
264
- var POSTGRES_GET_NODES_ID_CHUNK_SIZE = Math.max(
265
- 1,
266
- chunkQYDUCWD2_cjs.POSTGRES_MAX_BIND_PARAMETERS - 2
267
- );
268
- var POSTGRES_GET_EDGES_ID_CHUNK_SIZE = Math.max(
269
- 1,
270
- chunkQYDUCWD2_cjs.POSTGRES_MAX_BIND_PARAMETERS - 1
271
- );
291
+ var GET_NODES_FIXED_PARAM_COUNT = 2;
292
+ var GET_EDGES_FIXED_PARAM_COUNT = 1;
272
293
  var FULLTEXT_UPSERT_PARAM_COUNT = 6;
273
294
  var FULLTEXT_DELETE_FIXED_PARAM_COUNT = 2;
274
- var POSTGRES_FULLTEXT_UPSERT_BATCH_SIZE = Math.max(
275
- 1,
276
- Math.floor(chunkQYDUCWD2_cjs.POSTGRES_MAX_BIND_PARAMETERS / FULLTEXT_UPSERT_PARAM_COUNT)
277
- );
278
- var POSTGRES_FULLTEXT_DELETE_CHUNK_SIZE = Math.max(
279
- 1,
280
- chunkQYDUCWD2_cjs.POSTGRES_MAX_BIND_PARAMETERS - FULLTEXT_DELETE_FIXED_PARAM_COUNT
281
- );
282
295
  var CHECK_UNIQUE_BATCH_FIXED_PARAM_COUNT = 3;
283
- var POSTGRES_CHECK_UNIQUE_BATCH_CHUNK_SIZE = Math.max(
284
- 1,
285
- chunkQYDUCWD2_cjs.POSTGRES_MAX_BIND_PARAMETERS - CHECK_UNIQUE_BATCH_FIXED_PARAM_COUNT
286
- );
287
296
  var UNIQUE_INSERT_PARAM_COUNT = 6;
288
- var POSTGRES_UNIQUE_INSERT_BATCH_SIZE = Math.max(
289
- 1,
290
- Math.floor(chunkQYDUCWD2_cjs.POSTGRES_MAX_BIND_PARAMETERS / UNIQUE_INSERT_PARAM_COUNT)
291
- );
292
- var toNodeRow = chunk7UTUKH4E_cjs.createNodeRowMapper(chunk7UTUKH4E_cjs.POSTGRES_ROW_MAPPER_CONFIG);
293
- var toEdgeRow = chunk7UTUKH4E_cjs.createEdgeRowMapper(chunk7UTUKH4E_cjs.POSTGRES_ROW_MAPPER_CONFIG);
294
- var toUniqueRow = chunk7UTUKH4E_cjs.createUniqueRowMapper(chunk7UTUKH4E_cjs.POSTGRES_ROW_MAPPER_CONFIG);
295
- var toSchemaVersionRow = chunk7UTUKH4E_cjs.createSchemaVersionRowMapper(
296
- chunk7UTUKH4E_cjs.POSTGRES_ROW_MAPPER_CONFIG
297
+ function computePostgresBatchChunkSizes(maxBindParameters) {
298
+ return {
299
+ checkUniqueBatchChunkSize: Math.max(
300
+ 1,
301
+ maxBindParameters - CHECK_UNIQUE_BATCH_FIXED_PARAM_COUNT
302
+ ),
303
+ edgeInsertBatchSize: Math.max(
304
+ 1,
305
+ Math.floor(maxBindParameters / EDGE_INSERT_PARAM_COUNT)
306
+ ),
307
+ embeddingUpsertBatchSize: Math.max(
308
+ 1,
309
+ Math.floor(maxBindParameters / chunkO7XVCLXW_cjs.EMBEDDING_UPSERT_PARAM_COUNT)
310
+ ),
311
+ fulltextDeleteChunkSize: Math.max(
312
+ 1,
313
+ maxBindParameters - FULLTEXT_DELETE_FIXED_PARAM_COUNT
314
+ ),
315
+ fulltextUpsertBatchSize: Math.max(
316
+ 1,
317
+ Math.floor(maxBindParameters / FULLTEXT_UPSERT_PARAM_COUNT)
318
+ ),
319
+ getEdgesChunkSize: Math.max(
320
+ 1,
321
+ maxBindParameters - GET_EDGES_FIXED_PARAM_COUNT
322
+ ),
323
+ getNodesChunkSize: Math.max(
324
+ 1,
325
+ maxBindParameters - GET_NODES_FIXED_PARAM_COUNT
326
+ ),
327
+ nodeInsertBatchSize: Math.max(
328
+ 1,
329
+ Math.floor(maxBindParameters / NODE_INSERT_PARAM_COUNT)
330
+ ),
331
+ uniqueInsertBatchSize: Math.max(
332
+ 1,
333
+ Math.floor(maxBindParameters / UNIQUE_INSERT_PARAM_COUNT)
334
+ )
335
+ };
336
+ }
337
+ var toNodeRow = chunkAQR6BHB3_cjs.createNodeRowMapper(chunkAQR6BHB3_cjs.POSTGRES_ROW_MAPPER_CONFIG);
338
+ var toEdgeRow = chunkAQR6BHB3_cjs.createEdgeRowMapper(chunkAQR6BHB3_cjs.POSTGRES_ROW_MAPPER_CONFIG);
339
+ var toUniqueRow = chunkAQR6BHB3_cjs.createUniqueRowMapper(chunkAQR6BHB3_cjs.POSTGRES_ROW_MAPPER_CONFIG);
340
+ var toSchemaVersionRow = chunkAQR6BHB3_cjs.createSchemaVersionRowMapper(
341
+ chunkAQR6BHB3_cjs.POSTGRES_ROW_MAPPER_CONFIG
297
342
  );
298
343
  function buildPostgresCapabilities(fulltextStrategy, vectorStrategy) {
299
344
  return {
300
- ...chunkQYDUCWD2_cjs.POSTGRES_CAPABILITIES,
301
- ...vectorStrategy === void 0 ? {} : { vector: chunkHAQVISUF_cjs.buildVectorCapabilities(vectorStrategy) },
302
- fulltext: chunkHAQVISUF_cjs.buildFulltextCapabilities(fulltextStrategy)
345
+ ...chunkECU53PMN_cjs.POSTGRES_CAPABILITIES,
346
+ ...vectorStrategy === void 0 ? {} : { vector: chunkUTTW2Q3M_cjs.buildVectorCapabilities(vectorStrategy) },
347
+ fulltext: chunkUTTW2Q3M_cjs.buildFulltextCapabilities(fulltextStrategy)
303
348
  };
304
349
  }
305
350
  function createPostgresBackend(db, options = {}) {
306
- const tables2 = options.tables ?? chunkLLHMAHG4_cjs.tables;
307
- const fulltextStrategy = options.fulltext ?? chunkHAQVISUF_cjs.tsvectorStrategy;
308
- const vectorStrategy = options.vector === false ? void 0 : options.vector ?? chunkLFFVD5ZR_cjs.pgvectorStrategy;
351
+ const tables2 = options.tables ?? chunkOMQ2NBOR_cjs.tables;
352
+ const fulltextStrategy = options.fulltext ?? chunkUTTW2Q3M_cjs.tsvectorStrategy;
353
+ const vectorStrategy = options.vector === false ? void 0 : options.vector ?? chunk33PAKPED_cjs.pgvectorStrategy;
309
354
  const iterativeScanProbe = createIterativeScanProbe();
310
355
  const baseCapabilities = buildPostgresCapabilities(
311
356
  fulltextStrategy,
@@ -318,14 +363,23 @@ function createPostgresBackend(db, options = {}) {
318
363
  supported: false
319
364
  }
320
365
  } : {};
321
- const capabilities = chunkQYDUCWD2_cjs.normalizeGraphAnalyticsCapabilities({
366
+ const configuredMaxBindParameters = options.capabilities?.maxBindParameters ?? chunkECU53PMN_cjs.POSTGRES_MAX_BIND_PARAMETERS;
367
+ const driverBindParameterOverrides = isPgliteDatabase(db) ? {
368
+ maxBindParameters: Math.min(
369
+ configuredMaxBindParameters,
370
+ PGLITE_MAX_BIND_PARAMETERS
371
+ )
372
+ } : {};
373
+ const capabilities = chunkECU53PMN_cjs.normalizeGraphAnalyticsCapabilities({
322
374
  ...baseCapabilities,
323
375
  ...httpOnlyOverrides,
324
- ...options.capabilities
376
+ ...options.capabilities,
377
+ ...driverBindParameterOverrides
325
378
  });
326
379
  const adapterOptions = {
327
380
  ...options.prepareStatements === void 0 ? {} : { prepareStatements: options.prepareStatements },
328
- ...options.preparedStatementCacheMax === void 0 ? {} : { preparedStatementCacheMax: options.preparedStatementCacheMax }
381
+ ...options.preparedStatementCacheMax === void 0 ? {} : { preparedStatementCacheMax: options.preparedStatementCacheMax },
382
+ maxBindParameters: capabilities.maxBindParameters ?? chunkECU53PMN_cjs.POSTGRES_MAX_BIND_PARAMETERS
329
383
  };
330
384
  const executionAdapter = createPostgresExecutionAdapter(db, adapterOptions);
331
385
  const tableNames = {
@@ -344,8 +398,8 @@ function createPostgresBackend(db, options = {}) {
344
398
  drizzleOrm.getTableName(tables2.uniques),
345
399
  tableNames.fulltext
346
400
  ].map(
347
- (name) => chunkSE422RES_cjs.toDrizzleSql(
348
- chunkYX3H63VV_cjs.sql`ANALYZE (SKIP_LOCKED) ${chunkYX3H63VV_cjs.sql.identifier(name)}`,
401
+ (name) => chunk6TJ6PKPS_cjs.toDrizzleSql(
402
+ chunkX2XOQZT3_cjs.sql`ANALYZE (SKIP_LOCKED) ${chunkX2XOQZT3_cjs.sql.identifier(name)}`,
349
403
  "postgres"
350
404
  )
351
405
  );
@@ -354,11 +408,11 @@ function createPostgresBackend(db, options = {}) {
354
408
  tableNames.recordedEdges,
355
409
  tableNames.recordedClock
356
410
  ];
357
- const operationStrategy = chunkUDS5DZNY_cjs.createPostgresOperationStrategy(
411
+ const operationStrategy = chunkO7XVCLXW_cjs.createPostgresOperationStrategy(
358
412
  tables2,
359
413
  fulltextStrategy
360
414
  );
361
- const recordedTableExists = chunkUDS5DZNY_cjs.createCachedTableExistence(
415
+ const recordedTableExists = chunkO7XVCLXW_cjs.createCachedTableExistence(
362
416
  async (tableName) => {
363
417
  const rows = await executionAdapter.execute(
364
418
  operationStrategy.buildTableExists(tableName)
@@ -369,7 +423,7 @@ function createPostgresBackend(db, options = {}) {
369
423
  );
370
424
  const matTable = tables2.contributionMaterializations;
371
425
  async function ensureContributionMaterializationsTableImpl() {
372
- await db.execute(drizzleOrm.sql.raw(chunkLLHMAHG4_cjs.generatePgCreateTableSQL(matTable)));
426
+ await db.execute(drizzleOrm.sql.raw(chunkOMQ2NBOR_cjs.generatePgCreateTableSQL(matTable)));
373
427
  }
374
428
  async function getContributionMaterializationRow(identity) {
375
429
  const rows = await db.select().from(matTable).where(
@@ -382,25 +436,25 @@ function createPostgresBackend(db, options = {}) {
382
436
  );
383
437
  const row = rows[0];
384
438
  if (row === void 0) return void 0;
385
- return chunkUDS5DZNY_cjs.mapContributionMaterializationRow(
439
+ return chunkO7XVCLXW_cjs.mapContributionMaterializationRow(
386
440
  row,
387
- chunkUDS5DZNY_cjs.POSTGRES_CONTRIBUTION_MAT_TIMESTAMPS.decode
441
+ chunkO7XVCLXW_cjs.POSTGRES_CONTRIBUTION_MAT_TIMESTAMPS.decode
388
442
  );
389
443
  }
390
444
  async function getContributionMaterializationRows(graphId) {
391
445
  const rows = await db.select().from(matTable).where(drizzleOrm.eq(matTable.graphId, graphId));
392
446
  return rows.map(
393
- (row) => chunkUDS5DZNY_cjs.mapContributionMaterializationRow(
447
+ (row) => chunkO7XVCLXW_cjs.mapContributionMaterializationRow(
394
448
  row,
395
- chunkUDS5DZNY_cjs.POSTGRES_CONTRIBUTION_MAT_TIMESTAMPS.decode
449
+ chunkO7XVCLXW_cjs.POSTGRES_CONTRIBUTION_MAT_TIMESTAMPS.decode
396
450
  )
397
451
  );
398
452
  }
399
453
  async function recordContributionMaterializationRow(params) {
400
454
  await db.insert(matTable).values(
401
- chunkUDS5DZNY_cjs.buildContributionInsertValues(
455
+ chunkO7XVCLXW_cjs.buildContributionInsertValues(
402
456
  params,
403
- chunkUDS5DZNY_cjs.POSTGRES_CONTRIBUTION_MAT_TIMESTAMPS.encode
457
+ chunkO7XVCLXW_cjs.POSTGRES_CONTRIBUTION_MAT_TIMESTAMPS.encode
404
458
  )
405
459
  ).onConflictDoUpdate({
406
460
  target: [
@@ -409,7 +463,7 @@ function createPostgresBackend(db, options = {}) {
409
463
  matTable.owner,
410
464
  matTable.tableName
411
465
  ],
412
- set: chunkUDS5DZNY_cjs.buildContributionOnConflictSet(
466
+ set: chunkO7XVCLXW_cjs.buildContributionOnConflictSet(
413
467
  matTable.materializedAt,
414
468
  params.materializedAt
415
469
  )
@@ -425,7 +479,7 @@ function createPostgresBackend(db, options = {}) {
425
479
  )
426
480
  );
427
481
  }
428
- const contributionMaterializer = chunkUDS5DZNY_cjs.createContributionMaterializer({
482
+ const contributionMaterializer = chunkO7XVCLXW_cjs.createContributionMaterializer({
429
483
  dialect: "postgres",
430
484
  fulltextStrategy,
431
485
  fulltextTableName: tables2.fulltextTableName,
@@ -452,7 +506,7 @@ function createPostgresBackend(db, options = {}) {
452
506
  });
453
507
  function runSchemaWriteTransaction(graphId, fn) {
454
508
  if (!capabilities.transactions) {
455
- throw new chunkSAFZ6JTI_cjs.ConfigurationError(
509
+ throw new chunkKTBTSHU6_cjs.ConfigurationError(
456
510
  "commitSchemaVersion and setActiveVersion require atomic transactions, but this Postgres backend does not provide them. The drizzle-orm/neon-http driver communicates over HTTP and cannot hold a session across statements; use drizzle-orm/neon-serverless (websocket) for transactional writes.",
457
511
  {
458
512
  backend: "postgres",
@@ -494,7 +548,7 @@ function createPostgresBackend(db, options = {}) {
494
548
  iterativeScanProbe
495
549
  });
496
550
  return {
497
- backend: chunkUDS5DZNY_cjs.gateFulltext(
551
+ backend: chunkO7XVCLXW_cjs.gateFulltext(
498
552
  backend2,
499
553
  contributionMaterializer.assertInitialized
500
554
  ),
@@ -512,40 +566,40 @@ function createPostgresBackend(db, options = {}) {
512
566
  );
513
567
  const executeCompiled = trustedExecutionAdapter.executeCompiled;
514
568
  if (executeCompiled === void 0) {
515
- throw new chunkSAFZ6JTI_cjs.ConfigurationError(
569
+ throw new chunkKTBTSHU6_cjs.ConfigurationError(
516
570
  "Trusted import could not bind raw execution to the PostgreSQL transaction.",
517
571
  { capability: "trustedImport", dialect: "postgres" }
518
572
  );
519
573
  }
520
- const trustedTx = chunkQYDUCWD2_cjs.createBackendOverlay(tx, {
574
+ const trustedTx = chunkECU53PMN_cjs.createBackendOverlay(tx, {
521
575
  executeRaw(sqlText, params) {
522
576
  return executeCompiled({ params, sql: sqlText });
523
577
  }
524
578
  });
525
- await chunkUDS5DZNY_cjs.lockPostgresTrustedImportTables(trustedTx, tableNames);
526
- await chunkUDS5DZNY_cjs.assertTrustedImportDatabaseEmpty(trustedTx, tableNames);
527
- const indexDefinitions = await chunkUDS5DZNY_cjs.suspendPostgresSecondaryIndexes(
579
+ await chunkO7XVCLXW_cjs.lockPostgresTrustedImportTables(trustedTx, tableNames);
580
+ await chunkO7XVCLXW_cjs.assertTrustedImportDatabaseEmpty(trustedTx, tableNames);
581
+ const indexDefinitions = await chunkO7XVCLXW_cjs.suspendPostgresSecondaryIndexes(
528
582
  trustedTx,
529
583
  tableNames
530
584
  );
531
585
  const result = await fn(
532
- chunkUDS5DZNY_cjs.createPostgresTrustedImportSession(trustedTx, tableNames)
586
+ chunkO7XVCLXW_cjs.createPostgresTrustedImportSession(trustedTx, tableNames)
533
587
  );
534
- await chunkUDS5DZNY_cjs.restoreSecondaryIndexes(trustedTx, indexDefinitions);
535
- await chunkUDS5DZNY_cjs.analyzeImportedTables(trustedTx, tableNames);
588
+ await chunkO7XVCLXW_cjs.restoreSecondaryIndexes(trustedTx, indexDefinitions);
589
+ await chunkO7XVCLXW_cjs.analyzeImportedTables(trustedTx, tableNames);
536
590
  return result;
537
591
  });
538
592
  }
539
593
  } : {},
540
594
  async bootstrapTables() {
541
- const statements = chunkLLHMAHG4_cjs.generatePostgresDDL(tables2, fulltextStrategy);
595
+ const statements = chunkOMQ2NBOR_cjs.generatePostgresDDL(tables2, fulltextStrategy);
542
596
  for (const statement of statements) {
543
597
  await db.execute(drizzleOrm.sql.raw(statement));
544
598
  }
545
599
  },
546
600
  async ensureRevisionOriginsTable() {
547
601
  await db.execute(
548
- drizzleOrm.sql.raw(chunkLLHMAHG4_cjs.generatePgCreateTableSQL(tables2.revisionOrigins))
602
+ drizzleOrm.sql.raw(chunkOMQ2NBOR_cjs.generatePgCreateTableSQL(tables2.revisionOrigins))
549
603
  );
550
604
  },
551
605
  // Every fulltext-touching method asserts the durable marker instead
@@ -553,7 +607,7 @@ function createPostgresBackend(db, options = {}) {
553
607
  // uninitialized database throws `StoreNotInitializedError` loudly
554
608
  // rather than self-healing on a read/write path (#135). Shared
555
609
  // verbatim with the tx-scoped gate via `gateFulltextMethods`.
556
- ...chunkUDS5DZNY_cjs.gateFulltextMethods(
610
+ ...chunkO7XVCLXW_cjs.gateFulltextMethods(
557
611
  operations,
558
612
  contributionMaterializer.assertInitialized
559
613
  ),
@@ -562,7 +616,7 @@ function createPostgresBackend(db, options = {}) {
562
616
  },
563
617
  async ensureIndexMaterializationsTable() {
564
618
  await db.execute(
565
- drizzleOrm.sql.raw(chunkLLHMAHG4_cjs.generatePgCreateTableSQL(tables2.indexMaterializations))
619
+ drizzleOrm.sql.raw(chunkOMQ2NBOR_cjs.generatePgCreateTableSQL(tables2.indexMaterializations))
566
620
  );
567
621
  const tableName = drizzleOrm.getTableName(tables2.indexMaterializations);
568
622
  await db.execute(
@@ -614,26 +668,26 @@ function createPostgresBackend(db, options = {}) {
614
668
  const rows = await db.select().from(t).where(drizzleOrm.eq(t.indexName, indexName));
615
669
  const row = rows[0];
616
670
  if (row === void 0) return void 0;
617
- return chunkUDS5DZNY_cjs.mapMaterializationRow(row, chunkUDS5DZNY_cjs.POSTGRES_INDEX_MAT_TIMESTAMPS.decode);
671
+ return chunkO7XVCLXW_cjs.mapMaterializationRow(row, chunkO7XVCLXW_cjs.POSTGRES_INDEX_MAT_TIMESTAMPS.decode);
618
672
  },
619
673
  async getIndexMaterializations(statusKeys) {
620
674
  if (statusKeys.length === 0) return [];
621
675
  const t = tables2.indexMaterializations;
622
676
  const rows = await db.select().from(t).where(drizzleOrm.inArray(t.indexName, [...statusKeys]));
623
677
  return rows.map(
624
- (row) => chunkUDS5DZNY_cjs.mapMaterializationRow(row, chunkUDS5DZNY_cjs.POSTGRES_INDEX_MAT_TIMESTAMPS.decode)
678
+ (row) => chunkO7XVCLXW_cjs.mapMaterializationRow(row, chunkO7XVCLXW_cjs.POSTGRES_INDEX_MAT_TIMESTAMPS.decode)
625
679
  );
626
680
  },
627
681
  async recordIndexMaterialization(params) {
628
682
  const t = tables2.indexMaterializations;
629
683
  await db.insert(t).values(
630
- chunkUDS5DZNY_cjs.buildMaterializationInsertValues(
684
+ chunkO7XVCLXW_cjs.buildMaterializationInsertValues(
631
685
  params,
632
- chunkUDS5DZNY_cjs.POSTGRES_INDEX_MAT_TIMESTAMPS.encode
686
+ chunkO7XVCLXW_cjs.POSTGRES_INDEX_MAT_TIMESTAMPS.encode
633
687
  )
634
688
  ).onConflictDoUpdate({
635
689
  target: t.indexName,
636
- set: chunkUDS5DZNY_cjs.buildMaterializationOnConflictSet(params.materializedAt)
690
+ set: chunkO7XVCLXW_cjs.buildMaterializationOnConflictSet(params.materializedAt)
637
691
  });
638
692
  },
639
693
  async ensureContributionMaterializationsTable() {
@@ -649,37 +703,37 @@ function createPostgresBackend(db, options = {}) {
649
703
  await contributionMaterializer.assertInitialized(graphId);
650
704
  },
651
705
  async ensureKindRemovalsTable() {
652
- await db.execute(drizzleOrm.sql.raw(chunkLLHMAHG4_cjs.generatePgCreateTableSQL(tables2.kindRemovals)));
706
+ await db.execute(drizzleOrm.sql.raw(chunkOMQ2NBOR_cjs.generatePgCreateTableSQL(tables2.kindRemovals)));
653
707
  },
654
708
  async getPendingKindRemovals(graphId) {
655
709
  const t = tables2.kindRemovals;
656
710
  const rows = await db.select().from(t).where(drizzleOrm.and(drizzleOrm.eq(t.graphId, graphId), drizzleOrm.isNull(t.removedAt)));
657
711
  return rows.map(
658
- (row) => chunkUDS5DZNY_cjs.mapKindRemovalRow(row, chunkUDS5DZNY_cjs.POSTGRES_KIND_REMOVAL_TIMESTAMPS.decode)
712
+ (row) => chunkO7XVCLXW_cjs.mapKindRemovalRow(row, chunkO7XVCLXW_cjs.POSTGRES_KIND_REMOVAL_TIMESTAMPS.decode)
659
713
  );
660
714
  },
661
715
  async getAllKindRemovals(graphId) {
662
716
  const t = tables2.kindRemovals;
663
717
  const rows = await db.select().from(t).where(drizzleOrm.eq(t.graphId, graphId));
664
718
  return rows.map(
665
- (row) => chunkUDS5DZNY_cjs.mapKindRemovalRow(row, chunkUDS5DZNY_cjs.POSTGRES_KIND_REMOVAL_TIMESTAMPS.decode)
719
+ (row) => chunkO7XVCLXW_cjs.mapKindRemovalRow(row, chunkO7XVCLXW_cjs.POSTGRES_KIND_REMOVAL_TIMESTAMPS.decode)
666
720
  );
667
721
  },
668
722
  async recordKindRemoval(params) {
669
723
  const t = tables2.kindRemovals;
670
724
  await db.insert(t).values(
671
- chunkUDS5DZNY_cjs.buildKindRemovalInsertValues(
725
+ chunkO7XVCLXW_cjs.buildKindRemovalInsertValues(
672
726
  params,
673
- chunkUDS5DZNY_cjs.POSTGRES_KIND_REMOVAL_TIMESTAMPS.encode
727
+ chunkO7XVCLXW_cjs.POSTGRES_KIND_REMOVAL_TIMESTAMPS.encode
674
728
  )
675
729
  ).onConflictDoUpdate({
676
730
  target: [t.graphId, t.kindName, t.entity, t.schemaVersion],
677
- set: chunkUDS5DZNY_cjs.buildKindRemovalOnConflictSet(t.removedAt, params.removedAt)
731
+ set: chunkO7XVCLXW_cjs.buildKindRemovalOnConflictSet(t.removedAt, params.removedAt)
678
732
  });
679
733
  },
680
734
  async ensureReconciliationMarkersTable() {
681
735
  await db.execute(
682
- drizzleOrm.sql.raw(chunkLLHMAHG4_cjs.generatePgCreateTableSQL(tables2.reconciliationMarkers))
736
+ drizzleOrm.sql.raw(chunkOMQ2NBOR_cjs.generatePgCreateTableSQL(tables2.reconciliationMarkers))
683
737
  );
684
738
  },
685
739
  async ensureRuntimeContributions(graphId) {
@@ -739,8 +793,8 @@ function createPostgresBackend(db, options = {}) {
739
793
  const presentRecordedTables = tablePresence.filter((entry) => entry.exists).map((entry) => entry.tableName);
740
794
  for (const tableName of presentRecordedTables) {
741
795
  await db.execute(
742
- chunkSE422RES_cjs.toDrizzleSql(
743
- chunkYX3H63VV_cjs.sql`ANALYZE (SKIP_LOCKED) ${chunkYX3H63VV_cjs.sql.identifier(tableName)}`,
796
+ chunk6TJ6PKPS_cjs.toDrizzleSql(
797
+ chunkX2XOQZT3_cjs.sql`ANALYZE (SKIP_LOCKED) ${chunkX2XOQZT3_cjs.sql.identifier(tableName)}`,
744
798
  "postgres"
745
799
  )
746
800
  );
@@ -762,9 +816,9 @@ function createPostgresBackend(db, options = {}) {
762
816
  return backend.transactionWithNative((tx) => fn(tx), options2);
763
817
  },
764
818
  async transactionWithNative(fn, options2) {
765
- const temporaryWrites = options2?.temporaryWrites === chunkQYDUCWD2_cjs.INTERNAL_TEMPORARY_WRITES;
819
+ const temporaryWrites = options2?.temporaryWrites === chunkECU53PMN_cjs.INTERNAL_TEMPORARY_WRITES;
766
820
  if (temporaryWrites && options2.accessMode !== "read_only") {
767
- throw new chunkSAFZ6JTI_cjs.ConfigurationError(
821
+ throw new chunkKTBTSHU6_cjs.ConfigurationError(
768
822
  "Temporary-write transactions must be semantically read-only.",
769
823
  { dialect: "postgres" }
770
824
  );
@@ -788,7 +842,7 @@ function createPostgresBackend(db, options = {}) {
788
842
  },
789
843
  adoptTransaction(externalTx) {
790
844
  if (!capabilities.transactions) {
791
- throw new chunkSAFZ6JTI_cjs.ConfigurationError(
845
+ throw new chunkKTBTSHU6_cjs.ConfigurationError(
792
846
  "Cross-store atomicity is unavailable on this Postgres backend: its driver does not support transactions (drizzle-orm/neon-http, Cloudflare D1). Adopting an external transaction here would let the caller's relational write commit with no way to roll back the graph write. Use a node-postgres or neon-serverless (Pool/WebSocket) connection for cross-store transactions.",
793
847
  {
794
848
  backend: "postgres",
@@ -797,7 +851,7 @@ function createPostgresBackend(db, options = {}) {
797
851
  }
798
852
  );
799
853
  }
800
- chunkUDS5DZNY_cjs.assertAdoptedDialect(
854
+ chunkO7XVCLXW_cjs.assertAdoptedDialect(
801
855
  externalTx,
802
856
  pgCore.PgTransaction,
803
857
  "postgres"
@@ -905,7 +959,7 @@ function createPostgresOperationBackend(options) {
905
959
  async function runVectorSearchGucGroup(overrides, query) {
906
960
  const runExclusive = executionAdapter.runExclusive;
907
961
  if (runExclusive === void 0) {
908
- throw new chunkSAFZ6JTI_cjs.CompilerInvariantError(
962
+ throw new chunkKTBTSHU6_cjs.CompilerInvariantError(
909
963
  "A transaction-scoped Postgres backend must expose runExclusive; its execution adapter was not wrapped by createSerialExecutionAdapter."
910
964
  );
911
965
  }
@@ -948,31 +1002,17 @@ function createPostgresOperationBackend(options) {
948
1002
  return txAdapter.execute(query);
949
1003
  });
950
1004
  }
951
- const batchConfig = {
952
- checkUniqueBatchChunkSize: POSTGRES_CHECK_UNIQUE_BATCH_CHUNK_SIZE,
953
- edgeInsertBatchSize: POSTGRES_EDGE_INSERT_BATCH_SIZE,
954
- // Unlike the static siblings, the embedding upsert honors a runtime
955
- // `maxBindParameters` override so its chunk size tracks the connection's
956
- // actual bind budget.
957
- embeddingUpsertBatchSize: Math.max(
958
- 1,
959
- Math.floor(
960
- (capabilities.maxBindParameters ?? chunkQYDUCWD2_cjs.POSTGRES_MAX_BIND_PARAMETERS) / chunkUDS5DZNY_cjs.EMBEDDING_UPSERT_PARAM_COUNT
961
- )
962
- ),
963
- getEdgesChunkSize: POSTGRES_GET_EDGES_ID_CHUNK_SIZE,
964
- getNodesChunkSize: POSTGRES_GET_NODES_ID_CHUNK_SIZE,
965
- nodeInsertBatchSize: POSTGRES_NODE_INSERT_BATCH_SIZE,
966
- uniqueInsertBatchSize: POSTGRES_UNIQUE_INSERT_BATCH_SIZE
967
- };
968
- const commonBackend = chunkUDS5DZNY_cjs.createCommonOperationBackend({
1005
+ const batchConfig = computePostgresBatchChunkSizes(
1006
+ capabilities.maxBindParameters ?? chunkECU53PMN_cjs.POSTGRES_MAX_BIND_PARAMETERS
1007
+ );
1008
+ const commonBackend = chunkO7XVCLXW_cjs.createCommonOperationBackend({
969
1009
  batchConfig,
970
1010
  execution: {
971
1011
  execAll,
972
1012
  execGet,
973
1013
  execRun
974
1014
  },
975
- nowIso: chunk7UTUKH4E_cjs.nowIso,
1015
+ nowIso: chunkAQR6BHB3_cjs.nowIso,
976
1016
  operationStrategy,
977
1017
  rowMappers: {
978
1018
  toEdgeRow,
@@ -990,26 +1030,26 @@ function createPostgresOperationBackend(options) {
990
1030
  };
991
1031
  const vectorEmbeddingMethods = vectorStrategy === void 0 ? {} : {
992
1032
  async upsertEmbedding(params) {
993
- const slot = chunkUDS5DZNY_cjs.vectorSlotFromParams(params);
1033
+ const slot = chunkO7XVCLXW_cjs.vectorSlotFromParams(params);
994
1034
  await contributionMaterializer.assertVectorSlot(slot);
995
- const statements = vectorStrategy.buildUpsert(slot, params, chunk7UTUKH4E_cjs.nowIso());
1035
+ const statements = vectorStrategy.buildUpsert(slot, params, chunkAQR6BHB3_cjs.nowIso());
996
1036
  try {
997
1037
  for (const statement of statements) {
998
1038
  await execRun(statement);
999
1039
  }
1000
1040
  } catch (error) {
1001
- throw chunkUDS5DZNY_cjs.mapVectorWriteError(error, params);
1041
+ throw chunkO7XVCLXW_cjs.mapVectorWriteError(error, params);
1002
1042
  }
1003
1043
  },
1004
1044
  async upsertEmbeddingBatch(params) {
1005
1045
  if (params.rows.length === 0) return;
1006
- const slot = chunkUDS5DZNY_cjs.vectorSlotFromParams(params);
1046
+ const slot = chunkO7XVCLXW_cjs.vectorSlotFromParams(params);
1007
1047
  await contributionMaterializer.assertVectorSlot(slot);
1008
1048
  const rowsById = new Map(
1009
1049
  params.rows.map((row) => [row.nodeId, row])
1010
1050
  );
1011
1051
  const rows = [...rowsById.values()];
1012
- const timestamp = chunk7UTUKH4E_cjs.nowIso();
1052
+ const timestamp = chunkAQR6BHB3_cjs.nowIso();
1013
1053
  try {
1014
1054
  for (const chunk2 of chunkZDH3DX3C_cjs.chunk(
1015
1055
  rows,
@@ -1040,11 +1080,11 @@ function createPostgresOperationBackend(options) {
1040
1080
  }
1041
1081
  }
1042
1082
  } catch (error) {
1043
- throw chunkUDS5DZNY_cjs.mapVectorWriteError(error, params);
1083
+ throw chunkO7XVCLXW_cjs.mapVectorWriteError(error, params);
1044
1084
  }
1045
1085
  },
1046
1086
  async deleteEmbedding(params) {
1047
- const slot = chunkUDS5DZNY_cjs.vectorSlotFromParams(params);
1087
+ const slot = chunkO7XVCLXW_cjs.vectorSlotFromParams(params);
1048
1088
  await contributionMaterializer.assertVectorSlot(slot);
1049
1089
  const statements = vectorStrategy.buildDelete(slot, params);
1050
1090
  for (const statement of statements) {
@@ -1052,19 +1092,19 @@ function createPostgresOperationBackend(options) {
1052
1092
  }
1053
1093
  },
1054
1094
  async vectorSearch(params) {
1055
- chunkHAQVISUF_cjs.assertVectorSearchLimit(params.limit);
1056
- chunkLFFVD5ZR_cjs.assertPgvectorEfSearch(params.efSearch);
1057
- const slot = chunkUDS5DZNY_cjs.vectorSlotFromParams(params);
1095
+ chunkUTTW2Q3M_cjs.assertVectorSearchLimit(params.limit);
1096
+ chunk33PAKPED_cjs.assertPgvectorEfSearch(params.efSearch);
1097
+ const slot = chunkO7XVCLXW_cjs.vectorSlotFromParams(params);
1058
1098
  const query = vectorStrategy.buildSearch(
1059
1099
  slot,
1060
1100
  params,
1061
1101
  // Store-compiled candidates (predicates + subclass + currency)
1062
1102
  // take precedence; the live-node default covers direct backend use.
1063
- params.candidates ?? chunkUDS5DZNY_cjs.buildLiveNodeCandidates(
1103
+ params.candidates ?? chunkO7XVCLXW_cjs.buildLiveNodeCandidates(
1064
1104
  tableNames.nodes,
1065
1105
  params.graphId,
1066
1106
  params.nodeKind,
1067
- chunk7UTUKH4E_cjs.nowIso()
1107
+ chunkAQR6BHB3_cjs.nowIso()
1068
1108
  )
1069
1109
  );
1070
1110
  const gucOverrides = await vectorSearchGucOverrides(params);
@@ -1072,7 +1112,7 @@ function createPostgresOperationBackend(options) {
1072
1112
  try {
1073
1113
  rows = await runVectorSearch(gucOverrides, query);
1074
1114
  } catch (error) {
1075
- throw chunkUDS5DZNY_cjs.mapVectorWriteError(error, params);
1115
+ throw chunkO7XVCLXW_cjs.mapVectorWriteError(error, params);
1076
1116
  }
1077
1117
  return rows.map((row) => ({
1078
1118
  nodeId: row.node_id,
@@ -1084,10 +1124,10 @@ function createPostgresOperationBackend(options) {
1084
1124
  // multi-statement fallback by simply not exposing the member.
1085
1125
  ...capabilities.windowFunctions ? {
1086
1126
  async hybridSearch(params) {
1087
- chunkHAQVISUF_cjs.assertVectorSearchLimit(params.limit);
1088
- chunkHAQVISUF_cjs.assertVectorSearchLimit(params.vector.k);
1089
- chunkLFFVD5ZR_cjs.assertPgvectorEfSearch(params.vector.efSearch);
1090
- const slot = chunkUDS5DZNY_cjs.vectorSlotFromParams({
1127
+ chunkUTTW2Q3M_cjs.assertVectorSearchLimit(params.limit);
1128
+ chunkUTTW2Q3M_cjs.assertVectorSearchLimit(params.vector.k);
1129
+ chunk33PAKPED_cjs.assertPgvectorEfSearch(params.vector.efSearch);
1130
+ const slot = chunkO7XVCLXW_cjs.vectorSlotFromParams({
1091
1131
  graphId: params.graphId,
1092
1132
  nodeKind: params.nodeKind,
1093
1133
  fieldPath: params.vector.fieldPath,
@@ -1095,11 +1135,11 @@ function createPostgresOperationBackend(options) {
1095
1135
  metric: params.vector.metric,
1096
1136
  indexType: params.vector.indexType
1097
1137
  });
1098
- const candidates = params.candidates ?? chunkUDS5DZNY_cjs.buildLiveNodeCandidates(
1138
+ const candidates = params.candidates ?? chunkO7XVCLXW_cjs.buildLiveNodeCandidates(
1099
1139
  tableNames.nodes,
1100
1140
  params.graphId,
1101
1141
  params.nodeKind,
1102
- chunk7UTUKH4E_cjs.nowIso()
1142
+ chunkAQR6BHB3_cjs.nowIso()
1103
1143
  );
1104
1144
  const vectorParams = {
1105
1145
  graphId: params.graphId,
@@ -1115,11 +1155,11 @@ function createPostgresOperationBackend(options) {
1115
1155
  const vectorSql = vectorStrategy.buildSearch(
1116
1156
  slot,
1117
1157
  vectorParams,
1118
- chunkYX3H63VV_cjs.sql.raw("SELECT node_id FROM tg_hybrid_cand")
1158
+ chunkX2XOQZT3_cjs.sql.raw("SELECT node_id FROM tg_hybrid_cand")
1119
1159
  );
1120
1160
  const statement = operationStrategy.buildHybridSearch(
1121
1161
  { ...params, candidates },
1122
- chunkSE422RES_cjs.toDrizzleSql(vectorSql, "postgres"),
1162
+ chunk6TJ6PKPS_cjs.toDrizzleSql(vectorSql, "postgres"),
1123
1163
  params.vector.metric === "cosine"
1124
1164
  );
1125
1165
  const gucOverrides = await vectorSearchGucOverrides({
@@ -1133,9 +1173,9 @@ function createPostgresOperationBackend(options) {
1133
1173
  statement
1134
1174
  );
1135
1175
  } catch (error) {
1136
- throw chunkUDS5DZNY_cjs.mapVectorWriteError(error, vectorParams);
1176
+ throw chunkO7XVCLXW_cjs.mapVectorWriteError(error, vectorParams);
1137
1177
  }
1138
- return raw.map((row) => chunkUDS5DZNY_cjs.mapHybridSearchRow(row, toNodeRow));
1178
+ return raw.map((row) => chunkO7XVCLXW_cjs.mapHybridSearchRow(row, toNodeRow));
1139
1179
  }
1140
1180
  } : {}
1141
1181
  };
@@ -1151,7 +1191,7 @@ function createPostgresOperationBackend(options) {
1151
1191
  // === Vector Index Operations ===
1152
1192
  async createVectorIndex(params) {
1153
1193
  if (vectorStrategy === void 0) return;
1154
- const slot = chunkUDS5DZNY_cjs.vectorSlotFromCreateIndexParams(params);
1194
+ const slot = chunkO7XVCLXW_cjs.vectorSlotFromCreateIndexParams(params);
1155
1195
  await contributionMaterializer.ensureVectorSlot(slot);
1156
1196
  const indexStatement = vectorStrategy.buildCreateIndex?.(slot, {
1157
1197
  concurrent: params.concurrent === true
@@ -1160,12 +1200,12 @@ function createPostgresOperationBackend(options) {
1160
1200
  try {
1161
1201
  await execRun(indexStatement);
1162
1202
  } catch (error) {
1163
- if (!chunkHP6LWBLB_cjs.isInsufficientResourcesError(error)) throw error;
1203
+ if (!chunkAO2WPYFZ_cjs.isInsufficientResourcesError(error)) throw error;
1164
1204
  const dropStatement = vectorStrategy.buildDropIndex?.(slot);
1165
1205
  if (dropStatement !== void 0) {
1166
1206
  await execRun(dropStatement);
1167
1207
  }
1168
- const table = chunkYX3H63VV_cjs.sql.identifier(
1208
+ const table = chunkX2XOQZT3_cjs.sql.identifier(
1169
1209
  vectorStrategy.tableName(
1170
1210
  slot.graphId,
1171
1211
  slot.nodeKind,
@@ -1173,13 +1213,13 @@ function createPostgresOperationBackend(options) {
1173
1213
  )
1174
1214
  );
1175
1215
  await execRun(
1176
- chunkYX3H63VV_cjs.sql`ALTER TABLE ${table} SET (parallel_workers = 0)`
1216
+ chunkX2XOQZT3_cjs.sql`ALTER TABLE ${table} SET (parallel_workers = 0)`
1177
1217
  );
1178
1218
  try {
1179
1219
  await execRun(indexStatement);
1180
1220
  } finally {
1181
1221
  await execRun(
1182
- chunkYX3H63VV_cjs.sql`ALTER TABLE ${table} RESET (parallel_workers)`
1222
+ chunkX2XOQZT3_cjs.sql`ALTER TABLE ${table} RESET (parallel_workers)`
1183
1223
  );
1184
1224
  }
1185
1225
  }
@@ -1187,7 +1227,7 @@ function createPostgresOperationBackend(options) {
1187
1227
  },
1188
1228
  // === Fulltext Operations ===
1189
1229
  async upsertFulltext(params) {
1190
- const timestamp = chunk7UTUKH4E_cjs.nowIso();
1230
+ const timestamp = chunkAQR6BHB3_cjs.nowIso();
1191
1231
  const statements = operationStrategy.buildUpsertFulltext(
1192
1232
  params,
1193
1233
  timestamp
@@ -1204,10 +1244,10 @@ function createPostgresOperationBackend(options) {
1204
1244
  },
1205
1245
  async upsertFulltextBatch(params) {
1206
1246
  if (params.rows.length === 0) return;
1207
- const timestamp = chunk7UTUKH4E_cjs.nowIso();
1247
+ const timestamp = chunkAQR6BHB3_cjs.nowIso();
1208
1248
  for (const rows of chunkZDH3DX3C_cjs.chunk(
1209
1249
  params.rows,
1210
- POSTGRES_FULLTEXT_UPSERT_BATCH_SIZE
1250
+ batchConfig.fulltextUpsertBatchSize
1211
1251
  )) {
1212
1252
  const statements = operationStrategy.buildUpsertFulltextBatch(
1213
1253
  { ...params, rows },
@@ -1222,7 +1262,7 @@ function createPostgresOperationBackend(options) {
1222
1262
  if (params.nodeIds.length === 0) return;
1223
1263
  for (const nodeIds of chunkZDH3DX3C_cjs.chunk(
1224
1264
  params.nodeIds,
1225
- POSTGRES_FULLTEXT_DELETE_CHUNK_SIZE
1265
+ batchConfig.fulltextDeleteChunkSize
1226
1266
  )) {
1227
1267
  const statements = operationStrategy.buildDeleteFulltextBatch({
1228
1268
  ...params,
@@ -1238,25 +1278,25 @@ function createPostgresOperationBackend(options) {
1238
1278
  const rows = await execAll(query);
1239
1279
  return rows.map((row, index) => ({
1240
1280
  nodeId: row.node_id,
1241
- score: chunk7UTUKH4E_cjs.coerceNumericScore(row.score),
1281
+ score: chunkAQR6BHB3_cjs.coerceNumericScore(row.score),
1242
1282
  rank: index + 1,
1243
1283
  ...row.snippet === null ? {} : { snippet: row.snippet }
1244
1284
  }));
1245
1285
  },
1246
1286
  async dropVectorIndex(params) {
1247
1287
  if (vectorStrategy === void 0) return;
1248
- const slot = chunkUDS5DZNY_cjs.vectorSlotFromDropIndexParams(params);
1288
+ const slot = chunkO7XVCLXW_cjs.vectorSlotFromDropIndexParams(params);
1249
1289
  const dropStatement = vectorStrategy.buildDropIndex?.(slot);
1250
1290
  if (dropStatement === void 0) return;
1251
1291
  try {
1252
1292
  await execRun(dropStatement);
1253
1293
  } catch (error) {
1254
- if (!chunkHP6LWBLB_cjs.isMissingTableError(error)) throw error;
1294
+ if (!chunkAO2WPYFZ_cjs.isMissingTableError(error)) throw error;
1255
1295
  }
1256
1296
  },
1257
1297
  // === Query Execution ===
1258
1298
  async execute(query) {
1259
- const annTypes = chunkYX3H63VV_cjs.isSqlFragment(query) ? chunkYX3H63VV_cjs.annIndexScanTypes(query) : void 0;
1299
+ const annTypes = chunkX2XOQZT3_cjs.isSqlFragment(query) ? chunkX2XOQZT3_cjs.annIndexScanTypes(query) : void 0;
1260
1300
  if (annTypes !== void 0 && vectorStrategy !== void 0) {
1261
1301
  const overrides = [];
1262
1302
  for (const indexType of annTypes) {
@@ -1295,5 +1335,5 @@ function createTransactionBackend(options) {
1295
1335
  }
1296
1336
 
1297
1337
  exports.createPostgresBackend = createPostgresBackend;
1298
- //# sourceMappingURL=chunk-QXKVUJLI.cjs.map
1299
- //# sourceMappingURL=chunk-QXKVUJLI.cjs.map
1338
+ //# sourceMappingURL=chunk-5ZPRE4CV.cjs.map
1339
+ //# sourceMappingURL=chunk-5ZPRE4CV.cjs.map