@nicia-ai/typegraph 0.46.2 → 0.48.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 (310) hide show
  1. package/README.md +20 -1
  2. package/dist/backend/drizzle/indexes.cjs +9 -9
  3. package/dist/backend/drizzle/indexes.d.cts +1 -1
  4. package/dist/backend/drizzle/indexes.d.ts +1 -1
  5. package/dist/backend/drizzle/indexes.js +5 -5
  6. package/dist/backend/index.cjs +58 -49
  7. package/dist/backend/index.d.cts +37 -55
  8. package/dist/backend/index.d.ts +37 -55
  9. package/dist/backend/index.js +11 -10
  10. package/dist/backend/postgres/index.cjs +27 -26
  11. package/dist/backend/postgres/index.d.cts +21 -7
  12. package/dist/backend/postgres/index.d.ts +21 -7
  13. package/dist/backend/postgres/index.js +14 -13
  14. package/dist/backend/postgres/pglite-store.cjs +34 -33
  15. package/dist/backend/postgres/pglite-store.cjs.map +1 -1
  16. package/dist/backend/postgres/pglite-store.d.cts +8 -8
  17. package/dist/backend/postgres/pglite-store.d.ts +8 -8
  18. package/dist/backend/postgres/pglite-store.js +30 -29
  19. package/dist/backend/postgres/pglite-store.js.map +1 -1
  20. package/dist/backend/postgres/pglite.cjs +16 -15
  21. package/dist/backend/postgres/pglite.d.cts +3 -3
  22. package/dist/backend/postgres/pglite.d.ts +3 -3
  23. package/dist/backend/postgres/pglite.js +15 -14
  24. package/dist/backend/sqlite/index.cjs +24 -23
  25. package/dist/backend/sqlite/index.d.cts +20 -7
  26. package/dist/backend/sqlite/index.d.ts +20 -7
  27. package/dist/backend/sqlite/index.js +12 -11
  28. package/dist/backend/sqlite/libsql.cjs +19 -18
  29. package/dist/backend/sqlite/libsql.cjs.map +1 -1
  30. package/dist/backend/sqlite/libsql.d.cts +3 -3
  31. package/dist/backend/sqlite/libsql.d.ts +3 -3
  32. package/dist/backend/sqlite/libsql.js +14 -13
  33. package/dist/backend/sqlite/libsql.js.map +1 -1
  34. package/dist/backend/sqlite/local-store.cjs +35 -34
  35. package/dist/backend/sqlite/local-store.cjs.map +1 -1
  36. package/dist/backend/sqlite/local-store.d.cts +8 -8
  37. package/dist/backend/sqlite/local-store.d.ts +8 -8
  38. package/dist/backend/sqlite/local-store.js +31 -30
  39. package/dist/backend/sqlite/local-store.js.map +1 -1
  40. package/dist/backend/sqlite/local.cjs +17 -16
  41. package/dist/backend/sqlite/local.d.cts +3 -3
  42. package/dist/backend/sqlite/local.d.ts +3 -3
  43. package/dist/backend/sqlite/local.js +15 -14
  44. package/dist/{chunk-TCT66A7N.cjs → chunk-26YKDNUD.cjs} +10 -10
  45. package/dist/{chunk-TCT66A7N.cjs.map → chunk-26YKDNUD.cjs.map} +1 -1
  46. package/dist/{chunk-E4OSGBCM.cjs → chunk-2HIYYMWY.cjs} +139 -136
  47. package/dist/chunk-2HIYYMWY.cjs.map +1 -0
  48. package/dist/chunk-2QGYQBS2.cjs +161 -0
  49. package/dist/chunk-2QGYQBS2.cjs.map +1 -0
  50. package/dist/{chunk-GWXXHOLU.js → chunk-2SYZXD54.js} +21 -18
  51. package/dist/chunk-2SYZXD54.js.map +1 -0
  52. package/dist/{chunk-KA4L2NZ3.js → chunk-2TYSSBU5.js} +14 -14
  53. package/dist/{chunk-KA4L2NZ3.js.map → chunk-2TYSSBU5.js.map} +1 -1
  54. package/dist/{chunk-QOJ2L2AD.js → chunk-3DMMGT6S.js} +3 -3
  55. package/dist/{chunk-QOJ2L2AD.js.map → chunk-3DMMGT6S.js.map} +1 -1
  56. package/dist/{chunk-F36KZDFX.cjs → chunk-3FPR224C.cjs} +91 -91
  57. package/dist/{chunk-F36KZDFX.cjs.map → chunk-3FPR224C.cjs.map} +1 -1
  58. package/dist/{chunk-32UETY6S.cjs → chunk-3KOY4FH3.cjs} +207 -28
  59. package/dist/chunk-3KOY4FH3.cjs.map +1 -0
  60. package/dist/{chunk-QU7QLJA4.cjs → chunk-3U5ABFDW.cjs} +26 -26
  61. package/dist/{chunk-QU7QLJA4.cjs.map → chunk-3U5ABFDW.cjs.map} +1 -1
  62. package/dist/{chunk-RFDEYLIK.js → chunk-4WMMBDS5.js} +7 -7
  63. package/dist/chunk-4WMMBDS5.js.map +1 -0
  64. package/dist/{chunk-R7EWHKID.js → chunk-5K2BKEBD.js} +19 -145
  65. package/dist/chunk-5K2BKEBD.js.map +1 -0
  66. package/dist/chunk-5PRKMB24.cjs +124 -0
  67. package/dist/chunk-5PRKMB24.cjs.map +1 -0
  68. package/dist/chunk-6LN7FIVU.js +107 -0
  69. package/dist/chunk-6LN7FIVU.js.map +1 -0
  70. package/dist/{chunk-D6GCNNMK.cjs → chunk-6NGW27EO.cjs} +10 -10
  71. package/dist/{chunk-D6GCNNMK.cjs.map → chunk-6NGW27EO.cjs.map} +1 -1
  72. package/dist/{chunk-WHS2Y43J.js → chunk-6SWPJEYN.js} +5 -5
  73. package/dist/{chunk-WHS2Y43J.js.map → chunk-6SWPJEYN.js.map} +1 -1
  74. package/dist/{chunk-7TKNK32B.js → chunk-7SQSZN2J.js} +5 -5
  75. package/dist/{chunk-7TKNK32B.js.map → chunk-7SQSZN2J.js.map} +1 -1
  76. package/dist/{chunk-UTVQPZPN.cjs → chunk-7XUYFFR4.cjs} +20 -20
  77. package/dist/chunk-7XUYFFR4.cjs.map +1 -0
  78. package/dist/{chunk-KXSMF6PL.js → chunk-ACGSAMD3.js} +39 -34
  79. package/dist/chunk-ACGSAMD3.js.map +1 -0
  80. package/dist/{chunk-PYKF7UIL.cjs → chunk-AOSSQDVO.cjs} +13 -13
  81. package/dist/{chunk-PYKF7UIL.cjs.map → chunk-AOSSQDVO.cjs.map} +1 -1
  82. package/dist/{chunk-AT3MLMJV.js → chunk-AX6JGVTZ.js} +91 -20
  83. package/dist/chunk-AX6JGVTZ.js.map +1 -0
  84. package/dist/{chunk-WA64ZSCA.cjs → chunk-BFUOME67.cjs} +11 -11
  85. package/dist/{chunk-WA64ZSCA.cjs.map → chunk-BFUOME67.cjs.map} +1 -1
  86. package/dist/{chunk-YQ4JONWE.js → chunk-BRRP76WO.js} +401 -131
  87. package/dist/chunk-BRRP76WO.js.map +1 -0
  88. package/dist/{chunk-FCIZNUW5.js → chunk-CHAOFCHV.js} +3 -3
  89. package/dist/{chunk-FCIZNUW5.js.map → chunk-CHAOFCHV.js.map} +1 -1
  90. package/dist/chunk-CICO5GXD.cjs +12 -0
  91. package/dist/{chunk-73MWKDFK.cjs.map → chunk-CICO5GXD.cjs.map} +1 -1
  92. package/dist/{chunk-S3G5VLSW.js → chunk-CT3ZKTOF.js} +7 -6
  93. package/dist/chunk-CT3ZKTOF.js.map +1 -0
  94. package/dist/{chunk-SXWLLQ3D.js → chunk-D5R42W5D.js} +4 -4
  95. package/dist/{chunk-SXWLLQ3D.js.map → chunk-D5R42W5D.js.map} +1 -1
  96. package/dist/{chunk-BZZI7B43.cjs → chunk-DO7SAMEK.cjs} +47 -47
  97. package/dist/{chunk-BZZI7B43.cjs.map → chunk-DO7SAMEK.cjs.map} +1 -1
  98. package/dist/chunk-DZAICA5J.js +147 -0
  99. package/dist/chunk-DZAICA5J.js.map +1 -0
  100. package/dist/{chunk-2ZWM2RFH.cjs → chunk-EDN4Y4ZG.cjs} +9 -9
  101. package/dist/{chunk-2ZWM2RFH.cjs.map → chunk-EDN4Y4ZG.cjs.map} +1 -1
  102. package/dist/{chunk-A4R3H7RU.cjs → chunk-EZEEWCFJ.cjs} +264 -361
  103. package/dist/chunk-EZEEWCFJ.cjs.map +1 -0
  104. package/dist/{chunk-BEB4OFZF.cjs → chunk-FA2AFWLP.cjs} +51 -59
  105. package/dist/chunk-FA2AFWLP.cjs.map +1 -0
  106. package/dist/{chunk-ZBVZ7HXD.cjs → chunk-FQPEMEWX.cjs} +12 -12
  107. package/dist/{chunk-ZBVZ7HXD.cjs.map → chunk-FQPEMEWX.cjs.map} +1 -1
  108. package/dist/{chunk-LNIWCQR4.js → chunk-GLHXM7C4.js} +3 -3
  109. package/dist/{chunk-LNIWCQR4.js.map → chunk-GLHXM7C4.js.map} +1 -1
  110. package/dist/{chunk-6BD6ZBKT.cjs → chunk-GYEG3ZLZ.cjs} +10 -10
  111. package/dist/{chunk-6BD6ZBKT.cjs.map → chunk-GYEG3ZLZ.cjs.map} +1 -1
  112. package/dist/{chunk-A7NMUYEL.cjs → chunk-HDL2ARHX.cjs} +27 -27
  113. package/dist/{chunk-A7NMUYEL.cjs.map → chunk-HDL2ARHX.cjs.map} +1 -1
  114. package/dist/{chunk-5ZJOB5YS.js → chunk-HEV35TGT.js} +4 -4
  115. package/dist/{chunk-5ZJOB5YS.js.map → chunk-HEV35TGT.js.map} +1 -1
  116. package/dist/{chunk-LHYSY6SE.js → chunk-I4GAZH5Z.js} +186 -9
  117. package/dist/chunk-I4GAZH5Z.js.map +1 -0
  118. package/dist/{chunk-BQM5P2NO.cjs → chunk-JB6T4GLL.cjs} +260 -223
  119. package/dist/chunk-JB6T4GLL.cjs.map +1 -0
  120. package/dist/{chunk-QPOQX2DI.cjs → chunk-JFRT7S3B.cjs} +1026 -369
  121. package/dist/chunk-JFRT7S3B.cjs.map +1 -0
  122. package/dist/{chunk-JCNTKRAK.js → chunk-JONXFAPO.js} +5 -5
  123. package/dist/{chunk-JCNTKRAK.js.map → chunk-JONXFAPO.js.map} +1 -1
  124. package/dist/{chunk-WEJHA7AD.js → chunk-KF6K7TGH.js} +109 -75
  125. package/dist/chunk-KF6K7TGH.js.map +1 -0
  126. package/dist/{chunk-EDJDDY6H.js → chunk-KKBDXCLQ.js} +4 -4
  127. package/dist/{chunk-EDJDDY6H.js.map → chunk-KKBDXCLQ.js.map} +1 -1
  128. package/dist/{chunk-ZHOAZD7Q.cjs → chunk-L3LQNR34.cjs} +161 -161
  129. package/dist/{chunk-ZHOAZD7Q.cjs.map → chunk-L3LQNR34.cjs.map} +1 -1
  130. package/dist/{chunk-AF3TWL5C.cjs → chunk-LRQKXRXO.cjs} +4 -4
  131. package/dist/{chunk-AF3TWL5C.cjs.map → chunk-LRQKXRXO.cjs.map} +1 -1
  132. package/dist/chunk-MKJ4KXL5.cjs +12 -0
  133. package/dist/{chunk-6LAXM4J2.cjs.map → chunk-MKJ4KXL5.cjs.map} +1 -1
  134. package/dist/{chunk-KCH7WQA5.cjs → chunk-MRDBBHIZ.cjs} +48 -2
  135. package/dist/chunk-MRDBBHIZ.cjs.map +1 -0
  136. package/dist/{chunk-FXNHZFZV.js → chunk-MYKHJI2J.js} +3 -3
  137. package/dist/{chunk-FXNHZFZV.js.map → chunk-MYKHJI2J.js.map} +1 -1
  138. package/dist/{chunk-Z43KWLZF.js → chunk-NACVVDWB.js} +213 -12
  139. package/dist/chunk-NACVVDWB.js.map +1 -0
  140. package/dist/{chunk-72WUT4GG.js → chunk-NVY5CJFP.js} +4 -4
  141. package/dist/{chunk-72WUT4GG.js.map → chunk-NVY5CJFP.js.map} +1 -1
  142. package/dist/{chunk-WYFB7BN3.js → chunk-OD4SSY2U.js} +166 -48
  143. package/dist/chunk-OD4SSY2U.js.map +1 -0
  144. package/dist/{chunk-ZIH42CRX.cjs → chunk-OI2GQ25X.cjs} +7 -7
  145. package/dist/{chunk-ZIH42CRX.cjs.map → chunk-OI2GQ25X.cjs.map} +1 -1
  146. package/dist/{chunk-AU3IJNNP.js → chunk-OMZ37BM2.js} +5 -5
  147. package/dist/{chunk-AU3IJNNP.js.map → chunk-OMZ37BM2.js.map} +1 -1
  148. package/dist/{chunk-C4DYN2SD.cjs → chunk-OORXGFL5.cjs} +48 -48
  149. package/dist/{chunk-C4DYN2SD.cjs.map → chunk-OORXGFL5.cjs.map} +1 -1
  150. package/dist/{chunk-HNYLMPQQ.cjs → chunk-OTUPEF2W.cjs} +149 -78
  151. package/dist/chunk-OTUPEF2W.cjs.map +1 -0
  152. package/dist/{chunk-BRN3RGD2.js → chunk-OVI7IXYX.js} +3 -3
  153. package/dist/{chunk-BRN3RGD2.js.map → chunk-OVI7IXYX.js.map} +1 -1
  154. package/dist/{chunk-WMKEGJG4.js → chunk-P6YLZTRE.js} +3 -3
  155. package/dist/{chunk-WMKEGJG4.js.map → chunk-P6YLZTRE.js.map} +1 -1
  156. package/dist/{chunk-C2ZP5YS6.cjs → chunk-PFBRJBUL.cjs} +278 -160
  157. package/dist/chunk-PFBRJBUL.cjs.map +1 -0
  158. package/dist/{chunk-EJSYWAEV.js → chunk-QTD6HX4O.js} +5 -5
  159. package/dist/{chunk-EJSYWAEV.js.map → chunk-QTD6HX4O.js.map} +1 -1
  160. package/dist/{chunk-JL5UEBWT.cjs → chunk-ROR5ZR6A.cjs} +45 -45
  161. package/dist/{chunk-JL5UEBWT.cjs.map → chunk-ROR5ZR6A.cjs.map} +1 -1
  162. package/dist/{chunk-EDHV4CBU.js → chunk-S5TERQVW.js} +37 -134
  163. package/dist/chunk-S5TERQVW.js.map +1 -0
  164. package/dist/{chunk-FSLTU57P.js → chunk-SDBBMD4N.js} +3 -3
  165. package/dist/{chunk-FSLTU57P.js.map → chunk-SDBBMD4N.js.map} +1 -1
  166. package/dist/{chunk-36LIJXWC.js → chunk-SHFBB23Q.js} +4 -4
  167. package/dist/{chunk-36LIJXWC.js.map → chunk-SHFBB23Q.js.map} +1 -1
  168. package/dist/chunk-SIT26LAZ.cjs +614 -0
  169. package/dist/chunk-SIT26LAZ.cjs.map +1 -0
  170. package/dist/{chunk-C6KE2HSQ.cjs → chunk-SR725PWF.cjs} +1662 -1392
  171. package/dist/chunk-SR725PWF.cjs.map +1 -0
  172. package/dist/{chunk-S7WIRFNS.cjs → chunk-TKZXMWQF.cjs} +13 -12
  173. package/dist/chunk-TKZXMWQF.cjs.map +1 -0
  174. package/dist/{chunk-5PDSCELM.cjs → chunk-TQHGE7UC.cjs} +29 -164
  175. package/dist/chunk-TQHGE7UC.cjs.map +1 -0
  176. package/dist/{chunk-XBHRKLZU.cjs → chunk-TUNPBZY3.cjs} +4 -4
  177. package/dist/{chunk-XBHRKLZU.cjs.map → chunk-TUNPBZY3.cjs.map} +1 -1
  178. package/dist/{chunk-KOAI3KIV.cjs → chunk-TZEGUG6D.cjs} +4 -4
  179. package/dist/{chunk-KOAI3KIV.cjs.map → chunk-TZEGUG6D.cjs.map} +1 -1
  180. package/dist/chunk-UGHG7PGX.js +592 -0
  181. package/dist/chunk-UGHG7PGX.js.map +1 -0
  182. package/dist/{chunk-N3QTGPC7.cjs → chunk-UMGZDVOA.cjs} +303 -101
  183. package/dist/chunk-UMGZDVOA.cjs.map +1 -0
  184. package/dist/{chunk-RHDOAQCT.cjs → chunk-WCCATHMB.cjs} +140 -135
  185. package/dist/chunk-WCCATHMB.cjs.map +1 -0
  186. package/dist/{chunk-DYPRZ53S.cjs → chunk-WODMN3Q2.cjs} +27 -27
  187. package/dist/{chunk-DYPRZ53S.cjs.map → chunk-WODMN3Q2.cjs.map} +1 -1
  188. package/dist/{chunk-OZJCH7ZS.js → chunk-XVWOYKIK.js} +3 -3
  189. package/dist/{chunk-OZJCH7ZS.js.map → chunk-XVWOYKIK.js.map} +1 -1
  190. package/dist/{chunk-IHRDX7K6.js → chunk-YIURNGXI.js} +46 -56
  191. package/dist/chunk-YIURNGXI.js.map +1 -0
  192. package/dist/{chunk-GWUWRZXW.js → chunk-YVF2EM7B.js} +3 -3
  193. package/dist/{chunk-GWUWRZXW.js.map → chunk-YVF2EM7B.js.map} +1 -1
  194. package/dist/{chunk-EAMVXR5B.js → chunk-ZDKTPBGV.js} +4 -4
  195. package/dist/{chunk-EAMVXR5B.js.map → chunk-ZDKTPBGV.js.map} +1 -1
  196. package/dist/{chunk-A2LJG5GM.js → chunk-ZFMCDJGB.js} +803 -148
  197. package/dist/chunk-ZFMCDJGB.js.map +1 -0
  198. package/dist/{chunk-62ZXBMSD.js → chunk-ZLONH2UD.js} +46 -3
  199. package/dist/chunk-ZLONH2UD.js.map +1 -0
  200. package/dist/core/index.cjs +28 -27
  201. package/dist/core/index.d.cts +4 -4
  202. package/dist/core/index.d.ts +4 -4
  203. package/dist/core/index.js +8 -7
  204. package/dist/ddl-BL1NZLMY.d.cts +78 -0
  205. package/dist/ddl-D_oW-EVO.d.ts +78 -0
  206. package/dist/graph-extension/index.cjs +20 -20
  207. package/dist/graph-extension/index.d.cts +4 -4
  208. package/dist/graph-extension/index.d.ts +4 -4
  209. package/dist/graph-extension/index.js +4 -4
  210. package/dist/graph-merge/index.cjs +3418 -706
  211. package/dist/graph-merge/index.cjs.map +1 -1
  212. package/dist/graph-merge/index.d.cts +550 -58
  213. package/dist/graph-merge/index.d.ts +550 -58
  214. package/dist/graph-merge/index.js +3191 -497
  215. package/dist/graph-merge/index.js.map +1 -1
  216. package/dist/{index-Deyu8IXL.d.ts → index-COs_z6nV.d.cts} +47 -3
  217. package/dist/{index-DrRS51Ld.d.cts → index-D7d1u2gr.d.ts} +47 -3
  218. package/dist/index.cjs +233 -216
  219. package/dist/index.cjs.map +1 -1
  220. package/dist/index.d.cts +12 -12
  221. package/dist/index.d.ts +12 -12
  222. package/dist/index.js +35 -34
  223. package/dist/index.js.map +1 -1
  224. package/dist/indexes/index.cjs +13 -13
  225. package/dist/indexes/index.d.cts +4 -4
  226. package/dist/indexes/index.d.ts +4 -4
  227. package/dist/indexes/index.js +6 -6
  228. package/dist/interchange/index.cjs +53 -52
  229. package/dist/interchange/index.cjs.map +1 -1
  230. package/dist/interchange/index.d.cts +17 -13
  231. package/dist/interchange/index.d.ts +17 -13
  232. package/dist/interchange/index.js +17 -16
  233. package/dist/interchange/index.js.map +1 -1
  234. package/dist/{manager-ptr3JLRP.d.cts → manager-CYaff3n3.d.cts} +2 -2
  235. package/dist/{manager-DX983gJ0.d.ts → manager-D9eRT_ns.d.ts} +2 -2
  236. package/dist/{materialize-indexes-CpXoggWU.d.ts → materialize-indexes-DJ3ykH59.d.ts} +1 -1
  237. package/dist/{materialize-indexes-BXz77YqO.d.cts → materialize-indexes-DTtAnvfY.d.cts} +1 -1
  238. package/dist/{postgres-DwgEXSPI.d.cts → postgres-CcL4bAHS.d.ts} +1 -1
  239. package/dist/{postgres-QdOMHTBz.d.ts → postgres-DMj39MEu.d.cts} +1 -1
  240. package/dist/profiler/index.d.cts +9 -9
  241. package/dist/profiler/index.d.ts +9 -9
  242. package/dist/provenance/index.cjs +46 -46
  243. package/dist/provenance/index.cjs.map +1 -1
  244. package/dist/provenance/index.d.cts +7 -7
  245. package/dist/provenance/index.d.ts +7 -7
  246. package/dist/provenance/index.js +13 -13
  247. package/dist/provenance/index.js.map +1 -1
  248. package/dist/repair-validity-windows-BFNZvd_H.d.cts +166 -0
  249. package/dist/repair-validity-windows-DlUSqwCg.d.ts +166 -0
  250. package/dist/schema/index.cjs +45 -44
  251. package/dist/schema/index.d.cts +6 -6
  252. package/dist/schema/index.d.ts +6 -6
  253. package/dist/schema/index.js +18 -17
  254. package/dist/{searchable-BOUuA83f.d.ts → searchable-DHJMh_nj.d.cts} +1 -1
  255. package/dist/{searchable-BrUh0pdc.d.cts → searchable-bpE1bBfc.d.ts} +1 -1
  256. package/dist/{sqlite-BfYcV61E.d.cts → sqlite-D7Oz0SQh.d.ts} +1 -1
  257. package/dist/{sqlite-DK40XVR1.d.ts → sqlite-YppHrNFb.d.cts} +1 -1
  258. package/dist/{store-FTqBpuJD.d.cts → store-JUVvtmR4.d.cts} +228 -92
  259. package/dist/{store-Bo1psfVZ.d.ts → store-UzrGvZOo.d.ts} +228 -92
  260. package/dist/{temporal-DPtn0HOu.d.ts → temporal-5GqpYCk2.d.cts} +1 -1
  261. package/dist/{temporal-CXewwLTB.d.cts → temporal-CbnLzTmM.d.ts} +1 -1
  262. package/dist/{types-Du78EvpN.d.ts → types-BqFZTQmV.d.cts} +60 -9
  263. package/dist/{types-Du78EvpN.d.cts → types-BqFZTQmV.d.ts} +60 -9
  264. package/dist/{types-CeT7xM4M.d.ts → types-Bx74kaTt.d.ts} +1 -1
  265. package/dist/{types-XR1nHERK.d.cts → types-CXAhpW-c.d.cts} +1 -1
  266. package/dist/{where-CJsp-YUf.d.cts → where-DI_Fqz-X.d.cts} +1 -1
  267. package/dist/{where-CMbFiWwp.d.ts → where-O-k2wgYm.d.ts} +1 -1
  268. package/package.json +1 -1
  269. package/dist/chunk-32UETY6S.cjs.map +0 -1
  270. package/dist/chunk-5PDSCELM.cjs.map +0 -1
  271. package/dist/chunk-62ZXBMSD.js.map +0 -1
  272. package/dist/chunk-6LAXM4J2.cjs +0 -12
  273. package/dist/chunk-73MWKDFK.cjs +0 -12
  274. package/dist/chunk-A2LJG5GM.js.map +0 -1
  275. package/dist/chunk-A4R3H7RU.cjs.map +0 -1
  276. package/dist/chunk-ANKOXPCC.cjs +0 -267
  277. package/dist/chunk-ANKOXPCC.cjs.map +0 -1
  278. package/dist/chunk-AT3MLMJV.js.map +0 -1
  279. package/dist/chunk-BEB4OFZF.cjs.map +0 -1
  280. package/dist/chunk-BQM5P2NO.cjs.map +0 -1
  281. package/dist/chunk-C2ZP5YS6.cjs.map +0 -1
  282. package/dist/chunk-C6KE2HSQ.cjs.map +0 -1
  283. package/dist/chunk-DSAWGCMP.js +0 -254
  284. package/dist/chunk-DSAWGCMP.js.map +0 -1
  285. package/dist/chunk-E4OSGBCM.cjs.map +0 -1
  286. package/dist/chunk-EDHV4CBU.js.map +0 -1
  287. package/dist/chunk-FA6Z7B5L.js +0 -244
  288. package/dist/chunk-FA6Z7B5L.js.map +0 -1
  289. package/dist/chunk-GVAMRRZR.cjs +0 -268
  290. package/dist/chunk-GVAMRRZR.cjs.map +0 -1
  291. package/dist/chunk-GWXXHOLU.js.map +0 -1
  292. package/dist/chunk-HNYLMPQQ.cjs.map +0 -1
  293. package/dist/chunk-IHRDX7K6.js.map +0 -1
  294. package/dist/chunk-KCH7WQA5.cjs.map +0 -1
  295. package/dist/chunk-KXSMF6PL.js.map +0 -1
  296. package/dist/chunk-LHYSY6SE.js.map +0 -1
  297. package/dist/chunk-N3QTGPC7.cjs.map +0 -1
  298. package/dist/chunk-QPOQX2DI.cjs.map +0 -1
  299. package/dist/chunk-R7EWHKID.js.map +0 -1
  300. package/dist/chunk-RFDEYLIK.js.map +0 -1
  301. package/dist/chunk-RHDOAQCT.cjs.map +0 -1
  302. package/dist/chunk-S3G5VLSW.js.map +0 -1
  303. package/dist/chunk-S7WIRFNS.cjs.map +0 -1
  304. package/dist/chunk-UTVQPZPN.cjs.map +0 -1
  305. package/dist/chunk-WEJHA7AD.js.map +0 -1
  306. package/dist/chunk-WYFB7BN3.js.map +0 -1
  307. package/dist/chunk-YQ4JONWE.js.map +0 -1
  308. package/dist/chunk-Z43KWLZF.js.map +0 -1
  309. package/dist/ddl-mE07h_EM.d.cts +0 -38
  310. package/dist/ddl-opIn8DfX.d.ts +0 -38
@@ -1,15 +1,15 @@
1
1
  'use strict';
2
2
 
3
- var chunkBEB4OFZF_cjs = require('./chunk-BEB4OFZF.cjs');
4
- var chunkA7NMUYEL_cjs = require('./chunk-A7NMUYEL.cjs');
5
- var chunkDYPRZ53S_cjs = require('./chunk-DYPRZ53S.cjs');
3
+ var chunkFA2AFWLP_cjs = require('./chunk-FA2AFWLP.cjs');
4
+ var chunkHDL2ARHX_cjs = require('./chunk-HDL2ARHX.cjs');
5
+ var chunkWODMN3Q2_cjs = require('./chunk-WODMN3Q2.cjs');
6
6
  var chunkPWLJ77UV_cjs = require('./chunk-PWLJ77UV.cjs');
7
- var chunkGVAMRRZR_cjs = require('./chunk-GVAMRRZR.cjs');
8
- var chunkANKOXPCC_cjs = require('./chunk-ANKOXPCC.cjs');
7
+ var chunkSIT26LAZ_cjs = require('./chunk-SIT26LAZ.cjs');
8
+ var chunkTQHGE7UC_cjs = require('./chunk-TQHGE7UC.cjs');
9
9
  var chunkZY4GXIVN_cjs = require('./chunk-ZY4GXIVN.cjs');
10
- var chunkZHOAZD7Q_cjs = require('./chunk-ZHOAZD7Q.cjs');
11
- var chunk2ZWM2RFH_cjs = require('./chunk-2ZWM2RFH.cjs');
12
- var chunkKCH7WQA5_cjs = require('./chunk-KCH7WQA5.cjs');
10
+ var chunkL3LQNR34_cjs = require('./chunk-L3LQNR34.cjs');
11
+ var chunkEDN4Y4ZG_cjs = require('./chunk-EDN4Y4ZG.cjs');
12
+ var chunkMRDBBHIZ_cjs = require('./chunk-MRDBBHIZ.cjs');
13
13
  var chunkN66HCGCY_cjs = require('./chunk-N66HCGCY.cjs');
14
14
  var drizzleOrm = require('drizzle-orm');
15
15
 
@@ -20,7 +20,7 @@ function assertLimitPerEndpoint(operation, graphId, limitPerEndpoint, kind) {
20
20
  if (limitPerEndpoint === void 0 || Number.isInteger(limitPerEndpoint) && limitPerEndpoint > 0) {
21
21
  return;
22
22
  }
23
- throw new chunkKCH7WQA5_cjs.ConfigurationError(
23
+ throw new chunkMRDBBHIZ_cjs.ConfigurationError(
24
24
  `${operation} \`limitPerEndpoint\` must be a positive integer, received ${String(limitPerEndpoint)}.`,
25
25
  {
26
26
  code: "EDGE_ENDPOINT_SET_INVALID",
@@ -64,7 +64,7 @@ function resolveHeterogeneousEdgeRead(params, maxBindParameters) {
64
64
  if (endpointChunkSize >= 1) {
65
65
  return { edgeKinds, endpoints, endpointChunkSize };
66
66
  }
67
- throw new chunkKCH7WQA5_cjs.ConfigurationError(
67
+ throw new chunkMRDBBHIZ_cjs.ConfigurationError(
68
68
  "findEdgesByHeterogeneousEndpointSet cannot fit one endpoint and the selected edge kinds within the backend bind-parameter budget.",
69
69
  {
70
70
  code: "EDGE_HETEROGENEOUS_READ_BIND_BUDGET_EXCEEDED",
@@ -80,8 +80,8 @@ function resolveHeterogeneousEdgeRead(params, maxBindParameters) {
80
80
 
81
81
  // src/backend/live-node-candidates.ts
82
82
  function buildLiveNodeCandidates(nodesTableName, graphId, nodeKind, now) {
83
- const nodes = chunk2ZWM2RFH_cjs.sql.identifier(nodesTableName);
84
- return chunk2ZWM2RFH_cjs.sql`
83
+ const nodes = chunkEDN4Y4ZG_cjs.sql.identifier(nodesTableName);
84
+ return chunkEDN4Y4ZG_cjs.sql`
85
85
  SELECT "id" AS node_id
86
86
  FROM ${nodes}
87
87
  WHERE "graph_id" = ${graphId}
@@ -122,10 +122,10 @@ function vectorSlotFromDropIndexParams(params) {
122
122
  };
123
123
  }
124
124
  function mapVectorWriteError(error, params) {
125
- const mismatch = chunkGVAMRRZR_cjs.parseDimensionMismatch(error);
125
+ const mismatch = chunkSIT26LAZ_cjs.parseDimensionMismatch(error);
126
126
  if (mismatch === void 0) return error;
127
127
  const attempted = mismatch.actual ?? "a different number of";
128
- return new chunkKCH7WQA5_cjs.EmbeddingDimensionChangedError(
128
+ return new chunkMRDBBHIZ_cjs.EmbeddingDimensionChangedError(
129
129
  `Embedding "${params.nodeKind}.${params.fieldPath}" was written with ${attempted} dimensions, but its per-field storage expects ${mismatch.expected}. The field's embedding dimension changed; existing vectors must be recreated and re-embedded.`,
130
130
  {
131
131
  kind: params.nodeKind,
@@ -141,7 +141,7 @@ var SQLITE_CONTRIBUTION_MAT_TIMESTAMPS = {
141
141
  encode: (value) => value
142
142
  };
143
143
  var POSTGRES_CONTRIBUTION_MAT_TIMESTAMPS = {
144
- decode: chunkBEB4OFZF_cjs.formatPostgresTimestamp,
144
+ decode: chunkFA2AFWLP_cjs.formatPostgresTimestamp,
145
145
  encode: (value) => new Date(value)
146
146
  };
147
147
  function mapContributionMaterializationRow(row, decode) {
@@ -250,7 +250,7 @@ function identityOf(graphId, contribution) {
250
250
  }
251
251
  function missingTableErrorNames(error, tableName) {
252
252
  const quotedTableName2 = `"${tableName.replaceAll('"', '""')}"`;
253
- for (const link of chunkGVAMRRZR_cjs.errorChain(error)) {
253
+ for (const link of chunkSIT26LAZ_cjs.errorChain(error)) {
254
254
  const message = errorMessage(link);
255
255
  if (typeof message !== "string") continue;
256
256
  const sqliteMatch = /\bno such table:\s*([^\s;]+)/i.exec(message);
@@ -355,13 +355,13 @@ function gateFulltextMethods(source, assert, refuseUnavailable) {
355
355
  return gated;
356
356
  }
357
357
  function gateFulltext(tx, assert, refuseUnavailable) {
358
- return chunkANKOXPCC_cjs.createBackendOverlay(
358
+ return chunkSIT26LAZ_cjs.deriveBackend(
359
359
  tx,
360
360
  gateFulltextMethods(tx, assert, refuseUnavailable)
361
361
  );
362
362
  }
363
363
  function contributionRebuildSupported(fulltextStrategy, fulltextTableName, transactional) {
364
- return transactional && chunkA7NMUYEL_cjs.runtimeStrategyContributions(fulltextStrategy, fulltextTableName).every(
364
+ return transactional && chunkHDL2ARHX_cjs.runtimeStrategyContributions(fulltextStrategy, fulltextTableName).every(
365
365
  (contribution) => contribution.dropDdl !== void 0
366
366
  );
367
367
  }
@@ -410,7 +410,7 @@ function createContributionMaterializer(deps) {
410
410
  }
411
411
  }
412
412
  function runtimeContributions() {
413
- return chunkA7NMUYEL_cjs.runtimeStrategyContributions(fulltextStrategy, fulltextTableName);
413
+ return chunkHDL2ARHX_cjs.runtimeStrategyContributions(fulltextStrategy, fulltextTableName);
414
414
  }
415
415
  function cacheInitializedSignature(key, signature) {
416
416
  if (!uncacheableKeys.has(key)) {
@@ -437,13 +437,13 @@ function createContributionMaterializer(deps) {
437
437
  await deps.recordMarker({
438
438
  ...identity,
439
439
  signature: existing.signature,
440
- attemptedAt: chunkBEB4OFZF_cjs.nowIso(),
440
+ attemptedAt: chunkFA2AFWLP_cjs.nowIso(),
441
441
  materializedAt: void 0,
442
442
  error: error.message
443
443
  });
444
444
  throw error;
445
445
  }
446
- const attemptedAt = chunkBEB4OFZF_cjs.nowIso();
446
+ const attemptedAt = chunkFA2AFWLP_cjs.nowIso();
447
447
  try {
448
448
  for (const statement of contribution.createDdl) {
449
449
  await deps.execDdl(statement);
@@ -479,7 +479,7 @@ function createContributionMaterializer(deps) {
479
479
  rows: indexMarkerRows(graphId, await deps.getMarkers(graphId))
480
480
  };
481
481
  } catch (error) {
482
- if (!chunkGVAMRRZR_cjs.isMissingTableError(error)) throw error;
482
+ if (!chunkSIT26LAZ_cjs.isMissingTableError(error)) throw error;
483
483
  return { kind: "missing-table", error };
484
484
  }
485
485
  }
@@ -558,7 +558,7 @@ function createContributionMaterializer(deps) {
558
558
  if (read.kind === "missing-table") {
559
559
  const first = pending[0];
560
560
  if (first === void 0) return;
561
- throw new chunkKCH7WQA5_cjs.StoreNotInitializedError(graphId, "missing", {
561
+ throw new chunkMRDBBHIZ_cjs.StoreNotInitializedError(graphId, "missing", {
562
562
  cause: read.error,
563
563
  details: { logicalName: first.contribution.logicalName }
564
564
  });
@@ -567,7 +567,7 @@ function createContributionMaterializer(deps) {
567
567
  const { contribution, key, signature } = entry;
568
568
  const state = evaluateContributionState(read.rows.get(key), signature);
569
569
  if (state !== "initialized") {
570
- throw new chunkKCH7WQA5_cjs.StoreNotInitializedError(graphId, state, {
570
+ throw new chunkMRDBBHIZ_cjs.StoreNotInitializedError(graphId, state, {
571
571
  details: { logicalName: contribution.logicalName }
572
572
  });
573
573
  }
@@ -582,12 +582,12 @@ function createContributionMaterializer(deps) {
582
582
  }
583
583
  async function refuseUnavailableFulltext(graphId, error) {
584
584
  await Promise.resolve();
585
- if (!chunkGVAMRRZR_cjs.isMissingTableError(error)) throw error;
585
+ if (!chunkSIT26LAZ_cjs.isMissingTableError(error)) throw error;
586
586
  const missingContribution = runtimeContributions().find(
587
587
  (contribution) => contribution.logicalName === "fulltext" && missingTableErrorNames(error, contribution.tableName)
588
588
  );
589
589
  if (missingContribution !== void 0) {
590
- throw new chunkKCH7WQA5_cjs.ContributionUnavailableError(
590
+ throw new chunkMRDBBHIZ_cjs.ContributionUnavailableError(
591
591
  graphId,
592
592
  missingContribution.tableName,
593
593
  { cause: error }
@@ -756,23 +756,23 @@ function createContributionMaterializer(deps) {
756
756
  async function lockContributionDdl(tx) {
757
757
  if (dialect !== "postgres") return;
758
758
  await tx.execute(
759
- chunk2ZWM2RFH_cjs.asCompiledRowsSql(
760
- chunk2ZWM2RFH_cjs.sql`SELECT pg_advisory_xact_lock(hashtext(${CONTRIBUTION_DDL_LOCK_KEY}), 0)`
759
+ chunkEDN4Y4ZG_cjs.asCompiledRowsSql(
760
+ chunkEDN4Y4ZG_cjs.sql`SELECT pg_advisory_xact_lock(hashtext(${CONTRIBUTION_DDL_LOCK_KEY}), 0)`
761
761
  )
762
762
  );
763
763
  }
764
764
  async function lockSharedFulltextTable(tx, tableName) {
765
765
  if (dialect !== "postgres") return;
766
766
  await tx.executeStatement(
767
- chunk2ZWM2RFH_cjs.asCompiledStatementSql(
768
- chunk2ZWM2RFH_cjs.sql`LOCK TABLE ${chunk2ZWM2RFH_cjs.sql.identifier(tableName)} IN ACCESS EXCLUSIVE MODE`
767
+ chunkEDN4Y4ZG_cjs.asCompiledStatementSql(
768
+ chunkEDN4Y4ZG_cjs.sql`LOCK TABLE ${chunkEDN4Y4ZG_cjs.sql.identifier(tableName)} IN ACCESS EXCLUSIVE MODE`
769
769
  )
770
770
  );
771
771
  }
772
772
  async function readForeignGraphIds(tx, tableName, graphId) {
773
773
  const rows = await tx.execute(
774
- chunk2ZWM2RFH_cjs.asCompiledRowsSql(
775
- chunkZHOAZD7Q_cjs.buildForeignFulltextGraphProbe(
774
+ chunkEDN4Y4ZG_cjs.asCompiledRowsSql(
775
+ chunkL3LQNR34_cjs.buildForeignFulltextGraphProbe(
776
776
  tableName,
777
777
  graphId,
778
778
  FOREIGN_GRAPH_REPORT_LIMIT
@@ -783,7 +783,7 @@ function createContributionMaterializer(deps) {
783
783
  }
784
784
  async function rebuildContribution(graphId, scope, repopulate) {
785
785
  if (scope === "vector") {
786
- throw new chunkKCH7WQA5_cjs.ContributionRebuildUnsupportedError(
786
+ throw new chunkMRDBBHIZ_cjs.ContributionRebuildUnsupportedError(
787
787
  "vector-source-unavailable",
788
788
  { graphId, contribution: scope }
789
789
  );
@@ -793,7 +793,7 @@ function createContributionMaterializer(deps) {
793
793
  (contribution) => contribution.dropDdl === void 0
794
794
  );
795
795
  if (withoutTeardown !== void 0) {
796
- throw new chunkKCH7WQA5_cjs.ContributionRebuildUnsupportedError("no-drop-ddl", {
796
+ throw new chunkMRDBBHIZ_cjs.ContributionRebuildUnsupportedError("no-drop-ddl", {
797
797
  graphId,
798
798
  contribution: scope,
799
799
  owner: withoutTeardown.owner,
@@ -803,7 +803,7 @@ function createContributionMaterializer(deps) {
803
803
  }
804
804
  const fence = deps.schemaWriteTransaction;
805
805
  if (fence === void 0) {
806
- throw new chunkKCH7WQA5_cjs.ContributionRebuildUnsupportedError("no-schema-fence", {
806
+ throw new chunkMRDBBHIZ_cjs.ContributionRebuildUnsupportedError("no-schema-fence", {
807
807
  graphId,
808
808
  contribution: scope,
809
809
  backend: dialect
@@ -826,7 +826,7 @@ function createContributionMaterializer(deps) {
826
826
  const rebuilt = await fence(graphId, async (tx) => {
827
827
  const record = tx.recordContributionMaterialization;
828
828
  if (record === void 0) {
829
- throw new chunkKCH7WQA5_cjs.ConfigurationError(
829
+ throw new chunkMRDBBHIZ_cjs.ConfigurationError(
830
830
  "rebuildContribution requires a transaction-scoped backend that can write contribution markers; without it the drop, recreate, and stamp could not commit together.",
831
831
  {
832
832
  backend: dialect,
@@ -850,7 +850,7 @@ function createContributionMaterializer(deps) {
850
850
  ) === "stale"
851
851
  );
852
852
  if (staleStamp !== void 0) {
853
- throw new chunkKCH7WQA5_cjs.ContributionRebuildUnsupportedError(
853
+ throw new chunkMRDBBHIZ_cjs.ContributionRebuildUnsupportedError(
854
854
  "shared-storage-in-use",
855
855
  {
856
856
  graphId,
@@ -875,13 +875,13 @@ function createContributionMaterializer(deps) {
875
875
  }
876
876
  if (!recreateStorage) {
877
877
  await tx.executeStatement(
878
- chunk2ZWM2RFH_cjs.asCompiledStatementSql(
879
- chunkZHOAZD7Q_cjs.buildFulltextGraphDelete(sharedTable, graphId)
878
+ chunkEDN4Y4ZG_cjs.asCompiledStatementSql(
879
+ chunkL3LQNR34_cjs.buildFulltextGraphDelete(sharedTable, graphId)
880
880
  )
881
881
  );
882
882
  }
883
883
  const stats = await repopulate(tx);
884
- const now = chunkBEB4OFZF_cjs.nowIso();
884
+ const now = chunkFA2AFWLP_cjs.nowIso();
885
885
  for (const { contribution, signature } of stamps) {
886
886
  await record({
887
887
  ...identityOf(graphId, contribution),
@@ -943,7 +943,7 @@ var SQLITE_INDEX_MAT_TIMESTAMPS = {
943
943
  encode: (value) => value
944
944
  };
945
945
  var POSTGRES_INDEX_MAT_TIMESTAMPS = {
946
- decode: chunkBEB4OFZF_cjs.formatPostgresTimestamp,
946
+ decode: chunkFA2AFWLP_cjs.formatPostgresTimestamp,
947
947
  encode: (value) => new Date(value)
948
948
  };
949
949
  function mapMaterializationRow(row, decode) {
@@ -1001,7 +1001,7 @@ var SQLITE_KIND_REMOVAL_TIMESTAMPS = {
1001
1001
  encode: (value) => value
1002
1002
  };
1003
1003
  var POSTGRES_KIND_REMOVAL_TIMESTAMPS = {
1004
- decode: chunkBEB4OFZF_cjs.formatPostgresTimestamp,
1004
+ decode: chunkFA2AFWLP_cjs.formatPostgresTimestamp,
1005
1005
  encode: (value) => new Date(value)
1006
1006
  };
1007
1007
  function mapKindRemovalRow(row, decode) {
@@ -1069,10 +1069,6 @@ function edgePrimaryKeyConstraint(edges) {
1069
1069
  function sqlNull(value) {
1070
1070
  return value ?? drizzleOrm.sql.raw("NULL");
1071
1071
  }
1072
- function resolveValidFrom(validFrom, timestamp) {
1073
- if (validFrom === null) return void 0;
1074
- return validFrom ?? timestamp;
1075
- }
1076
1072
  function expectedValidFromPredicate(column, expected) {
1077
1073
  if (expected === void 0) return drizzleOrm.sql.empty();
1078
1074
  if (expected === null) return drizzleOrm.sql` AND ${column} IS NULL`;
@@ -1197,12 +1193,12 @@ function present(value) {
1197
1193
  function mapHybridSearchRow(row, toNodeRow) {
1198
1194
  return {
1199
1195
  node: toNodeRow(row),
1200
- fusedScore: chunkBEB4OFZF_cjs.coerceNumericScore(row["fused_score"]),
1196
+ fusedScore: chunkFA2AFWLP_cjs.coerceNumericScore(row["fused_score"]),
1201
1197
  ...present(row["vector_rank"]) ? { vectorRank: Number(row["vector_rank"]) } : {},
1202
- ...present(row["vector_score"]) ? { vectorScore: chunkBEB4OFZF_cjs.coerceNumericScore(row["vector_score"]) } : {},
1198
+ ...present(row["vector_score"]) ? { vectorScore: chunkFA2AFWLP_cjs.coerceNumericScore(row["vector_score"]) } : {},
1203
1199
  ...present(row["fulltext_rank"]) ? { fulltextRank: Number(row["fulltext_rank"]) } : {},
1204
1200
  ...present(row["fulltext_score"]) ? {
1205
- fulltextScore: chunkBEB4OFZF_cjs.coerceNumericScore(
1201
+ fulltextScore: chunkFA2AFWLP_cjs.coerceNumericScore(
1206
1202
  row["fulltext_score"]
1207
1203
  )
1208
1204
  } : {},
@@ -1214,7 +1210,7 @@ function buildClearGraph(tables, graphId) {
1214
1210
  // The fulltext table is shared by every graph in the database, so its
1215
1211
  // graph-scoped delete is owned by one builder the destructive
1216
1212
  // contribution rebuild calls too — see `buildFulltextGraphDelete`.
1217
- { query: chunkZHOAZD7Q_cjs.buildFulltextGraphDelete(tables.fulltextTableName, graphId) },
1213
+ { query: chunkL3LQNR34_cjs.buildFulltextGraphDelete(tables.fulltextTableName, graphId) },
1218
1214
  {
1219
1215
  query: drizzleOrm.sql`DELETE FROM ${tables.recordedIdentityAssertions} WHERE ${tables.recordedIdentityAssertions.graphId} = ${graphId}`,
1220
1216
  ignoreMissingTable: true,
@@ -1522,7 +1518,7 @@ function buildInsertEdge(tables, params, timestamp) {
1522
1518
  VALUES (
1523
1519
  ${params.graphId}, ${params.id}, ${params.kind},
1524
1520
  ${params.fromKind}, ${params.fromId}, ${params.toKind}, ${params.toId},
1525
- ${propsJson}, ${sqlNull(resolveValidFrom(params.validFrom, timestamp))}, ${sqlNull(params.validTo)},
1521
+ ${propsJson}, ${sqlNull(chunkTQHGE7UC_cjs.resolveStampedValidityLowerBound(params.validFrom, params.validTo, timestamp))}, ${sqlNull(params.validTo)},
1526
1522
  ${timestamp}, ${timestamp}
1527
1523
  )
1528
1524
  RETURNING *
@@ -1537,7 +1533,7 @@ function buildInsertEdgeNoReturn(tables, params, timestamp) {
1537
1533
  VALUES (
1538
1534
  ${params.graphId}, ${params.id}, ${params.kind},
1539
1535
  ${params.fromKind}, ${params.fromId}, ${params.toKind}, ${params.toId},
1540
- ${propsJson}, ${sqlNull(resolveValidFrom(params.validFrom, timestamp))}, ${sqlNull(params.validTo)},
1536
+ ${propsJson}, ${sqlNull(chunkTQHGE7UC_cjs.resolveStampedValidityLowerBound(params.validFrom, params.validTo, timestamp))}, ${sqlNull(params.validTo)},
1541
1537
  ${timestamp}, ${timestamp}
1542
1538
  )
1543
1539
  `;
@@ -1547,7 +1543,7 @@ function buildInsertEdgesBatch(tables, params, timestamp) {
1547
1543
  const columns = edgeColumnList(edges);
1548
1544
  const values = params.map((edgeParams) => {
1549
1545
  const propsJson = JSON.stringify(edgeParams.props);
1550
- return drizzleOrm.sql`(${edgeParams.graphId}, ${edgeParams.id}, ${edgeParams.kind}, ${edgeParams.fromKind}, ${edgeParams.fromId}, ${edgeParams.toKind}, ${edgeParams.toId}, ${propsJson}, ${sqlNull(resolveValidFrom(edgeParams.validFrom, timestamp))}, ${sqlNull(edgeParams.validTo)}, ${timestamp}, ${timestamp})`;
1546
+ return drizzleOrm.sql`(${edgeParams.graphId}, ${edgeParams.id}, ${edgeParams.kind}, ${edgeParams.fromKind}, ${edgeParams.fromId}, ${edgeParams.toKind}, ${edgeParams.toId}, ${propsJson}, ${sqlNull(chunkTQHGE7UC_cjs.resolveStampedValidityLowerBound(edgeParams.validFrom, edgeParams.validTo, timestamp))}, ${sqlNull(edgeParams.validTo)}, ${timestamp}, ${timestamp})`;
1551
1547
  });
1552
1548
  return drizzleOrm.sql`
1553
1549
  INSERT INTO ${edges} (${columns})
@@ -1559,7 +1555,7 @@ function buildInsertEdgesBatchReturning(tables, params, timestamp) {
1559
1555
  const columns = edgeColumnList(edges);
1560
1556
  const values = params.map((edgeParams) => {
1561
1557
  const propsJson = JSON.stringify(edgeParams.props);
1562
- return drizzleOrm.sql`(${edgeParams.graphId}, ${edgeParams.id}, ${edgeParams.kind}, ${edgeParams.fromKind}, ${edgeParams.fromId}, ${edgeParams.toKind}, ${edgeParams.toId}, ${propsJson}, ${sqlNull(resolveValidFrom(edgeParams.validFrom, timestamp))}, ${sqlNull(edgeParams.validTo)}, ${timestamp}, ${timestamp})`;
1558
+ return drizzleOrm.sql`(${edgeParams.graphId}, ${edgeParams.id}, ${edgeParams.kind}, ${edgeParams.fromKind}, ${edgeParams.fromId}, ${edgeParams.toKind}, ${edgeParams.toId}, ${propsJson}, ${sqlNull(chunkTQHGE7UC_cjs.resolveStampedValidityLowerBound(edgeParams.validFrom, edgeParams.validTo, timestamp))}, ${sqlNull(edgeParams.validTo)}, ${timestamp}, ${timestamp})`;
1563
1559
  });
1564
1560
  return drizzleOrm.sql`
1565
1561
  INSERT INTO ${edges} (${columns})
@@ -1606,9 +1602,11 @@ function buildUpdateEdge(tables, params, timestamp) {
1606
1602
  ];
1607
1603
  if (params.clearDeleted && params.validFrom !== void 0) {
1608
1604
  setParts.push(
1609
- drizzleOrm.sql`${quotedColumn(edges.validFrom)} = ${sqlNull(resolveValidFrom(params.validFrom, timestamp))}`,
1605
+ drizzleOrm.sql`${quotedColumn(edges.validFrom)} = ${sqlNull(chunkTQHGE7UC_cjs.resolveStatedValidityLowerBound(params.validFrom))}`,
1610
1606
  drizzleOrm.sql`${quotedColumn(edges.validTo)} = ${sqlNull(params.validTo)}`
1611
1607
  );
1608
+ } else if (params.clearValidTo === true) {
1609
+ setParts.push(drizzleOrm.sql`${quotedColumn(edges.validTo)} = NULL`);
1612
1610
  } else if (params.validTo !== void 0) {
1613
1611
  setParts.push(drizzleOrm.sql`${quotedColumn(edges.validTo)} = ${params.validTo}`);
1614
1612
  }
@@ -1621,12 +1619,16 @@ function buildUpdateEdge(tables, params, timestamp) {
1621
1619
  edges.validFrom,
1622
1620
  params.expectedValidFrom
1623
1621
  );
1622
+ const expectedValidTo = expectedValidFromPredicate(
1623
+ edges.validTo,
1624
+ params.expectedValidTo
1625
+ );
1624
1626
  if (params.clearDeleted) {
1625
1627
  return drizzleOrm.sql`
1626
1628
  UPDATE ${edges}
1627
1629
  SET ${setClause}
1628
1630
  WHERE ${edges.graphId} = ${params.graphId}
1629
- AND ${edges.id} = ${params.id}${expectedIdentity}${expectedValidFrom}
1631
+ AND ${edges.id} = ${params.id}${expectedIdentity}${expectedValidFrom}${expectedValidTo}
1630
1632
  RETURNING *
1631
1633
  `;
1632
1634
  }
@@ -1634,7 +1636,7 @@ function buildUpdateEdge(tables, params, timestamp) {
1634
1636
  UPDATE ${edges}
1635
1637
  SET ${setClause}
1636
1638
  WHERE ${edges.graphId} = ${params.graphId}
1637
- AND ${edges.id} = ${params.id}${expectedIdentity}${expectedValidFrom}
1639
+ AND ${edges.id} = ${params.id}${expectedIdentity}${expectedValidFrom}${expectedValidTo}
1638
1640
  AND ${edges.deletedAt} IS NULL
1639
1641
  RETURNING *
1640
1642
  `;
@@ -1755,11 +1757,11 @@ function buildFulltextSearch(tableName, params, strategy, dialect, candidates) {
1755
1757
  assertValidSearchParams(params);
1756
1758
  const mode = resolveMode(params.mode);
1757
1759
  const table = quotedTableName(tableName);
1758
- const matchCondition = chunkDYPRZ53S_cjs.toDrizzleSql(
1760
+ const matchCondition = chunkWODMN3Q2_cjs.toDrizzleSql(
1759
1761
  strategy.matchCondition(tableName, params.query, mode, params.language),
1760
1762
  dialect
1761
1763
  );
1762
- const rankExpression = chunkDYPRZ53S_cjs.toDrizzleSql(
1764
+ const rankExpression = chunkWODMN3Q2_cjs.toDrizzleSql(
1763
1765
  strategy.rankExpression(tableName, params.query, mode, params.language),
1764
1766
  dialect
1765
1767
  );
@@ -1772,10 +1774,10 @@ function buildFulltextSearch(tableName, params, strategy, dialect, candidates) {
1772
1774
  conditions.push(drizzleOrm.sql`${rankExpression} >= ${params.minScore}`);
1773
1775
  }
1774
1776
  if (candidates !== void 0) {
1775
- const candidateSql = chunk2ZWM2RFH_cjs.isSqlFragment(candidates) ? chunkDYPRZ53S_cjs.toDrizzleSql(candidates, dialect) : candidates;
1777
+ const candidateSql = chunkEDN4Y4ZG_cjs.isSqlFragment(candidates) ? chunkWODMN3Q2_cjs.toDrizzleSql(candidates, dialect) : candidates;
1776
1778
  conditions.push(drizzleOrm.sql`"node_id" IN (${candidateSql})`);
1777
1779
  }
1778
- const snippetExpr = params.includeSnippets === true && strategy.supportsSnippets ? chunkDYPRZ53S_cjs.toDrizzleSql(
1780
+ const snippetExpr = params.includeSnippets === true && strategy.supportsSnippets ? chunkWODMN3Q2_cjs.toDrizzleSql(
1779
1781
  strategy.snippetExpression(
1780
1782
  tableName,
1781
1783
  params.query,
@@ -1814,7 +1816,7 @@ function buildInsertNode(tables, params, timestamp) {
1814
1816
  INSERT INTO ${nodes} (${columns})
1815
1817
  VALUES (
1816
1818
  ${params.graphId}, ${params.kind}, ${params.id}, ${propsJson},
1817
- 1, ${sqlNull(resolveValidFrom(params.validFrom, timestamp))}, ${sqlNull(params.validTo)},
1819
+ 1, ${sqlNull(chunkTQHGE7UC_cjs.resolveStampedValidityLowerBound(params.validFrom, params.validTo, timestamp))}, ${sqlNull(params.validTo)},
1818
1820
  ${timestamp}, ${timestamp}
1819
1821
  )
1820
1822
  RETURNING *
@@ -1828,7 +1830,7 @@ function buildInsertNodeNoReturn(tables, params, timestamp) {
1828
1830
  INSERT INTO ${nodes} (${columns})
1829
1831
  VALUES (
1830
1832
  ${params.graphId}, ${params.kind}, ${params.id}, ${propsJson},
1831
- 1, ${sqlNull(resolveValidFrom(params.validFrom, timestamp))}, ${sqlNull(params.validTo)},
1833
+ 1, ${sqlNull(chunkTQHGE7UC_cjs.resolveStampedValidityLowerBound(params.validFrom, params.validTo, timestamp))}, ${sqlNull(params.validTo)},
1832
1834
  ${timestamp}, ${timestamp}
1833
1835
  )
1834
1836
  `;
@@ -1838,7 +1840,7 @@ function buildInsertNodesBatch(tables, params, timestamp) {
1838
1840
  const columns = nodeColumnList(nodes);
1839
1841
  const values = params.map((nodeParams) => {
1840
1842
  const propsJson = JSON.stringify(nodeParams.props);
1841
- return drizzleOrm.sql`(${nodeParams.graphId}, ${nodeParams.kind}, ${nodeParams.id}, ${propsJson}, 1, ${sqlNull(resolveValidFrom(nodeParams.validFrom, timestamp))}, ${sqlNull(nodeParams.validTo)}, ${timestamp}, ${timestamp})`;
1843
+ return drizzleOrm.sql`(${nodeParams.graphId}, ${nodeParams.kind}, ${nodeParams.id}, ${propsJson}, 1, ${sqlNull(chunkTQHGE7UC_cjs.resolveStampedValidityLowerBound(nodeParams.validFrom, nodeParams.validTo, timestamp))}, ${sqlNull(nodeParams.validTo)}, ${timestamp}, ${timestamp})`;
1842
1844
  });
1843
1845
  return drizzleOrm.sql`
1844
1846
  INSERT INTO ${nodes} (${columns})
@@ -1850,7 +1852,7 @@ function buildInsertNodesBatchReturning(tables, params, timestamp) {
1850
1852
  const columns = nodeColumnList(nodes);
1851
1853
  const values = params.map((nodeParams) => {
1852
1854
  const propsJson = JSON.stringify(nodeParams.props);
1853
- return drizzleOrm.sql`(${nodeParams.graphId}, ${nodeParams.kind}, ${nodeParams.id}, ${propsJson}, 1, ${sqlNull(resolveValidFrom(nodeParams.validFrom, timestamp))}, ${sqlNull(nodeParams.validTo)}, ${timestamp}, ${timestamp})`;
1855
+ return drizzleOrm.sql`(${nodeParams.graphId}, ${nodeParams.kind}, ${nodeParams.id}, ${propsJson}, 1, ${sqlNull(chunkTQHGE7UC_cjs.resolveStampedValidityLowerBound(nodeParams.validFrom, nodeParams.validTo, timestamp))}, ${sqlNull(nodeParams.validTo)}, ${timestamp}, ${timestamp})`;
1854
1856
  });
1855
1857
  return drizzleOrm.sql`
1856
1858
  INSERT INTO ${nodes} (${columns})
@@ -1893,9 +1895,11 @@ function buildUpdateNode(tables, params, timestamp) {
1893
1895
  }
1894
1896
  if (params.clearDeleted) {
1895
1897
  setParts.push(
1896
- drizzleOrm.sql`${quotedColumn(nodes.validFrom)} = ${sqlNull(resolveValidFrom(params.validFrom, timestamp))}`,
1898
+ drizzleOrm.sql`${quotedColumn(nodes.validFrom)} = ${sqlNull(chunkTQHGE7UC_cjs.resolveStampedValidityLowerBound(params.validFrom, params.validTo, timestamp))}`,
1897
1899
  drizzleOrm.sql`${quotedColumn(nodes.validTo)} = ${sqlNull(params.validTo)}`
1898
1900
  );
1901
+ } else if (params.clearValidTo === true) {
1902
+ setParts.push(drizzleOrm.sql`${quotedColumn(nodes.validTo)} = NULL`);
1899
1903
  } else if (params.validTo !== void 0) {
1900
1904
  setParts.push(drizzleOrm.sql`${quotedColumn(nodes.validTo)} = ${params.validTo}`);
1901
1905
  }
@@ -1930,18 +1934,18 @@ function buildUpdateNode(tables, params, timestamp) {
1930
1934
  }
1931
1935
  function buildUpdateNodeSet(tables, dialect, params, timestamp) {
1932
1936
  const { nodes } = tables;
1933
- const adapter = chunkZHOAZD7Q_cjs.getDialect(dialect);
1934
- const patchedProps = chunkDYPRZ53S_cjs.toDrizzleSql(
1937
+ const adapter = chunkL3LQNR34_cjs.getDialect(dialect);
1938
+ const patchedProps = chunkWODMN3Q2_cjs.toDrizzleSql(
1935
1939
  adapter.jsonSetProperties(
1936
- chunk2ZWM2RFH_cjs.sql.identifier(nodes.props.name),
1940
+ chunkEDN4Y4ZG_cjs.sql.identifier(nodes.props.name),
1937
1941
  params.patch,
1938
1942
  params.unsetProperties ?? []
1939
1943
  ),
1940
1944
  dialect
1941
1945
  );
1942
- const candidateIds = chunkDYPRZ53S_cjs.toDrizzleSql(params.candidateIds, dialect);
1943
- const candidateIdColumn = chunkDYPRZ53S_cjs.toDrizzleSql(
1944
- chunk2ZWM2RFH_cjs.sql.identifier(params.candidateIdColumn),
1946
+ const candidateIds = chunkWODMN3Q2_cjs.toDrizzleSql(params.candidateIds, dialect);
1947
+ const candidateIdColumn = chunkWODMN3Q2_cjs.toDrizzleSql(
1948
+ chunkEDN4Y4ZG_cjs.sql.identifier(params.candidateIdColumn),
1945
1949
  dialect
1946
1950
  );
1947
1951
  return drizzleOrm.sql`
@@ -2319,15 +2323,15 @@ function createCommonOperationStrategy(tables, dialect, fulltextStrategy) {
2319
2323
  const fulltextTable = tables.fulltextTableName;
2320
2324
  const contributionMaterializations = tables.contributionMaterializations;
2321
2325
  const fulltextBuilders = {
2322
- buildUpsertFulltext: (params, timestamp) => fulltextStrategy.buildUpsert(fulltextTable, params, timestamp).map((statement) => chunkDYPRZ53S_cjs.toDrizzleSql(statement, dialect)),
2323
- buildDeleteFulltext: (params) => fulltextStrategy.buildDelete(fulltextTable, params).map((statement) => chunkDYPRZ53S_cjs.toDrizzleSql(statement, dialect)),
2326
+ buildUpsertFulltext: (params, timestamp) => fulltextStrategy.buildUpsert(fulltextTable, params, timestamp).map((statement) => chunkWODMN3Q2_cjs.toDrizzleSql(statement, dialect)),
2327
+ buildDeleteFulltext: (params) => fulltextStrategy.buildDelete(fulltextTable, params).map((statement) => chunkWODMN3Q2_cjs.toDrizzleSql(statement, dialect)),
2324
2328
  buildDeleteFulltextByNode: (graphId, nodeKind, nodeId) => fulltextStrategy.buildDelete(fulltextTable, {
2325
2329
  graphId,
2326
2330
  nodeKind,
2327
2331
  nodeId
2328
- }).map((statement) => chunkDYPRZ53S_cjs.toDrizzleSql(statement, dialect)),
2329
- buildUpsertFulltextBatch: (params, timestamp) => fulltextStrategy.buildBatchUpsert(fulltextTable, params, timestamp).map((statement) => chunkDYPRZ53S_cjs.toDrizzleSql(statement, dialect)),
2330
- buildDeleteFulltextBatch: (params) => fulltextStrategy.buildBatchDelete(fulltextTable, params).map((statement) => chunkDYPRZ53S_cjs.toDrizzleSql(statement, dialect)),
2332
+ }).map((statement) => chunkWODMN3Q2_cjs.toDrizzleSql(statement, dialect)),
2333
+ buildUpsertFulltextBatch: (params, timestamp) => fulltextStrategy.buildBatchUpsert(fulltextTable, params, timestamp).map((statement) => chunkWODMN3Q2_cjs.toDrizzleSql(statement, dialect)),
2334
+ buildDeleteFulltextBatch: (params) => fulltextStrategy.buildBatchDelete(fulltextTable, params).map((statement) => chunkWODMN3Q2_cjs.toDrizzleSql(statement, dialect)),
2331
2335
  buildFulltextSearch: (params) => buildFulltextSearch(
2332
2336
  fulltextTable,
2333
2337
  params,
@@ -2339,7 +2343,7 @@ function createCommonOperationStrategy(tables, dialect, fulltextStrategy) {
2339
2343
  tables.nodes,
2340
2344
  params.graphId,
2341
2345
  params.nodeKind,
2342
- chunkBEB4OFZF_cjs.nowIso()
2346
+ chunkFA2AFWLP_cjs.nowIso()
2343
2347
  )
2344
2348
  ),
2345
2349
  buildHybridSearch: (params, vectorSql, vectorScoreDescending) => {
@@ -2347,7 +2351,7 @@ function createCommonOperationStrategy(tables, dialect, fulltextStrategy) {
2347
2351
  tables.nodes,
2348
2352
  params.graphId,
2349
2353
  params.nodeKind,
2350
- chunkBEB4OFZF_cjs.nowIso()
2354
+ chunkFA2AFWLP_cjs.nowIso()
2351
2355
  );
2352
2356
  const fulltextSql = buildFulltextSearch(
2353
2357
  fulltextTable,
@@ -2368,7 +2372,7 @@ function createCommonOperationStrategy(tables, dialect, fulltextStrategy) {
2368
2372
  hybridCandidatesRef()
2369
2373
  );
2370
2374
  return buildHybridSearchStatement({
2371
- candidatesSql: chunk2ZWM2RFH_cjs.isSqlFragment(candidates) ? chunkDYPRZ53S_cjs.toDrizzleSql(candidates, dialect) : candidates,
2375
+ candidatesSql: chunkEDN4Y4ZG_cjs.isSqlFragment(candidates) ? chunkWODMN3Q2_cjs.toDrizzleSql(candidates, dialect) : candidates,
2372
2376
  vectorSql,
2373
2377
  vectorScoreDescending,
2374
2378
  fulltextSql,
@@ -2498,7 +2502,7 @@ var DRIZZLE_DIALECT_LABELS = {
2498
2502
  function assertAdoptedDialect(externalTx, brand, backend) {
2499
2503
  if (drizzleOrm.is(externalTx, brand)) return;
2500
2504
  const label = DRIZZLE_DIALECT_LABELS[backend];
2501
- throw new chunkKCH7WQA5_cjs.ConfigurationError(
2505
+ throw new chunkMRDBBHIZ_cjs.ConfigurationError(
2502
2506
  `adoptTransaction received a handle that is not a ${label} Drizzle transaction. Pass the \`tx\` from a ${label} \`db.transaction(...)\` opened on this backend's connection.`,
2503
2507
  { backend, capability: "adoptTransaction" }
2504
2508
  );
@@ -2507,8 +2511,8 @@ async function withDuplicateKeyClassification(run, context) {
2507
2511
  try {
2508
2512
  return await run();
2509
2513
  } catch (error) {
2510
- if (!chunkGVAMRRZR_cjs.isDuplicatePrimaryKeyError(error, context.relation)) throw error;
2511
- throw new chunkKCH7WQA5_cjs.DatabaseOperationError(
2514
+ if (!chunkSIT26LAZ_cjs.isDuplicatePrimaryKeyError(error, context.relation)) throw error;
2515
+ throw new chunkMRDBBHIZ_cjs.DatabaseOperationError(
2512
2516
  `Insert ${context.entity} failed: a row with this identity already exists`,
2513
2517
  {
2514
2518
  operation: "insert",
@@ -2529,7 +2533,7 @@ function verifyExpectedActiveVersion(graphId, expected, actualActiveVersion) {
2529
2533
  }
2530
2534
  function assertActiveSchemaVersion(graphId, expectedVersion, actualActiveVersion) {
2531
2535
  if (actualActiveVersion !== expectedVersion) {
2532
- throw new chunkKCH7WQA5_cjs.StaleVersionError({
2536
+ throw new chunkMRDBBHIZ_cjs.StaleVersionError({
2533
2537
  graphId,
2534
2538
  expected: expectedVersion,
2535
2539
  actual: actualActiveVersion
@@ -2579,7 +2583,7 @@ function createCommonOperationBackend(options) {
2579
2583
  operationStrategy,
2580
2584
  rowMappers
2581
2585
  } = options;
2582
- const nowIso2 = options.nowIso ?? chunkBEB4OFZF_cjs.nowIso;
2586
+ const nowIso2 = options.nowIso ?? chunkFA2AFWLP_cjs.nowIso;
2583
2587
  const tableExists = createCachedTableExistence(
2584
2588
  (tableName) => execution.execGet(
2585
2589
  operationStrategy.buildTableExists(tableName)
@@ -2601,7 +2605,7 @@ function createCommonOperationBackend(options) {
2601
2605
  return {
2602
2606
  tableExists,
2603
2607
  async executeSchemaDdl(ddl) {
2604
- await execution.execRun(chunk2ZWM2RFH_cjs.asCompiledStatementSql(chunk2ZWM2RFH_cjs.sql.raw(ddl)));
2608
+ await execution.execRun(chunkEDN4Y4ZG_cjs.asCompiledStatementSql(chunkEDN4Y4ZG_cjs.sql.raw(ddl)));
2605
2609
  },
2606
2610
  async executeStatement(query) {
2607
2611
  await execution.execRun(query);
@@ -2621,7 +2625,7 @@ function createCommonOperationBackend(options) {
2621
2625
  }
2622
2626
  );
2623
2627
  if (!row)
2624
- throw new chunkKCH7WQA5_cjs.DatabaseOperationError(
2628
+ throw new chunkMRDBBHIZ_cjs.DatabaseOperationError(
2625
2629
  "Insert node failed: no row returned",
2626
2630
  {
2627
2631
  operation: "insert",
@@ -2648,7 +2652,7 @@ function createCommonOperationBackend(options) {
2648
2652
  return;
2649
2653
  }
2650
2654
  const timestamp = nowIso2();
2651
- for (const chunk2 of chunkGVAMRRZR_cjs.chunk(params, batchConfig.nodeInsertBatchSize)) {
2655
+ for (const chunk2 of chunkSIT26LAZ_cjs.chunk(params, batchConfig.nodeInsertBatchSize)) {
2652
2656
  const query = operationStrategy.buildInsertNodesBatch(chunk2, timestamp);
2653
2657
  await withDuplicateKeyClassification(() => execution.execRun(query), {
2654
2658
  entity: "node",
@@ -2663,7 +2667,7 @@ function createCommonOperationBackend(options) {
2663
2667
  }
2664
2668
  const timestamp = nowIso2();
2665
2669
  const allRows = [];
2666
- for (const chunk2 of chunkGVAMRRZR_cjs.chunk(params, batchConfig.nodeInsertBatchSize)) {
2670
+ for (const chunk2 of chunkSIT26LAZ_cjs.chunk(params, batchConfig.nodeInsertBatchSize)) {
2667
2671
  const query = operationStrategy.buildInsertNodesBatchReturning(
2668
2672
  chunk2,
2669
2673
  timestamp
@@ -2688,7 +2692,7 @@ function createCommonOperationBackend(options) {
2688
2692
  async getNodes(graphId, kind, ids) {
2689
2693
  if (ids.length === 0) return [];
2690
2694
  const allRows = [];
2691
- for (const chunk2 of chunkGVAMRRZR_cjs.chunk(ids, batchConfig.getNodesChunkSize)) {
2695
+ for (const chunk2 of chunkSIT26LAZ_cjs.chunk(ids, batchConfig.getNodesChunkSize)) {
2692
2696
  const query = operationStrategy.buildGetNodes(graphId, kind, chunk2);
2693
2697
  const rows = await execution.execAll(query);
2694
2698
  allRows.push(...rows.map((row) => rowMappers.toNodeRow(row)));
@@ -2700,7 +2704,7 @@ function createCommonOperationBackend(options) {
2700
2704
  const query = operationStrategy.buildUpdateNode(params, timestamp);
2701
2705
  const row = await execution.execGet(query);
2702
2706
  if (!row)
2703
- throw new chunkKCH7WQA5_cjs.DatabaseOperationError(
2707
+ throw new chunkMRDBBHIZ_cjs.DatabaseOperationError(
2704
2708
  "Update node failed: no row returned",
2705
2709
  {
2706
2710
  operation: "update",
@@ -2712,13 +2716,13 @@ function createCommonOperationBackend(options) {
2712
2716
  },
2713
2717
  async updateNodeSet(params) {
2714
2718
  if (Object.keys(params.patch).length === 0 && (params.unsetProperties?.length ?? 0) === 0) {
2715
- throw new chunkKCH7WQA5_cjs.ConfigurationError(
2719
+ throw new chunkMRDBBHIZ_cjs.ConfigurationError(
2716
2720
  "Set-based node update requires at least one property",
2717
2721
  { operation: "updateNodeSet", kind: params.kind }
2718
2722
  );
2719
2723
  }
2720
2724
  if (params.candidateIdColumn.length === 0) {
2721
- throw new chunkKCH7WQA5_cjs.ConfigurationError(
2725
+ throw new chunkMRDBBHIZ_cjs.ConfigurationError(
2722
2726
  "Set-based node update requires a candidate id column",
2723
2727
  { operation: "updateNodeSet", kind: params.kind }
2724
2728
  );
@@ -2779,7 +2783,7 @@ function createCommonOperationBackend(options) {
2779
2783
  }
2780
2784
  );
2781
2785
  if (!row)
2782
- throw new chunkKCH7WQA5_cjs.DatabaseOperationError(
2786
+ throw new chunkMRDBBHIZ_cjs.DatabaseOperationError(
2783
2787
  "Insert edge failed: no row returned",
2784
2788
  {
2785
2789
  operation: "insert",
@@ -2806,7 +2810,7 @@ function createCommonOperationBackend(options) {
2806
2810
  return;
2807
2811
  }
2808
2812
  const timestamp = nowIso2();
2809
- for (const chunk2 of chunkGVAMRRZR_cjs.chunk(params, batchConfig.edgeInsertBatchSize)) {
2813
+ for (const chunk2 of chunkSIT26LAZ_cjs.chunk(params, batchConfig.edgeInsertBatchSize)) {
2810
2814
  const query = operationStrategy.buildInsertEdgesBatch(chunk2, timestamp);
2811
2815
  await withDuplicateKeyClassification(() => execution.execRun(query), {
2812
2816
  entity: "edge",
@@ -2821,7 +2825,7 @@ function createCommonOperationBackend(options) {
2821
2825
  }
2822
2826
  const timestamp = nowIso2();
2823
2827
  const allRows = [];
2824
- for (const chunk2 of chunkGVAMRRZR_cjs.chunk(params, batchConfig.edgeInsertBatchSize)) {
2828
+ for (const chunk2 of chunkSIT26LAZ_cjs.chunk(params, batchConfig.edgeInsertBatchSize)) {
2825
2829
  const query = operationStrategy.buildInsertEdgesBatchReturning(
2826
2830
  chunk2,
2827
2831
  timestamp
@@ -2846,7 +2850,7 @@ function createCommonOperationBackend(options) {
2846
2850
  async getEdges(graphId, ids) {
2847
2851
  if (ids.length === 0) return [];
2848
2852
  const allRows = [];
2849
- for (const chunk2 of chunkGVAMRRZR_cjs.chunk(ids, batchConfig.getEdgesChunkSize)) {
2853
+ for (const chunk2 of chunkSIT26LAZ_cjs.chunk(ids, batchConfig.getEdgesChunkSize)) {
2850
2854
  const query = operationStrategy.buildGetEdges(graphId, chunk2);
2851
2855
  const rows = await execution.execAll(query);
2852
2856
  allRows.push(...rows.map((row) => rowMappers.toEdgeRow(row)));
@@ -2858,7 +2862,7 @@ function createCommonOperationBackend(options) {
2858
2862
  const query = operationStrategy.buildUpdateEdge(params, timestamp);
2859
2863
  const row = await execution.execGet(query);
2860
2864
  if (!row)
2861
- throw new chunkKCH7WQA5_cjs.DatabaseOperationError(
2865
+ throw new chunkMRDBBHIZ_cjs.DatabaseOperationError(
2862
2866
  "Update edge failed: no row returned",
2863
2867
  {
2864
2868
  operation: "update",
@@ -2884,7 +2888,7 @@ function createCommonOperationBackend(options) {
2884
2888
  1,
2885
2889
  batchConfig.getEdgesChunkSize - 1
2886
2890
  );
2887
- for (const chunk2 of chunkGVAMRRZR_cjs.chunk(params.ids, softDeleteChunkSize)) {
2891
+ for (const chunk2 of chunkSIT26LAZ_cjs.chunk(params.ids, softDeleteChunkSize)) {
2888
2892
  const query = operationStrategy.buildDeleteEdgesBatch(
2889
2893
  { graphId: params.graphId, ids: chunk2 },
2890
2894
  timestamp
@@ -2894,7 +2898,7 @@ function createCommonOperationBackend(options) {
2894
2898
  },
2895
2899
  async hardDeleteEdgesBatch(params) {
2896
2900
  if (params.ids.length === 0) return;
2897
- for (const chunk2 of chunkGVAMRRZR_cjs.chunk(
2901
+ for (const chunk2 of chunkSIT26LAZ_cjs.chunk(
2898
2902
  params.ids,
2899
2903
  batchConfig.getEdgesChunkSize
2900
2904
  )) {
@@ -2938,7 +2942,7 @@ function createCommonOperationBackend(options) {
2938
2942
  async findEdgesByEndpointSet(params) {
2939
2943
  const ids = resolveEdgeEndpointIds(params);
2940
2944
  const edgeRows = [];
2941
- for (const idChunk of chunkGVAMRRZR_cjs.chunk(
2945
+ for (const idChunk of chunkSIT26LAZ_cjs.chunk(
2942
2946
  ids,
2943
2947
  batchConfig.findEdgesEndpointChunkSize
2944
2948
  )) {
@@ -2955,7 +2959,7 @@ function createCommonOperationBackend(options) {
2955
2959
  const { edgeKinds, endpoints, endpointChunkSize } = resolveHeterogeneousEdgeRead(params, maxBindParameters);
2956
2960
  if (edgeKinds.length === 0 || endpoints.length === 0) return [];
2957
2961
  const edgeRows = [];
2958
- for (const endpointChunk of chunkGVAMRRZR_cjs.chunk(endpoints, endpointChunkSize)) {
2962
+ for (const endpointChunk of chunkSIT26LAZ_cjs.chunk(endpoints, endpointChunkSize)) {
2959
2963
  const query = operationStrategy.buildFindEdgesByHeterogeneousEndpointSet(
2960
2964
  params,
2961
2965
  endpointChunk,
@@ -2975,7 +2979,7 @@ function createCommonOperationBackend(options) {
2975
2979
  const query = operationStrategy.buildInsertUnique(params);
2976
2980
  const result = await execution.execGet(query);
2977
2981
  if (result && result.node_id !== params.nodeId) {
2978
- throw new chunkKCH7WQA5_cjs.UniquenessError({
2982
+ throw new chunkMRDBBHIZ_cjs.UniquenessError({
2979
2983
  constraintName: params.constraintName,
2980
2984
  kind: params.nodeKind,
2981
2985
  existingId: result.node_id,
@@ -2995,7 +2999,7 @@ function createCommonOperationBackend(options) {
2995
2999
  continue;
2996
3000
  }
2997
3001
  if (existing.nodeId !== entry.nodeId) {
2998
- throw new chunkKCH7WQA5_cjs.UniquenessError({
3002
+ throw new chunkMRDBBHIZ_cjs.UniquenessError({
2999
3003
  constraintName: entry.constraintName,
3000
3004
  kind: entry.nodeKind,
3001
3005
  existingId: existing.nodeId,
@@ -3005,7 +3009,7 @@ function createCommonOperationBackend(options) {
3005
3009
  }
3006
3010
  }
3007
3011
  const deduped = [...byTarget.values()];
3008
- for (const chunk2 of chunkGVAMRRZR_cjs.chunk(
3012
+ for (const chunk2 of chunkSIT26LAZ_cjs.chunk(
3009
3013
  deduped,
3010
3014
  batchConfig.uniqueInsertBatchSize
3011
3015
  )) {
@@ -3020,7 +3024,7 @@ function createCommonOperationBackend(options) {
3020
3024
  for (const entry of chunk2) {
3021
3025
  const owner = ownerByTarget.get(targetKey(entry));
3022
3026
  if (owner !== void 0 && owner !== entry.nodeId) {
3023
- throw new chunkKCH7WQA5_cjs.UniquenessError({
3027
+ throw new chunkMRDBBHIZ_cjs.UniquenessError({
3024
3028
  constraintName: entry.constraintName,
3025
3029
  kind: entry.nodeKind,
3026
3030
  existingId: owner,
@@ -3038,7 +3042,7 @@ function createCommonOperationBackend(options) {
3038
3042
  },
3039
3043
  async hardDeleteUniquesByNodeIds(params) {
3040
3044
  const nodeIds = [...new Set(params.nodeIds)];
3041
- for (const chunk2 of chunkGVAMRRZR_cjs.chunk(
3045
+ for (const chunk2 of chunkSIT26LAZ_cjs.chunk(
3042
3046
  nodeIds,
3043
3047
  batchConfig.uniqueDeleteChunkSize
3044
3048
  )) {
@@ -3057,7 +3061,7 @@ function createCommonOperationBackend(options) {
3057
3061
  async checkUniqueBatch(params) {
3058
3062
  if (params.keys.length === 0) return [];
3059
3063
  const allRows = [];
3060
- for (const chunk2 of chunkGVAMRRZR_cjs.chunk(
3064
+ for (const chunk2 of chunkSIT26LAZ_cjs.chunk(
3061
3065
  params.keys,
3062
3066
  batchConfig.checkUniqueBatchChunkSize
3063
3067
  )) {
@@ -3088,7 +3092,7 @@ function createCommonOperationBackend(options) {
3088
3092
  if (existingRaw !== void 0) {
3089
3093
  const existing = rowMappers.toSchemaVersionRow(existingRaw);
3090
3094
  if (existing.schema_hash !== params.schemaHash) {
3091
- throw new chunkKCH7WQA5_cjs.SchemaContentConflictError({
3095
+ throw new chunkMRDBBHIZ_cjs.SchemaContentConflictError({
3092
3096
  graphId: params.graphId,
3093
3097
  version: params.version,
3094
3098
  existingHash: existing.schema_hash,
@@ -3136,7 +3140,7 @@ function createCommonOperationBackend(options) {
3136
3140
  );
3137
3141
  const insertedRaw = await execution.execGet(insertQuery);
3138
3142
  if (!insertedRaw) {
3139
- throw new chunkKCH7WQA5_cjs.DatabaseOperationError(
3143
+ throw new chunkMRDBBHIZ_cjs.DatabaseOperationError(
3140
3144
  "Insert schema failed: no row returned",
3141
3145
  { operation: "insert", entity: "schema" }
3142
3146
  );
@@ -3154,7 +3158,7 @@ function createCommonOperationBackend(options) {
3154
3158
  operationStrategy.buildGetSchemaVersion(params.graphId, params.version)
3155
3159
  );
3156
3160
  if (!targetRaw) {
3157
- throw new chunkKCH7WQA5_cjs.MigrationError(
3161
+ throw new chunkMRDBBHIZ_cjs.MigrationError(
3158
3162
  `Cannot activate version ${params.version}: version does not exist for graph "${params.graphId}".`,
3159
3163
  {
3160
3164
  graphId: params.graphId,
@@ -3187,7 +3191,7 @@ function quoteSqlIdentifier(identifier) {
3187
3191
  }
3188
3192
  function requireRawExecution(backend) {
3189
3193
  if (backend.executeRaw === void 0) {
3190
- throw new chunkKCH7WQA5_cjs.TrustedImportError(
3194
+ throw new chunkMRDBBHIZ_cjs.TrustedImportError(
3191
3195
  "This backend cannot execute the raw statements required by trusted import.",
3192
3196
  "backend_unsupported"
3193
3197
  );
@@ -3196,7 +3200,7 @@ function requireRawExecution(backend) {
3196
3200
  }
3197
3201
  function requireStatementExecution(backend) {
3198
3202
  if (backend.executeStatement === void 0) {
3199
- throw new chunkKCH7WQA5_cjs.TrustedImportError(
3203
+ throw new chunkMRDBBHIZ_cjs.TrustedImportError(
3200
3204
  "This backend cannot execute the index lifecycle required by trusted import.",
3201
3205
  "backend_unsupported"
3202
3206
  );
@@ -3218,7 +3222,7 @@ async function assertTrustedImportDatabaseEmpty(backend, tableNames) {
3218
3222
  []
3219
3223
  );
3220
3224
  if (!rowIndicatesExistingData(rows[0])) return;
3221
- throw new chunkKCH7WQA5_cjs.TrustedImportError(
3225
+ throw new chunkMRDBBHIZ_cjs.TrustedImportError(
3222
3226
  "Trusted import requires globally empty TypeGraph node and edge tables.",
3223
3227
  "database_not_empty",
3224
3228
  { tables: [tableNames.nodes, tableNames.edges] },
@@ -3230,8 +3234,8 @@ async function assertTrustedImportDatabaseEmpty(backend, tableNames) {
3230
3234
  async function lockPostgresTrustedImportTables(backend, tableNames) {
3231
3235
  const executeStatement = requireStatementExecution(backend);
3232
3236
  await executeStatement(
3233
- chunk2ZWM2RFH_cjs.asCompiledStatementSql(
3234
- chunk2ZWM2RFH_cjs.sql.raw(
3237
+ chunkEDN4Y4ZG_cjs.asCompiledStatementSql(
3238
+ chunkEDN4Y4ZG_cjs.sql.raw(
3235
3239
  `LOCK TABLE ${quoteSqlIdentifier(tableNames.nodes)}, ${quoteSqlIdentifier(tableNames.edges)} IN ACCESS EXCLUSIVE MODE`
3236
3240
  )
3237
3241
  )
@@ -3251,8 +3255,8 @@ async function suspendSqliteSecondaryIndexes(backend, tableNames) {
3251
3255
  );
3252
3256
  for (const definition of definitions) {
3253
3257
  await executeStatement(
3254
- chunk2ZWM2RFH_cjs.asCompiledStatementSql(
3255
- chunk2ZWM2RFH_cjs.sql.raw(`DROP INDEX ${quoteSqlIdentifier(definition.index_name)}`)
3258
+ chunkEDN4Y4ZG_cjs.asCompiledStatementSql(
3259
+ chunkEDN4Y4ZG_cjs.sql.raw(`DROP INDEX ${quoteSqlIdentifier(definition.index_name)}`)
3256
3260
  )
3257
3261
  );
3258
3262
  }
@@ -3282,8 +3286,8 @@ async function suspendPostgresSecondaryIndexes(backend, tableNames) {
3282
3286
  );
3283
3287
  for (const definition of definitions) {
3284
3288
  await executeStatement(
3285
- chunk2ZWM2RFH_cjs.asCompiledStatementSql(
3286
- chunk2ZWM2RFH_cjs.sql.raw(`DROP INDEX ${quoteSqlIdentifier(definition.index_name)}`)
3289
+ chunkEDN4Y4ZG_cjs.asCompiledStatementSql(
3290
+ chunkEDN4Y4ZG_cjs.sql.raw(`DROP INDEX ${quoteSqlIdentifier(definition.index_name)}`)
3287
3291
  )
3288
3292
  );
3289
3293
  }
@@ -3293,26 +3297,23 @@ async function restoreSecondaryIndexes(backend, definitions) {
3293
3297
  const executeStatement = requireStatementExecution(backend);
3294
3298
  for (const definition of definitions) {
3295
3299
  await executeStatement(
3296
- chunk2ZWM2RFH_cjs.asCompiledStatementSql(chunk2ZWM2RFH_cjs.sql.raw(definition.index_definition))
3300
+ chunkEDN4Y4ZG_cjs.asCompiledStatementSql(chunkEDN4Y4ZG_cjs.sql.raw(definition.index_definition))
3297
3301
  );
3298
3302
  }
3299
3303
  }
3300
3304
  async function analyzeImportedTables(backend, tableNames) {
3301
3305
  const executeStatement = requireStatementExecution(backend);
3302
3306
  await executeStatement(
3303
- chunk2ZWM2RFH_cjs.asCompiledStatementSql(
3304
- chunk2ZWM2RFH_cjs.sql.raw(`ANALYZE ${quoteSqlIdentifier(tableNames.nodes)}`)
3307
+ chunkEDN4Y4ZG_cjs.asCompiledStatementSql(
3308
+ chunkEDN4Y4ZG_cjs.sql.raw(`ANALYZE ${quoteSqlIdentifier(tableNames.nodes)}`)
3305
3309
  )
3306
3310
  );
3307
3311
  await executeStatement(
3308
- chunk2ZWM2RFH_cjs.asCompiledStatementSql(
3309
- chunk2ZWM2RFH_cjs.sql.raw(`ANALYZE ${quoteSqlIdentifier(tableNames.edges)}`)
3312
+ chunkEDN4Y4ZG_cjs.asCompiledStatementSql(
3313
+ chunkEDN4Y4ZG_cjs.sql.raw(`ANALYZE ${quoteSqlIdentifier(tableNames.edges)}`)
3310
3314
  )
3311
3315
  );
3312
3316
  }
3313
- function resolvedValidFrom(validFrom, timestamp) {
3314
- return validFrom === void 0 ? timestamp : validFrom;
3315
- }
3316
3317
  function postgresArray(values) {
3317
3318
  return `{${values.map(
3318
3319
  (value) => value === DATABASE_NULL ? "NULL" : `"${value.replaceAll("\\", "\\\\").replaceAll('"', String.raw`\"`)}"`
@@ -3321,7 +3322,7 @@ function postgresArray(values) {
3321
3322
  function createSqliteTrustedImportSession(executionAdapter, tableNames) {
3322
3323
  const executePreparedRunBatch = executionAdapter.executePreparedRunBatch;
3323
3324
  if (executePreparedRunBatch === void 0) {
3324
- throw new chunkKCH7WQA5_cjs.TrustedImportError(
3325
+ throw new chunkMRDBBHIZ_cjs.TrustedImportError(
3325
3326
  "Trusted import requires a synchronous SQLite driver with prepared statement support.",
3326
3327
  "backend_unsupported"
3327
3328
  );
@@ -3343,7 +3344,7 @@ function createSqliteTrustedImportSession(executionAdapter, tableNames) {
3343
3344
  item.kind,
3344
3345
  item.id,
3345
3346
  JSON.stringify(item.props),
3346
- resolvedValidFrom(item.validFrom, timestamp),
3347
+ chunkTQHGE7UC_cjs.resolveStampedValidityLowerBound(item.validFrom, item.validTo, timestamp) ?? DATABASE_NULL,
3347
3348
  item.validTo ?? DATABASE_NULL,
3348
3349
  timestamp,
3349
3350
  timestamp
@@ -3364,7 +3365,7 @@ function createSqliteTrustedImportSession(executionAdapter, tableNames) {
3364
3365
  item.toKind,
3365
3366
  item.toId,
3366
3367
  JSON.stringify(item.props),
3367
- resolvedValidFrom(item.validFrom, timestamp),
3368
+ chunkTQHGE7UC_cjs.resolveStampedValidityLowerBound(item.validFrom, item.validTo, timestamp) ?? DATABASE_NULL,
3368
3369
  item.validTo ?? DATABASE_NULL,
3369
3370
  timestamp,
3370
3371
  timestamp
@@ -3404,7 +3405,9 @@ function createPostgresTrustedImportSession(backend, tableNames) {
3404
3405
  postgresArray(params.map((item) => item.id)),
3405
3406
  postgresArray(params.map((item) => JSON.stringify(item.props))),
3406
3407
  postgresArray(
3407
- params.map((item) => resolvedValidFrom(item.validFrom, timestamp))
3408
+ params.map(
3409
+ (item) => chunkTQHGE7UC_cjs.resolveStampedValidityLowerBound(item.validFrom, item.validTo, timestamp) ?? DATABASE_NULL
3410
+ )
3408
3411
  ),
3409
3412
  postgresArray(params.map((item) => item.validTo ?? DATABASE_NULL)),
3410
3413
  postgresArray(params.map(() => timestamp))
@@ -3423,7 +3426,9 @@ function createPostgresTrustedImportSession(backend, tableNames) {
3423
3426
  postgresArray(params.map((item) => item.toId)),
3424
3427
  postgresArray(params.map((item) => JSON.stringify(item.props))),
3425
3428
  postgresArray(
3426
- params.map((item) => resolvedValidFrom(item.validFrom, timestamp))
3429
+ params.map(
3430
+ (item) => chunkTQHGE7UC_cjs.resolveStampedValidityLowerBound(item.validFrom, item.validTo, timestamp) ?? DATABASE_NULL
3431
+ )
3427
3432
  ),
3428
3433
  postgresArray(params.map((item) => item.validTo ?? DATABASE_NULL)),
3429
3434
  postgresArray(params.map(() => timestamp))
@@ -3493,5 +3498,5 @@ exports.tableExistsFromRow = tableExistsFromRow;
3493
3498
  exports.vectorSlotFromCreateIndexParams = vectorSlotFromCreateIndexParams;
3494
3499
  exports.vectorSlotFromDropIndexParams = vectorSlotFromDropIndexParams;
3495
3500
  exports.vectorSlotFromParams = vectorSlotFromParams;
3496
- //# sourceMappingURL=chunk-RHDOAQCT.cjs.map
3497
- //# sourceMappingURL=chunk-RHDOAQCT.cjs.map
3501
+ //# sourceMappingURL=chunk-WCCATHMB.cjs.map
3502
+ //# sourceMappingURL=chunk-WCCATHMB.cjs.map