@nicia-ai/typegraph 0.43.0 → 0.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/backend/drizzle/indexes.cjs +9 -9
- package/dist/backend/drizzle/indexes.d.cts +1 -1
- package/dist/backend/drizzle/indexes.d.ts +1 -1
- package/dist/backend/drizzle/indexes.js +5 -5
- package/dist/backend/index.cjs +50 -50
- package/dist/backend/index.d.cts +3 -3
- package/dist/backend/index.d.ts +3 -3
- package/dist/backend/index.js +11 -11
- package/dist/backend/postgres/index.cjs +26 -26
- package/dist/backend/postgres/index.d.cts +6 -5
- package/dist/backend/postgres/index.d.ts +6 -5
- package/dist/backend/postgres/index.js +13 -13
- package/dist/backend/postgres/pglite-store.cjs +32 -33
- package/dist/backend/postgres/pglite-store.cjs.map +1 -1
- package/dist/backend/postgres/pglite-store.d.cts +7 -7
- package/dist/backend/postgres/pglite-store.d.ts +7 -7
- package/dist/backend/postgres/pglite-store.js +28 -29
- package/dist/backend/postgres/pglite-store.js.map +1 -1
- package/dist/backend/postgres/pglite.cjs +15 -15
- package/dist/backend/postgres/pglite.d.cts +3 -2
- package/dist/backend/postgres/pglite.d.ts +3 -2
- package/dist/backend/postgres/pglite.js +14 -14
- package/dist/backend/sqlite/index.cjs +23 -23
- package/dist/backend/sqlite/index.d.cts +7 -6
- package/dist/backend/sqlite/index.d.ts +7 -6
- package/dist/backend/sqlite/index.js +11 -11
- package/dist/backend/sqlite/libsql.cjs +17 -17
- package/dist/backend/sqlite/libsql.cjs.map +1 -1
- package/dist/backend/sqlite/libsql.d.cts +3 -2
- package/dist/backend/sqlite/libsql.d.ts +3 -2
- package/dist/backend/sqlite/libsql.js +13 -13
- package/dist/backend/sqlite/libsql.js.map +1 -1
- package/dist/backend/sqlite/local-store.cjs +33 -34
- package/dist/backend/sqlite/local-store.cjs.map +1 -1
- package/dist/backend/sqlite/local-store.d.cts +8 -7
- package/dist/backend/sqlite/local-store.d.ts +8 -7
- package/dist/backend/sqlite/local-store.js +29 -30
- package/dist/backend/sqlite/local-store.js.map +1 -1
- package/dist/backend/sqlite/local.cjs +16 -16
- package/dist/backend/sqlite/local.d.cts +3 -2
- package/dist/backend/sqlite/local.d.ts +3 -2
- package/dist/backend/sqlite/local.js +14 -14
- package/dist/{chunk-2OOY4OYT.js → chunk-2L54C2C2.js} +4 -4
- package/dist/{chunk-2OOY4OYT.js.map → chunk-2L54C2C2.js.map} +1 -1
- package/dist/{chunk-4WYFRACU.js → chunk-42PYUGLS.js} +58 -4
- package/dist/chunk-42PYUGLS.js.map +1 -0
- package/dist/{chunk-EQOQOT55.js → chunk-4GUBTVPV.js} +4 -5
- package/dist/chunk-4GUBTVPV.js.map +1 -0
- package/dist/{chunk-ZIRC2U6G.js → chunk-4GUTQPVO.js} +102 -16
- package/dist/chunk-4GUTQPVO.js.map +1 -0
- package/dist/{chunk-OYJSYDIH.js → chunk-4MB3AQAQ.js} +13 -3
- package/dist/chunk-4MB3AQAQ.js.map +1 -0
- package/dist/{chunk-5Q3P6OIC.cjs → chunk-4MEWSUVM.cjs} +12 -12
- package/dist/chunk-4MEWSUVM.cjs.map +1 -0
- package/dist/{chunk-VC26BUNP.js → chunk-4QIKLIGG.js} +17 -5
- package/dist/chunk-4QIKLIGG.js.map +1 -0
- package/dist/chunk-4SZ6XPTG.cjs +12 -0
- package/dist/{chunk-VGMNGWBR.cjs.map → chunk-4SZ6XPTG.cjs.map} +1 -1
- package/dist/{chunk-UZLEQFTV.js → chunk-55ITBQJI.js} +4 -4
- package/dist/chunk-55ITBQJI.js.map +1 -0
- package/dist/{chunk-JOYPNY33.js → chunk-5EKPX6QU.js} +9 -9
- package/dist/{chunk-JOYPNY33.js.map → chunk-5EKPX6QU.js.map} +1 -1
- package/dist/{chunk-TRC646QQ.cjs → chunk-5GAONX5G.cjs} +7 -7
- package/dist/{chunk-TRC646QQ.cjs.map → chunk-5GAONX5G.cjs.map} +1 -1
- package/dist/{chunk-M4GYQF2H.js → chunk-6DCB664D.js} +7 -4
- package/dist/chunk-6DCB664D.js.map +1 -0
- package/dist/{chunk-64LERBFM.cjs → chunk-6RYPD3NJ.cjs} +75 -65
- package/dist/chunk-6RYPD3NJ.cjs.map +1 -0
- package/dist/{chunk-5AERZSHC.cjs → chunk-7PF2L3H6.cjs} +4 -4
- package/dist/{chunk-5AERZSHC.cjs.map → chunk-7PF2L3H6.cjs.map} +1 -1
- package/dist/chunk-B3F2D3SP.cjs +12 -0
- package/dist/{chunk-U3YRCZ5L.cjs.map → chunk-B3F2D3SP.cjs.map} +1 -1
- package/dist/{chunk-Z3WIL6S3.js → chunk-BGYJW37L.js} +5 -5
- package/dist/{chunk-Z3WIL6S3.js.map → chunk-BGYJW37L.js.map} +1 -1
- package/dist/{chunk-DMZEVJGL.cjs → chunk-BNS75YNF.cjs} +12 -13
- package/dist/chunk-BNS75YNF.cjs.map +1 -0
- package/dist/{chunk-KTBTSHU6.cjs → chunk-C4F7VJ5D.cjs} +13 -3
- package/dist/chunk-C4F7VJ5D.cjs.map +1 -0
- package/dist/{chunk-L2BYRYHC.js → chunk-CBKG6HEP.js} +43 -33
- package/dist/chunk-CBKG6HEP.js.map +1 -0
- package/dist/{chunk-CVK4T34X.cjs → chunk-CPEL3YIR.cjs} +22 -22
- package/dist/{chunk-CVK4T34X.cjs.map → chunk-CPEL3YIR.cjs.map} +1 -1
- package/dist/{chunk-O2GZM7UK.cjs → chunk-D54WH24V.cjs} +62 -7
- package/dist/chunk-D54WH24V.cjs.map +1 -0
- package/dist/{chunk-33PAKPED.cjs → chunk-D56XG4EI.cjs} +53 -41
- package/dist/chunk-D56XG4EI.cjs.map +1 -0
- package/dist/{chunk-O3USVVWS.js → chunk-DK2S42XB.js} +3 -3
- package/dist/{chunk-O3USVVWS.js.map → chunk-DK2S42XB.js.map} +1 -1
- package/dist/{chunk-HHBKGPEI.js → chunk-DXEEHSGN.js} +517 -26
- package/dist/chunk-DXEEHSGN.js.map +1 -0
- package/dist/{chunk-UJRWOV5B.js → chunk-EFEOOCJ3.js} +5 -5
- package/dist/{chunk-UJRWOV5B.js.map → chunk-EFEOOCJ3.js.map} +1 -1
- package/dist/{chunk-ECU53PMN.cjs → chunk-EKFUG4G7.cjs} +5 -5
- package/dist/chunk-EKFUG4G7.cjs.map +1 -0
- package/dist/{chunk-FSCJOTHF.cjs → chunk-EQ7JKLZO.cjs} +10 -10
- package/dist/{chunk-FSCJOTHF.cjs.map → chunk-EQ7JKLZO.cjs.map} +1 -1
- package/dist/{chunk-AQR6BHB3.cjs → chunk-F4NHQHEZ.cjs} +10 -10
- package/dist/{chunk-AQR6BHB3.cjs.map → chunk-F4NHQHEZ.cjs.map} +1 -1
- package/dist/{chunk-2G6ZEGYO.js → chunk-FL5UQRES.js} +4 -4
- package/dist/{chunk-2G6ZEGYO.js.map → chunk-FL5UQRES.js.map} +1 -1
- package/dist/{chunk-ZP2KPDNN.js → chunk-FLEQ2HBK.js} +3 -3
- package/dist/{chunk-ZP2KPDNN.js.map → chunk-FLEQ2HBK.js.map} +1 -1
- package/dist/{chunk-RAWG2FEU.js → chunk-FQ7ZPOTZ.js} +264 -18
- package/dist/chunk-FQ7ZPOTZ.js.map +1 -0
- package/dist/{chunk-O7XVCLXW.cjs → chunk-H7VE3FL4.cjs} +577 -82
- package/dist/chunk-H7VE3FL4.cjs.map +1 -0
- package/dist/{chunk-JNXZQBN3.js → chunk-ID4WXTKL.js} +1039 -482
- package/dist/chunk-ID4WXTKL.js.map +1 -0
- package/dist/{chunk-ZGOUVMVS.js → chunk-ISLPNELU.js} +17 -5
- package/dist/chunk-ISLPNELU.js.map +1 -0
- package/dist/{chunk-I73ATSAH.cjs → chunk-IX64T5OL.cjs} +4 -4
- package/dist/{chunk-I73ATSAH.cjs.map → chunk-IX64T5OL.cjs.map} +1 -1
- package/dist/{chunk-XDMPDUKL.cjs → chunk-J2ICGNHO.cjs} +8 -9
- package/dist/chunk-J2ICGNHO.cjs.map +1 -0
- package/dist/{chunk-KDRF3NR2.cjs → chunk-J7LXTUTP.cjs} +295 -201
- package/dist/chunk-J7LXTUTP.cjs.map +1 -0
- package/dist/{chunk-AO2WPYFZ.cjs → chunk-JQXSZHF2.cjs} +14 -4
- package/dist/chunk-JQXSZHF2.cjs.map +1 -0
- package/dist/{chunk-UTTW2Q3M.cjs → chunk-JXUTCSXX.cjs} +197 -133
- package/dist/chunk-JXUTCSXX.cjs.map +1 -0
- package/dist/{chunk-GT7NEXSU.js → chunk-KCO5EFJU.js} +3 -3
- package/dist/{chunk-GT7NEXSU.js.map → chunk-KCO5EFJU.js.map} +1 -1
- package/dist/{chunk-ARN3ZODS.cjs → chunk-KKYELPZ2.cjs} +6 -6
- package/dist/{chunk-ARN3ZODS.cjs.map → chunk-KKYELPZ2.cjs.map} +1 -1
- package/dist/{chunk-7Y6BV3TK.cjs → chunk-KMXWZLQX.cjs} +100 -100
- package/dist/{chunk-7Y6BV3TK.cjs.map → chunk-KMXWZLQX.cjs.map} +1 -1
- package/dist/{chunk-CDYRPI5U.js → chunk-MIJKEVV7.js} +4 -4
- package/dist/{chunk-CDYRPI5U.js.map → chunk-MIJKEVV7.js.map} +1 -1
- package/dist/{chunk-FFQGI67R.cjs → chunk-NAAMUYMS.cjs} +56 -44
- package/dist/chunk-NAAMUYMS.cjs.map +1 -0
- package/dist/{chunk-6TJ6PKPS.cjs → chunk-OOA273IJ.cjs} +27 -27
- package/dist/{chunk-6TJ6PKPS.cjs.map → chunk-OOA273IJ.cjs.map} +1 -1
- package/dist/{chunk-F2KVJ6FF.cjs → chunk-P7GTYOLB.cjs} +203 -117
- package/dist/chunk-P7GTYOLB.cjs.map +1 -0
- package/dist/{chunk-42XYPKZU.js → chunk-PVUI6KGR.js} +67 -3
- package/dist/chunk-PVUI6KGR.js.map +1 -0
- package/dist/{chunk-L5AUCL5P.js → chunk-Q6EDCUXV.js} +274 -14
- package/dist/chunk-Q6EDCUXV.js.map +1 -0
- package/dist/{chunk-ZPCKPLMX.cjs → chunk-QB6VMOJ2.cjs} +8 -8
- package/dist/{chunk-ZPCKPLMX.cjs.map → chunk-QB6VMOJ2.cjs.map} +1 -1
- package/dist/{chunk-3RPQDGUE.cjs → chunk-QC4MCOFV.cjs} +5 -5
- package/dist/{chunk-3RPQDGUE.cjs.map → chunk-QC4MCOFV.cjs.map} +1 -1
- package/dist/{chunk-4XRP2N6B.js → chunk-QLUXRWKL.js} +3 -3
- package/dist/{chunk-4XRP2N6B.js.map → chunk-QLUXRWKL.js.map} +1 -1
- package/dist/{chunk-OM6RIOA5.cjs → chunk-QR24DJDF.cjs} +13 -13
- package/dist/{chunk-OM6RIOA5.cjs.map → chunk-QR24DJDF.cjs.map} +1 -1
- package/dist/{chunk-YPVQYM3L.js → chunk-QRNYDV5Z.js} +138 -31
- package/dist/chunk-QRNYDV5Z.js.map +1 -0
- package/dist/{chunk-ZOHCFYXE.js → chunk-QT6V3YRH.js} +3 -3
- package/dist/{chunk-ZOHCFYXE.js.map → chunk-QT6V3YRH.js.map} +1 -1
- package/dist/{chunk-5C75HQYQ.js → chunk-RFRM3Q5K.js} +17 -5
- package/dist/chunk-RFRM3Q5K.js.map +1 -0
- package/dist/{chunk-NXIZL7ZZ.js → chunk-RUQS6M7G.js} +6 -6
- package/dist/chunk-RUQS6M7G.js.map +1 -0
- package/dist/{chunk-CI5NPLXX.js → chunk-S3ZRKJHY.js} +3 -3
- package/dist/{chunk-CI5NPLXX.js.map → chunk-S3ZRKJHY.js.map} +1 -1
- package/dist/{chunk-3V6D5DEC.js → chunk-S4KQ5LV4.js} +3 -3
- package/dist/{chunk-3V6D5DEC.js.map → chunk-S4KQ5LV4.js.map} +1 -1
- package/dist/{chunk-CTWZPYJW.js → chunk-TKORQCG4.js} +108 -15
- package/dist/chunk-TKORQCG4.js.map +1 -0
- package/dist/{chunk-2HKIID5K.js → chunk-TKP5T34P.js} +4 -5
- package/dist/chunk-TKP5T34P.js.map +1 -0
- package/dist/{chunk-X2XOQZT3.cjs → chunk-U5W4LKZV.cjs} +13 -9
- package/dist/chunk-U5W4LKZV.cjs.map +1 -0
- package/dist/{chunk-BLBG2VZ5.cjs → chunk-UCQ3BFSY.cjs} +372 -110
- package/dist/chunk-UCQ3BFSY.cjs.map +1 -0
- package/dist/{chunk-CUPJL6TS.js → chunk-V34A6R5V.js} +13 -4
- package/dist/chunk-V34A6R5V.js.map +1 -0
- package/dist/{chunk-LQLVJWUH.js → chunk-VTN3C3CH.js} +7 -7
- package/dist/chunk-VTN3C3CH.js.map +1 -0
- package/dist/{chunk-FY4VY5EV.cjs → chunk-VVQM4CZD.cjs} +20 -20
- package/dist/chunk-VVQM4CZD.cjs.map +1 -0
- package/dist/{chunk-LDCWO5B6.js → chunk-WDAVPX46.js} +3 -3
- package/dist/{chunk-LDCWO5B6.js.map → chunk-WDAVPX46.js.map} +1 -1
- package/dist/{chunk-5GV4JQNA.cjs → chunk-WDBXJOU5.cjs} +55 -43
- package/dist/chunk-WDBXJOU5.cjs.map +1 -0
- package/dist/{chunk-FMPZPOUD.js → chunk-WUFASQUO.js} +3 -3
- package/dist/{chunk-FMPZPOUD.js.map → chunk-WUFASQUO.js.map} +1 -1
- package/dist/{chunk-5ZPRE4CV.cjs → chunk-YDWLUT5V.cjs} +237 -130
- package/dist/chunk-YDWLUT5V.cjs.map +1 -0
- package/dist/{chunk-CVNGKTHO.js → chunk-YMTXMPV6.js} +4 -4
- package/dist/{chunk-CVNGKTHO.js.map → chunk-YMTXMPV6.js.map} +1 -1
- package/dist/{chunk-NDQLPKBX.cjs → chunk-YOALGKRE.cjs} +2092 -1535
- package/dist/chunk-YOALGKRE.cjs.map +1 -0
- package/dist/{chunk-OMQ2NBOR.cjs → chunk-Z3WO6MND.cjs} +27 -27
- package/dist/{chunk-OMQ2NBOR.cjs.map → chunk-Z3WO6MND.cjs.map} +1 -1
- package/dist/{chunk-V2GZBPY2.cjs → chunk-ZI6VQSZA.cjs} +310 -61
- package/dist/chunk-ZI6VQSZA.cjs.map +1 -0
- package/dist/{chunk-ZBV4LQD2.cjs → chunk-ZTAJL4DT.cjs} +4 -4
- package/dist/{chunk-ZBV4LQD2.cjs.map → chunk-ZTAJL4DT.cjs.map} +1 -1
- package/dist/core/index.cjs +27 -28
- package/dist/core/index.d.cts +5 -5
- package/dist/core/index.d.ts +5 -5
- package/dist/core/index.js +7 -8
- package/dist/{ddl-3unqC-kg.d.cts → ddl-BG4J805L.d.cts} +3 -3
- package/dist/{ddl-Bc4Dl8fu.d.ts → ddl-CgiS9QLj.d.ts} +3 -3
- package/dist/{define-graph-DBFnc7u_.d.ts → define-graph-BGrJahvp.d.ts} +1 -1
- package/dist/{define-graph-Byslw2OO.d.cts → define-graph-alREY2wj.d.cts} +1 -1
- package/dist/graph-extension/index.cjs +19 -20
- package/dist/graph-extension/index.d.cts +4 -4
- package/dist/graph-extension/index.d.ts +4 -4
- package/dist/graph-extension/index.js +4 -5
- package/dist/graph-merge/index.cjs +103 -104
- package/dist/graph-merge/index.cjs.map +1 -1
- package/dist/graph-merge/index.d.cts +9 -8
- package/dist/graph-merge/index.d.ts +9 -8
- package/dist/graph-merge/index.js +23 -24
- package/dist/graph-merge/index.js.map +1 -1
- package/dist/{index-DHXw7QAl.d.cts → index-BBxZCUdu.d.ts} +37 -7
- package/dist/{index-DQzVJBHa.d.ts → index-C3y_98iN.d.cts} +37 -7
- package/dist/index.cjs +209 -202
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -13
- package/dist/index.d.ts +13 -13
- package/dist/index.js +33 -34
- package/dist/index.js.map +1 -1
- package/dist/indexes/index.cjs +13 -13
- package/dist/indexes/index.d.cts +4 -4
- package/dist/indexes/index.d.ts +4 -4
- package/dist/indexes/index.js +6 -6
- package/dist/interchange/index.cjs +50 -41
- package/dist/interchange/index.cjs.map +1 -1
- package/dist/interchange/index.d.cts +11 -11
- package/dist/interchange/index.d.ts +11 -11
- package/dist/interchange/index.js +24 -15
- package/dist/interchange/index.js.map +1 -1
- package/dist/{manager-U9_zopqr.d.cts → manager-KS7CGQQT.d.cts} +44 -6
- package/dist/{manager-Dl0-er1G.d.ts → manager-YoLEfcc1.d.ts} +44 -6
- package/dist/{materialize-indexes-BM3u0aXE.d.ts → materialize-indexes-Bhhyb1B3.d.ts} +1 -1
- package/dist/{materialize-indexes-DzMCetZe.d.cts → materialize-indexes-OHRWypW6.d.cts} +1 -1
- package/dist/{postgres-DpJqtbSX.d.cts → postgres-DpkW3R5Y.d.cts} +1 -1
- package/dist/{postgres-C5-WMKFA.d.ts → postgres-DwqyIniy.d.ts} +1 -1
- package/dist/profiler/index.d.cts +10 -9
- package/dist/profiler/index.d.ts +10 -9
- package/dist/provenance/index.cjs +38 -38
- package/dist/provenance/index.cjs.map +1 -1
- package/dist/provenance/index.d.cts +7 -7
- package/dist/provenance/index.d.ts +7 -7
- package/dist/provenance/index.js +8 -8
- package/dist/provenance/index.js.map +1 -1
- package/dist/schema/index.cjs +40 -41
- package/dist/schema/index.d.cts +7 -7
- package/dist/schema/index.d.ts +7 -7
- package/dist/schema/index.js +13 -14
- package/dist/{searchable-B4mUXZT6.d.cts → searchable-CIZL8Hyw.d.cts} +2 -2
- package/dist/{searchable-C7jmPNLT.d.ts → searchable-DLWEfC4a.d.ts} +2 -2
- package/dist/{sqlite-Ch5tSYQY.d.ts → sqlite-DY0WODUK.d.cts} +1 -1
- package/dist/{sqlite-Da7jiYu9.d.cts → sqlite-L-VIRzqA.d.ts} +1 -1
- package/dist/{store-view-DdwBNjZQ.d.ts → store-view-66p92IPi.d.ts} +1974 -1751
- package/dist/{store-view-D1F6KqsE.d.cts → store-view-A85FFRnk.d.cts} +1974 -1751
- package/dist/{temporal-CMpigMCW.d.cts → temporal-BNbjXqer.d.cts} +1 -1
- package/dist/{temporal-BtrTYTiB.d.ts → temporal-Bob6Nfbp.d.ts} +1 -1
- package/dist/{types-Dh-EgT-w.d.cts → types-Ch9a0Dx6.d.cts} +483 -20
- package/dist/{types-Dh-EgT-w.d.ts → types-Ch9a0Dx6.d.ts} +483 -20
- package/dist/{types-D2rU5Taq.d.ts → types-ClCzT-dT.d.ts} +1 -1
- package/dist/{types-G4sVM-76.d.cts → types-DeORZhxn.d.cts} +1 -1
- package/dist/{where-DbZ9XDOI.d.cts → where-DPw52ksb.d.cts} +1 -1
- package/dist/{where-B8Y21kig.d.ts → where-kWUZPvEA.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/chunk-2HKIID5K.js.map +0 -1
- package/dist/chunk-33PAKPED.cjs.map +0 -1
- package/dist/chunk-42XYPKZU.js.map +0 -1
- package/dist/chunk-4WYFRACU.js.map +0 -1
- package/dist/chunk-5C75HQYQ.js.map +0 -1
- package/dist/chunk-5GV4JQNA.cjs.map +0 -1
- package/dist/chunk-5Q3P6OIC.cjs.map +0 -1
- package/dist/chunk-5ZPRE4CV.cjs.map +0 -1
- package/dist/chunk-64LERBFM.cjs.map +0 -1
- package/dist/chunk-AO2WPYFZ.cjs.map +0 -1
- package/dist/chunk-BLBG2VZ5.cjs.map +0 -1
- package/dist/chunk-CTWZPYJW.js.map +0 -1
- package/dist/chunk-CUPJL6TS.js.map +0 -1
- package/dist/chunk-DMZEVJGL.cjs.map +0 -1
- package/dist/chunk-ECU53PMN.cjs.map +0 -1
- package/dist/chunk-EQOQOT55.js.map +0 -1
- package/dist/chunk-F2KVJ6FF.cjs.map +0 -1
- package/dist/chunk-F7TDKSVB.cjs +0 -61
- package/dist/chunk-F7TDKSVB.cjs.map +0 -1
- package/dist/chunk-FFQGI67R.cjs.map +0 -1
- package/dist/chunk-FY4VY5EV.cjs.map +0 -1
- package/dist/chunk-HHBKGPEI.js.map +0 -1
- package/dist/chunk-JNXZQBN3.js.map +0 -1
- package/dist/chunk-KDRF3NR2.cjs.map +0 -1
- package/dist/chunk-KTBTSHU6.cjs.map +0 -1
- package/dist/chunk-L2BYRYHC.js.map +0 -1
- package/dist/chunk-L5AUCL5P.js.map +0 -1
- package/dist/chunk-LQLVJWUH.js.map +0 -1
- package/dist/chunk-M4GYQF2H.js.map +0 -1
- package/dist/chunk-NDQLPKBX.cjs.map +0 -1
- package/dist/chunk-NXIZL7ZZ.js.map +0 -1
- package/dist/chunk-O2GZM7UK.cjs.map +0 -1
- package/dist/chunk-O7XVCLXW.cjs.map +0 -1
- package/dist/chunk-OYJSYDIH.js.map +0 -1
- package/dist/chunk-RAWG2FEU.js.map +0 -1
- package/dist/chunk-RXOAXO3R.js +0 -59
- package/dist/chunk-RXOAXO3R.js.map +0 -1
- package/dist/chunk-U3YRCZ5L.cjs +0 -12
- package/dist/chunk-UTTW2Q3M.cjs.map +0 -1
- package/dist/chunk-UZLEQFTV.js.map +0 -1
- package/dist/chunk-V2GZBPY2.cjs.map +0 -1
- package/dist/chunk-VC26BUNP.js.map +0 -1
- package/dist/chunk-VGMNGWBR.cjs +0 -12
- package/dist/chunk-X2XOQZT3.cjs.map +0 -1
- package/dist/chunk-XDMPDUKL.cjs.map +0 -1
- package/dist/chunk-YPVQYM3L.js.map +0 -1
- package/dist/chunk-ZGOUVMVS.js.map +0 -1
- package/dist/chunk-ZIRC2U6G.js.map +0 -1
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
3
|
+
var chunkH7VE3FL4_cjs = require('./chunk-H7VE3FL4.cjs');
|
|
4
|
+
var chunkF4NHQHEZ_cjs = require('./chunk-F4NHQHEZ.cjs');
|
|
5
|
+
var chunkZ3WO6MND_cjs = require('./chunk-Z3WO6MND.cjs');
|
|
6
|
+
var chunkOOA273IJ_cjs = require('./chunk-OOA273IJ.cjs');
|
|
7
7
|
var chunkZDH3DX3C_cjs = require('./chunk-ZDH3DX3C.cjs');
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
8
|
+
var chunkEKFUG4G7_cjs = require('./chunk-EKFUG4G7.cjs');
|
|
9
|
+
var chunkJQXSZHF2_cjs = require('./chunk-JQXSZHF2.cjs');
|
|
10
|
+
var chunkJXUTCSXX_cjs = require('./chunk-JXUTCSXX.cjs');
|
|
11
|
+
var chunkU5W4LKZV_cjs = require('./chunk-U5W4LKZV.cjs');
|
|
12
|
+
var chunk764JHTLT_cjs = require('./chunk-764JHTLT.cjs');
|
|
13
|
+
var chunkC4F7VJ5D_cjs = require('./chunk-C4F7VJ5D.cjs');
|
|
13
14
|
var drizzleOrm = require('drizzle-orm');
|
|
14
15
|
var sqliteCore = require('drizzle-orm/sqlite-core');
|
|
15
16
|
|
|
@@ -100,14 +101,14 @@ function hasModernBindLimitByVersion(rows) {
|
|
|
100
101
|
}
|
|
101
102
|
function detectHardMaxBindParameters(transactionMode, hostedPlatform) {
|
|
102
103
|
if (hostedPlatform === "durable-object" || transactionMode === "do-sqlite") {
|
|
103
|
-
return
|
|
104
|
+
return chunkEKFUG4G7_cjs.DURABLE_OBJECT_MAX_BIND_PARAMETERS;
|
|
104
105
|
}
|
|
105
|
-
if (hostedPlatform === "d1") return
|
|
106
|
+
if (hostedPlatform === "d1") return chunkEKFUG4G7_cjs.D1_MAX_BIND_PARAMETERS;
|
|
106
107
|
return void 0;
|
|
107
108
|
}
|
|
108
109
|
function detectMaxBindParameters(sqliteClient, hardMaxBindParameters) {
|
|
109
110
|
if (hardMaxBindParameters !== void 0) return hardMaxBindParameters;
|
|
110
|
-
if (sqliteClient === void 0) return
|
|
111
|
+
if (sqliteClient === void 0) return chunkEKFUG4G7_cjs.SQLITE_MAX_BIND_PARAMETERS;
|
|
111
112
|
try {
|
|
112
113
|
const compiled = parseCompiledMaxVariableNumber(
|
|
113
114
|
sqliteClient.prepare("PRAGMA compile_options").all()
|
|
@@ -116,9 +117,9 @@ function detectMaxBindParameters(sqliteClient, hardMaxBindParameters) {
|
|
|
116
117
|
const isModern = hasModernBindLimitByVersion(
|
|
117
118
|
sqliteClient.prepare("SELECT sqlite_version() AS version").all()
|
|
118
119
|
);
|
|
119
|
-
return isModern ?
|
|
120
|
+
return isModern ? chunkEKFUG4G7_cjs.MODERN_SQLITE_MAX_BIND_PARAMETERS : chunkEKFUG4G7_cjs.SQLITE_MAX_BIND_PARAMETERS;
|
|
120
121
|
} catch {
|
|
121
|
-
return
|
|
122
|
+
return chunkEKFUG4G7_cjs.SQLITE_MAX_BIND_PARAMETERS;
|
|
122
123
|
}
|
|
123
124
|
}
|
|
124
125
|
function resolveSqliteClient(db) {
|
|
@@ -129,7 +130,7 @@ function resolveSqliteClient(db) {
|
|
|
129
130
|
return sqliteClient;
|
|
130
131
|
}
|
|
131
132
|
function getOrCreatePreparedStatement(cache, sqliteClient, sqlText, cacheMax) {
|
|
132
|
-
return
|
|
133
|
+
return chunkH7VE3FL4_cjs.getOrCreateLru(
|
|
133
134
|
cache,
|
|
134
135
|
sqlText,
|
|
135
136
|
cacheMax,
|
|
@@ -181,7 +182,7 @@ function createSqliteExecutionAdapter(db, statementCacheMaxOrOptions = {}) {
|
|
|
181
182
|
supportsCompiledExecution: sqliteClient !== void 0,
|
|
182
183
|
transactionMode
|
|
183
184
|
};
|
|
184
|
-
const compile = (query) =>
|
|
185
|
+
const compile = (query) => chunkOOA273IJ_cjs.compileQueryWithDialect(db, query, "SQLite");
|
|
185
186
|
if (sqliteClient !== void 0) {
|
|
186
187
|
let executeCompiled2 = function(compiledQuery) {
|
|
187
188
|
const preparedStatement = getOrCreatePreparedStatement(
|
|
@@ -254,7 +255,7 @@ function createSqliteExecutionAdapter(db, statementCacheMaxOrOptions = {}) {
|
|
|
254
255
|
execute(query) {
|
|
255
256
|
return executeDrizzleQuery(
|
|
256
257
|
db,
|
|
257
|
-
|
|
258
|
+
chunkU5W4LKZV_cjs.isSqlFragment(query) ? chunkOOA273IJ_cjs.toDrizzleSql(query, "sqlite") : query
|
|
258
259
|
);
|
|
259
260
|
},
|
|
260
261
|
profile
|
|
@@ -269,6 +270,7 @@ var GET_EDGES_FIXED_PARAM_COUNT = 1;
|
|
|
269
270
|
var CHECK_UNIQUE_BATCH_FIXED_PARAM_COUNT = 3;
|
|
270
271
|
var FULLTEXT_UPSERT_PARAM_COUNT = 6;
|
|
271
272
|
var FULLTEXT_DELETE_FIXED_PARAM_COUNT = 2;
|
|
273
|
+
var UNIQUE_DELETE_FIXED_PARAM_COUNT = 2;
|
|
272
274
|
var UNIQUE_INSERT_PARAM_COUNT = 6;
|
|
273
275
|
var SQLITE_ANALYZE_ROW_LIMIT = 1e3;
|
|
274
276
|
function computeSqliteBatchChunkSizes(maxBindParameters) {
|
|
@@ -279,7 +281,7 @@ function computeSqliteBatchChunkSizes(maxBindParameters) {
|
|
|
279
281
|
),
|
|
280
282
|
embeddingUpsertBatchSize: Math.max(
|
|
281
283
|
1,
|
|
282
|
-
Math.floor(maxBindParameters /
|
|
284
|
+
Math.floor(maxBindParameters / chunkH7VE3FL4_cjs.EMBEDDING_UPSERT_PARAM_COUNT)
|
|
283
285
|
),
|
|
284
286
|
fulltextUpsertBatchSize: Math.max(
|
|
285
287
|
1,
|
|
@@ -293,6 +295,10 @@ function computeSqliteBatchChunkSizes(maxBindParameters) {
|
|
|
293
295
|
1,
|
|
294
296
|
Math.floor(maxBindParameters / EDGE_INSERT_PARAM_COUNT)
|
|
295
297
|
),
|
|
298
|
+
findEdgesEndpointChunkSize: Math.max(
|
|
299
|
+
1,
|
|
300
|
+
maxBindParameters - chunkH7VE3FL4_cjs.FIND_EDGES_ENDPOINT_FIXED_PARAM_COUNT
|
|
301
|
+
),
|
|
296
302
|
getEdgesChunkSize: Math.max(
|
|
297
303
|
1,
|
|
298
304
|
maxBindParameters - GET_EDGES_FIXED_PARAM_COUNT
|
|
@@ -305,17 +311,21 @@ function computeSqliteBatchChunkSizes(maxBindParameters) {
|
|
|
305
311
|
1,
|
|
306
312
|
Math.floor(maxBindParameters / NODE_INSERT_PARAM_COUNT)
|
|
307
313
|
),
|
|
314
|
+
uniqueDeleteChunkSize: Math.max(
|
|
315
|
+
1,
|
|
316
|
+
maxBindParameters - UNIQUE_DELETE_FIXED_PARAM_COUNT
|
|
317
|
+
),
|
|
308
318
|
uniqueInsertBatchSize: Math.max(
|
|
309
319
|
1,
|
|
310
320
|
Math.floor(maxBindParameters / UNIQUE_INSERT_PARAM_COUNT)
|
|
311
321
|
)
|
|
312
322
|
};
|
|
313
323
|
}
|
|
314
|
-
var toNodeRow =
|
|
315
|
-
var toEdgeRow =
|
|
316
|
-
var toUniqueRow =
|
|
317
|
-
var toSchemaVersionRow =
|
|
318
|
-
|
|
324
|
+
var toNodeRow = chunkF4NHQHEZ_cjs.createNodeRowMapper(chunkF4NHQHEZ_cjs.SQLITE_ROW_MAPPER_CONFIG);
|
|
325
|
+
var toEdgeRow = chunkF4NHQHEZ_cjs.createEdgeRowMapper(chunkF4NHQHEZ_cjs.SQLITE_ROW_MAPPER_CONFIG);
|
|
326
|
+
var toUniqueRow = chunkF4NHQHEZ_cjs.createUniqueRowMapper(chunkF4NHQHEZ_cjs.SQLITE_ROW_MAPPER_CONFIG);
|
|
327
|
+
var toSchemaVersionRow = chunkF4NHQHEZ_cjs.createSchemaVersionRowMapper(
|
|
328
|
+
chunkF4NHQHEZ_cjs.SQLITE_ROW_MAPPER_CONFIG
|
|
319
329
|
);
|
|
320
330
|
var PENDING_FOREVER = new Promise(noop);
|
|
321
331
|
function pendingForever() {
|
|
@@ -334,7 +344,7 @@ async function loadQueueTaskContext() {
|
|
|
334
344
|
void loadQueueTaskContext();
|
|
335
345
|
function rejectReentrantQueueSubmission() {
|
|
336
346
|
return Promise.reject(
|
|
337
|
-
new
|
|
347
|
+
new chunkC4F7VJ5D_cjs.ConfigurationError(
|
|
338
348
|
"This operation was awaited from inside a transaction running on the same SQLite backend and would deadlock: the transaction holds the backend's serialized execution slot until it completes, so the operation could never run.",
|
|
339
349
|
{ backend: "sqlite", capability: "concurrentRootAccess" },
|
|
340
350
|
{
|
|
@@ -355,7 +365,7 @@ function createSerializedExecutionQueue() {
|
|
|
355
365
|
disposed = true;
|
|
356
366
|
},
|
|
357
367
|
runExclusive(task) {
|
|
358
|
-
if (isDisposed()) return Promise.reject(new
|
|
368
|
+
if (isDisposed()) return Promise.reject(new chunkC4F7VJ5D_cjs.BackendDisposedError());
|
|
359
369
|
if (queueTaskContext?.getStore() === taskMarker) {
|
|
360
370
|
return rejectReentrantQueueSubmission();
|
|
361
371
|
}
|
|
@@ -383,7 +393,7 @@ function runWithSerializedQueue(queue, task) {
|
|
|
383
393
|
return queue.runExclusive(task);
|
|
384
394
|
}
|
|
385
395
|
function throwSqliteTransactionsDisabled(message) {
|
|
386
|
-
throw new
|
|
396
|
+
throw new chunkC4F7VJ5D_cjs.ConfigurationError(message, {
|
|
387
397
|
backend: "sqlite",
|
|
388
398
|
capability: "transactions",
|
|
389
399
|
supportsTransactions: false
|
|
@@ -391,20 +401,20 @@ function throwSqliteTransactionsDisabled(message) {
|
|
|
391
401
|
}
|
|
392
402
|
function buildSqliteCapabilities(options) {
|
|
393
403
|
const base = options.transactionMode === "none" ? {
|
|
394
|
-
...
|
|
404
|
+
...chunkEKFUG4G7_cjs.SQLITE_CAPABILITIES,
|
|
395
405
|
transactions: false,
|
|
396
406
|
graphAnalytics: {
|
|
397
|
-
...
|
|
407
|
+
...chunkEKFUG4G7_cjs.SQLITE_CAPABILITIES.graphAnalytics ?? {
|
|
398
408
|
mathFunctions: false
|
|
399
409
|
},
|
|
400
410
|
supported: false
|
|
401
411
|
}
|
|
402
|
-
} :
|
|
412
|
+
} : chunkEKFUG4G7_cjs.SQLITE_CAPABILITIES;
|
|
403
413
|
return {
|
|
404
414
|
...base,
|
|
405
415
|
maxBindParameters: options.maxBindParameters,
|
|
406
|
-
fulltext:
|
|
407
|
-
...options.vectorStrategy === void 0 ? {} : { vector:
|
|
416
|
+
fulltext: chunkJXUTCSXX_cjs.buildFulltextCapabilities(options.fulltextStrategy),
|
|
417
|
+
...options.vectorStrategy === void 0 ? {} : { vector: chunkJXUTCSXX_cjs.buildVectorCapabilities(options.vectorStrategy) }
|
|
408
418
|
};
|
|
409
419
|
}
|
|
410
420
|
function resolveMaxBindParametersCapability(profile, override) {
|
|
@@ -412,7 +422,7 @@ function resolveMaxBindParametersCapability(profile, override) {
|
|
|
412
422
|
return profile.hardMaxBindParameters === void 0 ? requested : Math.min(requested, profile.hardMaxBindParameters);
|
|
413
423
|
}
|
|
414
424
|
function resolveSqliteGraphAnalyticsCapabilities(profile, override) {
|
|
415
|
-
const requested = override ??
|
|
425
|
+
const requested = override ?? chunkEKFUG4G7_cjs.SQLITE_CAPABILITIES.graphAnalytics ?? {
|
|
416
426
|
supported: false,
|
|
417
427
|
mathFunctions: false
|
|
418
428
|
};
|
|
@@ -431,7 +441,8 @@ function createSqliteOperationBackend(options) {
|
|
|
431
441
|
tableNames,
|
|
432
442
|
fulltextStrategy,
|
|
433
443
|
vectorStrategy,
|
|
434
|
-
contributionMaterializer
|
|
444
|
+
contributionMaterializer,
|
|
445
|
+
transactionScoped
|
|
435
446
|
} = options;
|
|
436
447
|
const compiledExecute = executionAdapter.executeCompiled;
|
|
437
448
|
const compiledRun = executionAdapter.executeCompiledRun;
|
|
@@ -457,7 +468,7 @@ function createSqliteOperationBackend(options) {
|
|
|
457
468
|
return runWithSerializedQueue(serializedQueue, async () => {
|
|
458
469
|
if (compiledRun === void 0) {
|
|
459
470
|
await db.run(
|
|
460
|
-
|
|
471
|
+
chunkU5W4LKZV_cjs.isSqlFragment(query) ? chunkOOA273IJ_cjs.toDrizzleSql(query, "sqlite") : query
|
|
461
472
|
);
|
|
462
473
|
return;
|
|
463
474
|
}
|
|
@@ -465,16 +476,17 @@ function createSqliteOperationBackend(options) {
|
|
|
465
476
|
});
|
|
466
477
|
}
|
|
467
478
|
const batchConfig = computeSqliteBatchChunkSizes(
|
|
468
|
-
capabilities.maxBindParameters ??
|
|
479
|
+
capabilities.maxBindParameters ?? chunkEKFUG4G7_cjs.SQLITE_MAX_BIND_PARAMETERS
|
|
469
480
|
);
|
|
470
|
-
const commonBackend =
|
|
481
|
+
const commonBackend = chunkH7VE3FL4_cjs.createCommonOperationBackend({
|
|
471
482
|
batchConfig,
|
|
472
483
|
execution: {
|
|
473
484
|
execAll,
|
|
474
485
|
execGet,
|
|
475
486
|
execRun
|
|
476
487
|
},
|
|
477
|
-
nowIso:
|
|
488
|
+
nowIso: chunkF4NHQHEZ_cjs.nowIso,
|
|
489
|
+
maxBindParameters: capabilities.maxBindParameters ?? chunkEKFUG4G7_cjs.SQLITE_MAX_BIND_PARAMETERS,
|
|
478
490
|
operationStrategy,
|
|
479
491
|
rowMappers: {
|
|
480
492
|
toEdgeRow,
|
|
@@ -494,26 +506,26 @@ function createSqliteOperationBackend(options) {
|
|
|
494
506
|
};
|
|
495
507
|
const vectorEmbeddingMethods = vectorStrategy === void 0 ? {} : {
|
|
496
508
|
async upsertEmbedding(params) {
|
|
497
|
-
const slot =
|
|
509
|
+
const slot = chunkH7VE3FL4_cjs.vectorSlotFromParams(params);
|
|
498
510
|
await contributionMaterializer.assertVectorSlot(slot);
|
|
499
|
-
const statements = vectorStrategy.buildUpsert(slot, params,
|
|
511
|
+
const statements = vectorStrategy.buildUpsert(slot, params, chunkF4NHQHEZ_cjs.nowIso());
|
|
500
512
|
try {
|
|
501
513
|
for (const statement of statements) {
|
|
502
514
|
await execRun(statement);
|
|
503
515
|
}
|
|
504
516
|
} catch (error) {
|
|
505
|
-
throw
|
|
517
|
+
throw chunkH7VE3FL4_cjs.mapVectorWriteError(error, params);
|
|
506
518
|
}
|
|
507
519
|
},
|
|
508
520
|
async upsertEmbeddingBatch(params) {
|
|
509
521
|
if (params.rows.length === 0) return;
|
|
510
|
-
const slot =
|
|
522
|
+
const slot = chunkH7VE3FL4_cjs.vectorSlotFromParams(params);
|
|
511
523
|
await contributionMaterializer.assertVectorSlot(slot);
|
|
512
524
|
const rowsById = new Map(
|
|
513
525
|
params.rows.map((row) => [row.nodeId, row])
|
|
514
526
|
);
|
|
515
527
|
const rows = [...rowsById.values()];
|
|
516
|
-
const timestamp =
|
|
528
|
+
const timestamp = chunkF4NHQHEZ_cjs.nowIso();
|
|
517
529
|
try {
|
|
518
530
|
for (const chunk2 of chunkZDH3DX3C_cjs.chunk(
|
|
519
531
|
rows,
|
|
@@ -544,37 +556,52 @@ function createSqliteOperationBackend(options) {
|
|
|
544
556
|
}
|
|
545
557
|
}
|
|
546
558
|
} catch (error) {
|
|
547
|
-
throw
|
|
559
|
+
throw chunkH7VE3FL4_cjs.mapVectorWriteError(error, params);
|
|
548
560
|
}
|
|
549
561
|
},
|
|
550
562
|
async deleteEmbedding(params) {
|
|
551
|
-
const slot =
|
|
563
|
+
const slot = chunkH7VE3FL4_cjs.vectorSlotFromParams(params);
|
|
552
564
|
await contributionMaterializer.assertVectorSlot(slot);
|
|
553
565
|
const statements = vectorStrategy.buildDelete(slot, params);
|
|
554
566
|
for (const statement of statements) {
|
|
555
567
|
await execRun(statement);
|
|
556
568
|
}
|
|
557
569
|
},
|
|
570
|
+
async deleteEmbeddingBatch(params) {
|
|
571
|
+
if (params.nodeIds.length === 0) return;
|
|
572
|
+
const slot = chunkH7VE3FL4_cjs.vectorSlotFromParams(params);
|
|
573
|
+
await contributionMaterializer.assertVectorSlot(slot);
|
|
574
|
+
for (const nodeIds of chunkZDH3DX3C_cjs.chunk(
|
|
575
|
+
[...new Set(params.nodeIds)],
|
|
576
|
+
batchConfig.embeddingUpsertBatchSize
|
|
577
|
+
)) {
|
|
578
|
+
const statements = vectorStrategy.buildDeleteBatch(slot, {
|
|
579
|
+
...params,
|
|
580
|
+
nodeIds
|
|
581
|
+
});
|
|
582
|
+
for (const statement of statements) await execRun(statement);
|
|
583
|
+
}
|
|
584
|
+
},
|
|
558
585
|
async vectorSearch(params) {
|
|
559
|
-
|
|
560
|
-
const slot =
|
|
586
|
+
chunkJXUTCSXX_cjs.assertVectorSearchLimit(params.limit);
|
|
587
|
+
const slot = chunkH7VE3FL4_cjs.vectorSlotFromParams(params);
|
|
561
588
|
const query = vectorStrategy.buildSearch(
|
|
562
589
|
slot,
|
|
563
590
|
params,
|
|
564
591
|
// Store-compiled candidates (predicates + subclass + currency)
|
|
565
592
|
// take precedence; the live-node default covers direct backend use.
|
|
566
|
-
params.candidates ??
|
|
593
|
+
params.candidates ?? chunkH7VE3FL4_cjs.buildLiveNodeCandidates(
|
|
567
594
|
tableNames.nodes,
|
|
568
595
|
params.graphId,
|
|
569
596
|
params.nodeKind,
|
|
570
|
-
|
|
597
|
+
chunkF4NHQHEZ_cjs.nowIso()
|
|
571
598
|
)
|
|
572
599
|
);
|
|
573
600
|
let rows;
|
|
574
601
|
try {
|
|
575
602
|
rows = await execAll(query);
|
|
576
603
|
} catch (error) {
|
|
577
|
-
throw
|
|
604
|
+
throw chunkH7VE3FL4_cjs.mapVectorWriteError(error, params);
|
|
578
605
|
}
|
|
579
606
|
return rows.map((row) => ({
|
|
580
607
|
nodeId: row.node_id,
|
|
@@ -586,9 +613,9 @@ function createSqliteOperationBackend(options) {
|
|
|
586
613
|
// fallback by simply not exposing the member.
|
|
587
614
|
...capabilities.windowFunctions ? {
|
|
588
615
|
async hybridSearch(params) {
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
const slot =
|
|
616
|
+
chunkJXUTCSXX_cjs.assertVectorSearchLimit(params.limit);
|
|
617
|
+
chunkJXUTCSXX_cjs.assertVectorSearchLimit(params.vector.k);
|
|
618
|
+
const slot = chunkH7VE3FL4_cjs.vectorSlotFromParams({
|
|
592
619
|
graphId: params.graphId,
|
|
593
620
|
nodeKind: params.nodeKind,
|
|
594
621
|
fieldPath: params.vector.fieldPath,
|
|
@@ -596,11 +623,11 @@ function createSqliteOperationBackend(options) {
|
|
|
596
623
|
metric: params.vector.metric,
|
|
597
624
|
indexType: params.vector.indexType
|
|
598
625
|
});
|
|
599
|
-
const candidates = params.candidates ??
|
|
626
|
+
const candidates = params.candidates ?? chunkH7VE3FL4_cjs.buildLiveNodeCandidates(
|
|
600
627
|
tableNames.nodes,
|
|
601
628
|
params.graphId,
|
|
602
629
|
params.nodeKind,
|
|
603
|
-
|
|
630
|
+
chunkF4NHQHEZ_cjs.nowIso()
|
|
604
631
|
);
|
|
605
632
|
const vectorParams = {
|
|
606
633
|
graphId: params.graphId,
|
|
@@ -616,20 +643,20 @@ function createSqliteOperationBackend(options) {
|
|
|
616
643
|
const vectorSql = vectorStrategy.buildSearch(
|
|
617
644
|
slot,
|
|
618
645
|
vectorParams,
|
|
619
|
-
|
|
646
|
+
chunkU5W4LKZV_cjs.sql.raw("SELECT node_id FROM tg_hybrid_cand")
|
|
620
647
|
);
|
|
621
648
|
const statement = operationStrategy.buildHybridSearch(
|
|
622
649
|
{ ...params, candidates },
|
|
623
|
-
|
|
650
|
+
chunkOOA273IJ_cjs.toDrizzleSql(vectorSql, "sqlite"),
|
|
624
651
|
params.vector.metric === "cosine"
|
|
625
652
|
);
|
|
626
653
|
let raw;
|
|
627
654
|
try {
|
|
628
655
|
raw = await execAll(statement);
|
|
629
656
|
} catch (error) {
|
|
630
|
-
throw
|
|
657
|
+
throw chunkH7VE3FL4_cjs.mapVectorWriteError(error, vectorParams);
|
|
631
658
|
}
|
|
632
|
-
return raw.map((row) =>
|
|
659
|
+
return raw.map((row) => chunkH7VE3FL4_cjs.mapHybridSearchRow(row, toNodeRow));
|
|
633
660
|
}
|
|
634
661
|
} : {}
|
|
635
662
|
};
|
|
@@ -637,14 +664,45 @@ function createSqliteOperationBackend(options) {
|
|
|
637
664
|
...commonBackend,
|
|
638
665
|
...executeRawMethod,
|
|
639
666
|
...vectorEmbeddingMethods,
|
|
667
|
+
async deleteSchemaVectorSlotContribution(slot) {
|
|
668
|
+
if (vectorStrategy === void 0) return;
|
|
669
|
+
for (const contribution of vectorStrategy.ownedTables(slot)) {
|
|
670
|
+
await execRun(
|
|
671
|
+
operationStrategy.buildDeleteContributionMaterialization({
|
|
672
|
+
graphId: slot.graphId,
|
|
673
|
+
logicalName: contribution.logicalName,
|
|
674
|
+
owner: contribution.owner,
|
|
675
|
+
tableName: contribution.tableName
|
|
676
|
+
})
|
|
677
|
+
);
|
|
678
|
+
}
|
|
679
|
+
contributionMaterializer.evictVectorSlot(slot);
|
|
680
|
+
},
|
|
640
681
|
capabilities,
|
|
641
682
|
dialect: "sqlite",
|
|
642
683
|
tableNames,
|
|
643
684
|
fulltextStrategy,
|
|
644
685
|
...vectorStrategy === void 0 ? {} : { vectorStrategy },
|
|
686
|
+
async lockSchemaVersionForWrite(params) {
|
|
687
|
+
if (!transactionScoped) {
|
|
688
|
+
throw new chunkC4F7VJ5D_cjs.ConfigurationError(
|
|
689
|
+
"The schema write fence requires an explicit SQLite transaction.",
|
|
690
|
+
{
|
|
691
|
+
code: "SCHEMA_WRITE_FENCE_TRANSACTION_REQUIRED",
|
|
692
|
+
graphId: params.graphId
|
|
693
|
+
}
|
|
694
|
+
);
|
|
695
|
+
}
|
|
696
|
+
const active = await commonBackend.getActiveSchema(params.graphId);
|
|
697
|
+
chunkH7VE3FL4_cjs.assertActiveSchemaVersion(
|
|
698
|
+
params.graphId,
|
|
699
|
+
params.expectedVersion,
|
|
700
|
+
active?.version ?? 0
|
|
701
|
+
);
|
|
702
|
+
},
|
|
645
703
|
async createVectorIndex(params) {
|
|
646
704
|
if (vectorStrategy === void 0) return;
|
|
647
|
-
const slot =
|
|
705
|
+
const slot = chunkH7VE3FL4_cjs.vectorSlotFromCreateIndexParams(params);
|
|
648
706
|
await contributionMaterializer.ensureVectorSlot(slot);
|
|
649
707
|
const indexStatement = vectorStrategy.buildCreateIndex?.(slot);
|
|
650
708
|
if (indexStatement !== void 0) {
|
|
@@ -653,18 +711,18 @@ function createSqliteOperationBackend(options) {
|
|
|
653
711
|
},
|
|
654
712
|
async dropVectorIndex(params) {
|
|
655
713
|
if (vectorStrategy === void 0) return;
|
|
656
|
-
const slot =
|
|
714
|
+
const slot = chunkH7VE3FL4_cjs.vectorSlotFromDropIndexParams(params);
|
|
657
715
|
const dropStatement = vectorStrategy.buildDropIndex?.(slot);
|
|
658
716
|
if (dropStatement === void 0) return;
|
|
659
717
|
try {
|
|
660
718
|
await execRun(dropStatement);
|
|
661
719
|
} catch (error) {
|
|
662
|
-
if (!
|
|
720
|
+
if (!chunkJQXSZHF2_cjs.isMissingTableError(error)) throw error;
|
|
663
721
|
}
|
|
664
722
|
},
|
|
665
723
|
// === Fulltext Operations ===
|
|
666
724
|
async upsertFulltext(params) {
|
|
667
|
-
const timestamp =
|
|
725
|
+
const timestamp = chunkF4NHQHEZ_cjs.nowIso();
|
|
668
726
|
const statements = operationStrategy.buildUpsertFulltext(
|
|
669
727
|
params,
|
|
670
728
|
timestamp
|
|
@@ -681,7 +739,7 @@ function createSqliteOperationBackend(options) {
|
|
|
681
739
|
},
|
|
682
740
|
async upsertFulltextBatch(params) {
|
|
683
741
|
if (params.rows.length === 0) return;
|
|
684
|
-
const timestamp =
|
|
742
|
+
const timestamp = chunkF4NHQHEZ_cjs.nowIso();
|
|
685
743
|
for (const rows of chunkZDH3DX3C_cjs.chunk(
|
|
686
744
|
params.rows,
|
|
687
745
|
batchConfig.fulltextUpsertBatchSize
|
|
@@ -715,7 +773,7 @@ function createSqliteOperationBackend(options) {
|
|
|
715
773
|
const rows = await execAll(query);
|
|
716
774
|
return rows.map((row, index) => ({
|
|
717
775
|
nodeId: row.node_id,
|
|
718
|
-
score:
|
|
776
|
+
score: chunkF4NHQHEZ_cjs.coerceNumericScore(row.score),
|
|
719
777
|
rank: index + 1,
|
|
720
778
|
...row.snippet === null ? {} : { snippet: row.snippet }
|
|
721
779
|
}));
|
|
@@ -734,14 +792,14 @@ function createSqliteOperationBackend(options) {
|
|
|
734
792
|
return operationBackend;
|
|
735
793
|
}
|
|
736
794
|
function createSqliteBackend(db, options = {}) {
|
|
737
|
-
const tables2 = options.tables ??
|
|
738
|
-
const fulltextStrategy = options.fulltext ??
|
|
795
|
+
const tables2 = options.tables ?? chunkZ3WO6MND_cjs.tables2;
|
|
796
|
+
const fulltextStrategy = options.fulltext ?? chunkJXUTCSXX_cjs.fts5Strategy;
|
|
739
797
|
const profileHints = options.executionProfile ?? {};
|
|
740
798
|
const executionAdapter = createSqliteExecutionAdapter(db, { profileHints });
|
|
741
799
|
const { isSync, transactionMode } = executionAdapter.profile;
|
|
742
800
|
const vectorStrategy = options.vector;
|
|
743
801
|
const capabilityOverrides = options.capabilities ?? {};
|
|
744
|
-
const capabilities =
|
|
802
|
+
const capabilities = chunkEKFUG4G7_cjs.normalizeGraphAnalyticsCapabilities({
|
|
745
803
|
...buildSqliteCapabilities({
|
|
746
804
|
fulltextStrategy,
|
|
747
805
|
vectorStrategy,
|
|
@@ -779,14 +837,14 @@ function createSqliteBackend(db, options = {}) {
|
|
|
779
837
|
tableNames.recordedEdges,
|
|
780
838
|
tableNames.recordedClock
|
|
781
839
|
];
|
|
782
|
-
const operationStrategy =
|
|
840
|
+
const operationStrategy = chunkH7VE3FL4_cjs.createSqliteOperationStrategy(
|
|
783
841
|
tables2,
|
|
784
842
|
fulltextStrategy
|
|
785
843
|
);
|
|
786
844
|
const serializedQueue = transactionMode === "none" ? void 0 : createSerializedExecutionQueue();
|
|
787
845
|
const matTable = tables2.contributionMaterializations;
|
|
788
846
|
async function ensureContributionMaterializationsTableImpl() {
|
|
789
|
-
await db.run(drizzleOrm.sql.raw(
|
|
847
|
+
await db.run(drizzleOrm.sql.raw(chunkZ3WO6MND_cjs.generateSqliteCreateTableSQL(matTable)));
|
|
790
848
|
}
|
|
791
849
|
async function getContributionMaterializationRow(identity) {
|
|
792
850
|
const rows = await db.select().from(matTable).where(
|
|
@@ -799,25 +857,25 @@ function createSqliteBackend(db, options = {}) {
|
|
|
799
857
|
);
|
|
800
858
|
const row = rows[0];
|
|
801
859
|
if (row === void 0) return void 0;
|
|
802
|
-
return
|
|
860
|
+
return chunkH7VE3FL4_cjs.mapContributionMaterializationRow(
|
|
803
861
|
row,
|
|
804
|
-
|
|
862
|
+
chunkH7VE3FL4_cjs.SQLITE_CONTRIBUTION_MAT_TIMESTAMPS.decode
|
|
805
863
|
);
|
|
806
864
|
}
|
|
807
865
|
async function getContributionMaterializationRows(graphId) {
|
|
808
866
|
const rows = await db.select().from(matTable).where(drizzleOrm.eq(matTable.graphId, graphId));
|
|
809
867
|
return rows.map(
|
|
810
|
-
(row) =>
|
|
868
|
+
(row) => chunkH7VE3FL4_cjs.mapContributionMaterializationRow(
|
|
811
869
|
row,
|
|
812
|
-
|
|
870
|
+
chunkH7VE3FL4_cjs.SQLITE_CONTRIBUTION_MAT_TIMESTAMPS.decode
|
|
813
871
|
)
|
|
814
872
|
);
|
|
815
873
|
}
|
|
816
874
|
async function recordContributionMaterializationRow(params) {
|
|
817
875
|
await db.insert(matTable).values(
|
|
818
|
-
|
|
876
|
+
chunkH7VE3FL4_cjs.buildContributionInsertValues(
|
|
819
877
|
params,
|
|
820
|
-
|
|
878
|
+
chunkH7VE3FL4_cjs.SQLITE_CONTRIBUTION_MAT_TIMESTAMPS.encode
|
|
821
879
|
)
|
|
822
880
|
).onConflictDoUpdate({
|
|
823
881
|
target: [
|
|
@@ -826,7 +884,7 @@ function createSqliteBackend(db, options = {}) {
|
|
|
826
884
|
matTable.owner,
|
|
827
885
|
matTable.tableName
|
|
828
886
|
],
|
|
829
|
-
set:
|
|
887
|
+
set: chunkH7VE3FL4_cjs.buildContributionOnConflictSet(
|
|
830
888
|
matTable.materializedAt,
|
|
831
889
|
params.materializedAt
|
|
832
890
|
)
|
|
@@ -842,7 +900,13 @@ function createSqliteBackend(db, options = {}) {
|
|
|
842
900
|
)
|
|
843
901
|
);
|
|
844
902
|
}
|
|
845
|
-
|
|
903
|
+
async function contributionTableExists(tableName) {
|
|
904
|
+
const rows = await executionAdapter.execute(
|
|
905
|
+
operationStrategy.buildTableExists(tableName)
|
|
906
|
+
);
|
|
907
|
+
return chunkH7VE3FL4_cjs.tableExistsFromRow(rows[0]);
|
|
908
|
+
}
|
|
909
|
+
const contributionMaterializer = chunkH7VE3FL4_cjs.createContributionMaterializer({
|
|
846
910
|
dialect: "sqlite",
|
|
847
911
|
fulltextStrategy,
|
|
848
912
|
fulltextTableName: tables2.fulltextTableName,
|
|
@@ -853,7 +917,8 @@ function createSqliteBackend(db, options = {}) {
|
|
|
853
917
|
ensureMarkerTable: ensureContributionMaterializationsTableImpl,
|
|
854
918
|
getMarkers: getContributionMaterializationRows,
|
|
855
919
|
recordMarker: recordContributionMaterializationRow,
|
|
856
|
-
deleteMarker: deleteContributionMaterializationRow
|
|
920
|
+
deleteMarker: deleteContributionMaterializationRow,
|
|
921
|
+
tableExists: contributionTableExists
|
|
857
922
|
});
|
|
858
923
|
const operations = createSqliteOperationBackend({
|
|
859
924
|
capabilities,
|
|
@@ -864,6 +929,7 @@ function createSqliteBackend(db, options = {}) {
|
|
|
864
929
|
fulltextStrategy,
|
|
865
930
|
vectorStrategy,
|
|
866
931
|
contributionMaterializer,
|
|
932
|
+
transactionScoped: false,
|
|
867
933
|
...serializedQueue === void 0 ? {} : { serializedQueue }
|
|
868
934
|
});
|
|
869
935
|
function runDoSqliteStorageTransaction(run) {
|
|
@@ -889,7 +955,7 @@ function createSqliteBackend(db, options = {}) {
|
|
|
889
955
|
function runSchemaWriteTransaction(fn) {
|
|
890
956
|
if (transactionMode === "none") {
|
|
891
957
|
throwSqliteTransactionsDisabled(
|
|
892
|
-
"
|
|
958
|
+
"Schema writes and removal cleanup require atomic transactions, but this SQLite backend has transactions disabled. Configure a driver that supports transactions (better-sqlite3, libsql, bun:sqlite) to use schema commits."
|
|
893
959
|
);
|
|
894
960
|
}
|
|
895
961
|
if (transactionMode === "sql") {
|
|
@@ -962,36 +1028,41 @@ function createSqliteBackend(db, options = {}) {
|
|
|
962
1028
|
vectorStrategy,
|
|
963
1029
|
contributionMaterializer
|
|
964
1030
|
});
|
|
965
|
-
return
|
|
1031
|
+
return chunkH7VE3FL4_cjs.gateFulltext(txBackend, contributionMaterializer.assertInitialized);
|
|
966
1032
|
}
|
|
967
1033
|
const backend = {
|
|
968
1034
|
...operations,
|
|
969
1035
|
...isSync && transactionMode === "sql" && executionAdapter.executePreparedRunBatch !== void 0 ? {
|
|
970
|
-
async trustedImport(fn) {
|
|
1036
|
+
async trustedImport(fn, options_) {
|
|
971
1037
|
return backend.transaction(async (tx) => {
|
|
972
|
-
|
|
973
|
-
|
|
1038
|
+
if (options_?.schemaWrite !== void 0) {
|
|
1039
|
+
await chunk764JHTLT_cjs.requireDefined(tx.lockSchemaVersionForWrite)({
|
|
1040
|
+
...options_.schemaWrite
|
|
1041
|
+
});
|
|
1042
|
+
}
|
|
1043
|
+
await chunkH7VE3FL4_cjs.assertTrustedImportDatabaseEmpty(tx, tableNames);
|
|
1044
|
+
const indexDefinitions = await chunkH7VE3FL4_cjs.suspendSqliteSecondaryIndexes(
|
|
974
1045
|
tx,
|
|
975
1046
|
tableNames
|
|
976
1047
|
);
|
|
977
1048
|
const result = await fn(
|
|
978
|
-
|
|
1049
|
+
chunkH7VE3FL4_cjs.createSqliteTrustedImportSession(executionAdapter, tableNames)
|
|
979
1050
|
);
|
|
980
|
-
await
|
|
981
|
-
await
|
|
1051
|
+
await chunkH7VE3FL4_cjs.restoreSecondaryIndexes(tx, indexDefinitions);
|
|
1052
|
+
await chunkH7VE3FL4_cjs.analyzeImportedTables(tx, tableNames);
|
|
982
1053
|
return result;
|
|
983
1054
|
});
|
|
984
1055
|
}
|
|
985
1056
|
} : {},
|
|
986
1057
|
async bootstrapTables() {
|
|
987
|
-
const statements =
|
|
1058
|
+
const statements = chunkZ3WO6MND_cjs.generateSqliteDDL(tables2, fulltextStrategy);
|
|
988
1059
|
for (const statement of statements) {
|
|
989
1060
|
await db.run(drizzleOrm.sql.raw(statement));
|
|
990
1061
|
}
|
|
991
1062
|
},
|
|
992
1063
|
async ensureRevisionOriginsTable() {
|
|
993
1064
|
await db.run(
|
|
994
|
-
drizzleOrm.sql.raw(
|
|
1065
|
+
drizzleOrm.sql.raw(chunkZ3WO6MND_cjs.generateSqliteCreateTableSQL(tables2.revisionOrigins))
|
|
995
1066
|
);
|
|
996
1067
|
},
|
|
997
1068
|
// Every fulltext-touching method asserts the durable marker instead
|
|
@@ -999,7 +1070,7 @@ function createSqliteBackend(db, options = {}) {
|
|
|
999
1070
|
// uninitialized database throws `StoreNotInitializedError` rather
|
|
1000
1071
|
// than self-healing (#135). Shared verbatim with the tx-scoped gate
|
|
1001
1072
|
// via `gateFulltextMethods`.
|
|
1002
|
-
...
|
|
1073
|
+
...chunkH7VE3FL4_cjs.gateFulltextMethods(
|
|
1003
1074
|
operations,
|
|
1004
1075
|
contributionMaterializer.assertInitialized
|
|
1005
1076
|
),
|
|
@@ -1008,7 +1079,7 @@ function createSqliteBackend(db, options = {}) {
|
|
|
1008
1079
|
},
|
|
1009
1080
|
async ensureIndexMaterializationsTable() {
|
|
1010
1081
|
await db.run(
|
|
1011
|
-
drizzleOrm.sql.raw(
|
|
1082
|
+
drizzleOrm.sql.raw(chunkZ3WO6MND_cjs.generateSqliteCreateTableSQL(tables2.indexMaterializations))
|
|
1012
1083
|
);
|
|
1013
1084
|
},
|
|
1014
1085
|
async getIndexMaterialization(indexName) {
|
|
@@ -1016,26 +1087,26 @@ function createSqliteBackend(db, options = {}) {
|
|
|
1016
1087
|
const rows = await db.select().from(t).where(drizzleOrm.eq(t.indexName, indexName));
|
|
1017
1088
|
const row = rows[0];
|
|
1018
1089
|
if (row === void 0) return void 0;
|
|
1019
|
-
return
|
|
1090
|
+
return chunkH7VE3FL4_cjs.mapMaterializationRow(row, chunkH7VE3FL4_cjs.SQLITE_INDEX_MAT_TIMESTAMPS.decode);
|
|
1020
1091
|
},
|
|
1021
1092
|
async getIndexMaterializations(statusKeys) {
|
|
1022
1093
|
if (statusKeys.length === 0) return [];
|
|
1023
1094
|
const t = tables2.indexMaterializations;
|
|
1024
1095
|
const rows = await db.select().from(t).where(drizzleOrm.inArray(t.indexName, [...statusKeys]));
|
|
1025
1096
|
return rows.map(
|
|
1026
|
-
(row) =>
|
|
1097
|
+
(row) => chunkH7VE3FL4_cjs.mapMaterializationRow(row, chunkH7VE3FL4_cjs.SQLITE_INDEX_MAT_TIMESTAMPS.decode)
|
|
1027
1098
|
);
|
|
1028
1099
|
},
|
|
1029
1100
|
async recordIndexMaterialization(params) {
|
|
1030
1101
|
const t = tables2.indexMaterializations;
|
|
1031
1102
|
await db.insert(t).values(
|
|
1032
|
-
|
|
1103
|
+
chunkH7VE3FL4_cjs.buildMaterializationInsertValues(
|
|
1033
1104
|
params,
|
|
1034
|
-
|
|
1105
|
+
chunkH7VE3FL4_cjs.SQLITE_INDEX_MAT_TIMESTAMPS.encode
|
|
1035
1106
|
)
|
|
1036
1107
|
).onConflictDoUpdate({
|
|
1037
1108
|
target: t.indexName,
|
|
1038
|
-
set:
|
|
1109
|
+
set: chunkH7VE3FL4_cjs.buildMaterializationOnConflictSet(params.materializedAt)
|
|
1039
1110
|
});
|
|
1040
1111
|
},
|
|
1041
1112
|
async ensureContributionMaterializationsTable() {
|
|
@@ -1051,37 +1122,37 @@ function createSqliteBackend(db, options = {}) {
|
|
|
1051
1122
|
await contributionMaterializer.assertInitialized(graphId);
|
|
1052
1123
|
},
|
|
1053
1124
|
async ensureKindRemovalsTable() {
|
|
1054
|
-
await db.run(drizzleOrm.sql.raw(
|
|
1125
|
+
await db.run(drizzleOrm.sql.raw(chunkZ3WO6MND_cjs.generateSqliteCreateTableSQL(tables2.kindRemovals)));
|
|
1055
1126
|
},
|
|
1056
1127
|
async getPendingKindRemovals(graphId) {
|
|
1057
1128
|
const t = tables2.kindRemovals;
|
|
1058
1129
|
const rows = await db.select().from(t).where(drizzleOrm.and(drizzleOrm.eq(t.graphId, graphId), drizzleOrm.isNull(t.removedAt)));
|
|
1059
1130
|
return rows.map(
|
|
1060
|
-
(row) =>
|
|
1131
|
+
(row) => chunkH7VE3FL4_cjs.mapKindRemovalRow(row, chunkH7VE3FL4_cjs.SQLITE_KIND_REMOVAL_TIMESTAMPS.decode)
|
|
1061
1132
|
);
|
|
1062
1133
|
},
|
|
1063
1134
|
async getAllKindRemovals(graphId) {
|
|
1064
1135
|
const t = tables2.kindRemovals;
|
|
1065
1136
|
const rows = await db.select().from(t).where(drizzleOrm.eq(t.graphId, graphId));
|
|
1066
1137
|
return rows.map(
|
|
1067
|
-
(row) =>
|
|
1138
|
+
(row) => chunkH7VE3FL4_cjs.mapKindRemovalRow(row, chunkH7VE3FL4_cjs.SQLITE_KIND_REMOVAL_TIMESTAMPS.decode)
|
|
1068
1139
|
);
|
|
1069
1140
|
},
|
|
1070
1141
|
async recordKindRemoval(params) {
|
|
1071
1142
|
const t = tables2.kindRemovals;
|
|
1072
1143
|
await db.insert(t).values(
|
|
1073
|
-
|
|
1144
|
+
chunkH7VE3FL4_cjs.buildKindRemovalInsertValues(
|
|
1074
1145
|
params,
|
|
1075
|
-
|
|
1146
|
+
chunkH7VE3FL4_cjs.SQLITE_KIND_REMOVAL_TIMESTAMPS.encode
|
|
1076
1147
|
)
|
|
1077
1148
|
).onConflictDoUpdate({
|
|
1078
1149
|
target: [t.graphId, t.kindName, t.entity, t.schemaVersion],
|
|
1079
|
-
set:
|
|
1150
|
+
set: chunkH7VE3FL4_cjs.buildKindRemovalOnConflictSet(t.removedAt, params.removedAt)
|
|
1080
1151
|
});
|
|
1081
1152
|
},
|
|
1082
1153
|
async ensureReconciliationMarkersTable() {
|
|
1083
1154
|
await db.run(
|
|
1084
|
-
drizzleOrm.sql.raw(
|
|
1155
|
+
drizzleOrm.sql.raw(chunkZ3WO6MND_cjs.generateSqliteCreateTableSQL(tables2.reconciliationMarkers))
|
|
1085
1156
|
);
|
|
1086
1157
|
},
|
|
1087
1158
|
async ensureRuntimeContributions(graphId) {
|
|
@@ -1095,6 +1166,12 @@ function createSqliteBackend(db, options = {}) {
|
|
|
1095
1166
|
async ensureFulltextTable(graphId) {
|
|
1096
1167
|
await contributionMaterializer.ensureRuntimeContributions(graphId);
|
|
1097
1168
|
},
|
|
1169
|
+
async verifyContributions(graphId, vectorSlots) {
|
|
1170
|
+
return contributionMaterializer.verifyContributions(graphId, vectorSlots);
|
|
1171
|
+
},
|
|
1172
|
+
async repairContributions(graphId, vectorSlots) {
|
|
1173
|
+
return contributionMaterializer.repairContributions(graphId, vectorSlots);
|
|
1174
|
+
},
|
|
1098
1175
|
// Vector counterparts of the runtime-contribution methods. Present
|
|
1099
1176
|
// only when a vector strategy is wired (omitted on a plain SQLite
|
|
1100
1177
|
// connection with no vector extension), mirroring the embedding/
|
|
@@ -1131,18 +1208,18 @@ function createSqliteBackend(db, options = {}) {
|
|
|
1131
1208
|
async refreshStatistics() {
|
|
1132
1209
|
try {
|
|
1133
1210
|
await db.run(
|
|
1134
|
-
|
|
1135
|
-
|
|
1211
|
+
chunkOOA273IJ_cjs.toDrizzleSql(
|
|
1212
|
+
chunkU5W4LKZV_cjs.sql`PRAGMA analysis_limit = ${chunkU5W4LKZV_cjs.sql.raw(String(SQLITE_ANALYZE_ROW_LIMIT))}`,
|
|
1136
1213
|
"sqlite"
|
|
1137
1214
|
)
|
|
1138
1215
|
);
|
|
1139
1216
|
} catch (error) {
|
|
1140
|
-
if (!
|
|
1217
|
+
if (!chunkJQXSZHF2_cjs.isSqliteNotAuthorizedError(error)) throw error;
|
|
1141
1218
|
}
|
|
1142
1219
|
for (const tableName of coreAnalyzeTables) {
|
|
1143
1220
|
await db.run(
|
|
1144
|
-
|
|
1145
|
-
|
|
1221
|
+
chunkOOA273IJ_cjs.toDrizzleSql(
|
|
1222
|
+
chunkU5W4LKZV_cjs.sql`ANALYZE ${chunkU5W4LKZV_cjs.sql.identifier(tableName)}`,
|
|
1146
1223
|
"sqlite"
|
|
1147
1224
|
)
|
|
1148
1225
|
);
|
|
@@ -1150,13 +1227,13 @@ function createSqliteBackend(db, options = {}) {
|
|
|
1150
1227
|
for (const tableName of recordedAnalyzeTables) {
|
|
1151
1228
|
try {
|
|
1152
1229
|
await db.run(
|
|
1153
|
-
|
|
1154
|
-
|
|
1230
|
+
chunkOOA273IJ_cjs.toDrizzleSql(
|
|
1231
|
+
chunkU5W4LKZV_cjs.sql`ANALYZE ${chunkU5W4LKZV_cjs.sql.identifier(tableName)}`,
|
|
1155
1232
|
"sqlite"
|
|
1156
1233
|
)
|
|
1157
1234
|
);
|
|
1158
1235
|
} catch (error) {
|
|
1159
|
-
if (!
|
|
1236
|
+
if (!chunkJQXSZHF2_cjs.isMissingTableError(error)) throw error;
|
|
1160
1237
|
}
|
|
1161
1238
|
}
|
|
1162
1239
|
},
|
|
@@ -1165,18 +1242,26 @@ function createSqliteBackend(db, options = {}) {
|
|
|
1165
1242
|
(target) => target.commitSchemaVersion(params)
|
|
1166
1243
|
);
|
|
1167
1244
|
},
|
|
1245
|
+
async commitSchemaVersionIfKindsEmpty(params, probes) {
|
|
1246
|
+
return runSchemaWriteTransaction(
|
|
1247
|
+
(target) => chunkH7VE3FL4_cjs.commitSchemaVersionIfKindsEmpty(target, params, probes)
|
|
1248
|
+
);
|
|
1249
|
+
},
|
|
1168
1250
|
async setActiveVersion(params) {
|
|
1169
1251
|
await runSchemaWriteTransaction(
|
|
1170
1252
|
(target) => target.setActiveVersion(params)
|
|
1171
1253
|
);
|
|
1172
1254
|
},
|
|
1255
|
+
async schemaWriteTransaction(_graphId, fn) {
|
|
1256
|
+
return runSchemaWriteTransaction((target) => fn(target));
|
|
1257
|
+
},
|
|
1173
1258
|
async transaction(fn, options2) {
|
|
1174
1259
|
return backend.transactionWithNative((tx) => fn(tx), options2);
|
|
1175
1260
|
},
|
|
1176
1261
|
async transactionWithNative(fn, options2) {
|
|
1177
|
-
const temporaryWrites = options2?.temporaryWrites ===
|
|
1262
|
+
const temporaryWrites = options2?.temporaryWrites === chunkEKFUG4G7_cjs.INTERNAL_TEMPORARY_WRITES;
|
|
1178
1263
|
if (temporaryWrites && options2.accessMode !== "read_only") {
|
|
1179
|
-
throw new
|
|
1264
|
+
throw new chunkC4F7VJ5D_cjs.ConfigurationError(
|
|
1180
1265
|
"Temporary-write transactions must be semantically read-only.",
|
|
1181
1266
|
{ dialect: "sqlite" }
|
|
1182
1267
|
);
|
|
@@ -1204,7 +1289,7 @@ function createSqliteBackend(db, options = {}) {
|
|
|
1204
1289
|
);
|
|
1205
1290
|
try {
|
|
1206
1291
|
const result = await fn(
|
|
1207
|
-
|
|
1292
|
+
chunkH7VE3FL4_cjs.gateFulltext(
|
|
1208
1293
|
txBackend,
|
|
1209
1294
|
contributionMaterializer.assertInitialized
|
|
1210
1295
|
),
|
|
@@ -1236,7 +1321,7 @@ function createSqliteBackend(db, options = {}) {
|
|
|
1236
1321
|
"Cross-store atomicity is unavailable on this SQLite backend: transactions are disabled (transactionMode: 'none'). Adopting an external transaction here would let the caller's relational write commit with no way to roll back the graph write. Configure a driver that supports transactions (better-sqlite3, libsql, bun:sqlite)."
|
|
1237
1322
|
);
|
|
1238
1323
|
}
|
|
1239
|
-
|
|
1324
|
+
chunkH7VE3FL4_cjs.assertAdoptedDialect(
|
|
1240
1325
|
externalTx,
|
|
1241
1326
|
sqliteCore.BaseSQLiteDatabase,
|
|
1242
1327
|
"sqlite"
|
|
@@ -1262,10 +1347,11 @@ function createTransactionBackend(options) {
|
|
|
1262
1347
|
tableNames: options.tableNames,
|
|
1263
1348
|
fulltextStrategy: options.fulltextStrategy,
|
|
1264
1349
|
vectorStrategy: options.vectorStrategy,
|
|
1265
|
-
contributionMaterializer: options.contributionMaterializer
|
|
1350
|
+
contributionMaterializer: options.contributionMaterializer,
|
|
1351
|
+
transactionScoped: true
|
|
1266
1352
|
});
|
|
1267
1353
|
}
|
|
1268
1354
|
|
|
1269
1355
|
exports.createSqliteBackend = createSqliteBackend;
|
|
1270
|
-
//# sourceMappingURL=chunk-
|
|
1271
|
-
//# sourceMappingURL=chunk-
|
|
1356
|
+
//# sourceMappingURL=chunk-P7GTYOLB.cjs.map
|
|
1357
|
+
//# sourceMappingURL=chunk-P7GTYOLB.cjs.map
|