@nicia-ai/typegraph 0.44.0 → 0.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/backend/drizzle/indexes.cjs +7 -7
- package/dist/backend/drizzle/indexes.d.cts +1 -1
- package/dist/backend/drizzle/indexes.d.ts +1 -1
- package/dist/backend/drizzle/indexes.js +3 -3
- package/dist/backend/index.cjs +37 -37
- package/dist/backend/index.d.cts +3 -3
- package/dist/backend/index.d.ts +3 -3
- package/dist/backend/index.js +6 -6
- package/dist/backend/postgres/index.cjs +23 -23
- package/dist/backend/postgres/index.d.cts +6 -6
- package/dist/backend/postgres/index.d.ts +6 -6
- package/dist/backend/postgres/index.js +10 -10
- package/dist/backend/postgres/pglite-store.cjs +24 -25
- 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 +20 -21
- package/dist/backend/postgres/pglite-store.js.map +1 -1
- package/dist/backend/postgres/pglite.cjs +12 -12
- package/dist/backend/postgres/pglite.d.cts +3 -3
- package/dist/backend/postgres/pglite.d.ts +3 -3
- package/dist/backend/postgres/pglite.js +11 -11
- package/dist/backend/sqlite/index.cjs +21 -21
- package/dist/backend/sqlite/index.d.cts +6 -6
- package/dist/backend/sqlite/index.d.ts +6 -6
- package/dist/backend/sqlite/index.js +9 -9
- package/dist/backend/sqlite/libsql.cjs +14 -14
- package/dist/backend/sqlite/libsql.cjs.map +1 -1
- package/dist/backend/sqlite/libsql.d.cts +3 -3
- package/dist/backend/sqlite/libsql.d.ts +3 -3
- package/dist/backend/sqlite/libsql.js +10 -10
- package/dist/backend/sqlite/libsql.js.map +1 -1
- package/dist/backend/sqlite/local-store.cjs +25 -26
- package/dist/backend/sqlite/local-store.cjs.map +1 -1
- package/dist/backend/sqlite/local-store.d.cts +8 -8
- package/dist/backend/sqlite/local-store.d.ts +8 -8
- package/dist/backend/sqlite/local-store.js +21 -22
- package/dist/backend/sqlite/local-store.js.map +1 -1
- package/dist/backend/sqlite/local.cjs +13 -13
- package/dist/backend/sqlite/local.d.cts +3 -3
- package/dist/backend/sqlite/local.d.ts +3 -3
- package/dist/backend/sqlite/local.js +11 -11
- package/dist/{chunk-TVLKA4AY.js → chunk-42PYUGLS.js} +57 -3
- package/dist/chunk-42PYUGLS.js.map +1 -0
- package/dist/{chunk-IJTLXNGJ.js → chunk-4GUBTVPV.js} +3 -4
- package/dist/chunk-4GUBTVPV.js.map +1 -0
- package/dist/{chunk-63KCKSSH.js → chunk-4GUTQPVO.js} +33 -9
- package/dist/chunk-4GUTQPVO.js.map +1 -0
- package/dist/{chunk-FGO5JFVJ.cjs → chunk-4MEWSUVM.cjs} +10 -10
- package/dist/chunk-4MEWSUVM.cjs.map +1 -0
- package/dist/{chunk-FMGEZBAQ.js → chunk-4QIKLIGG.js} +15 -3
- package/dist/chunk-4QIKLIGG.js.map +1 -0
- package/dist/{chunk-FMMIX6N4.js → chunk-55ITBQJI.js} +2 -2
- package/dist/chunk-55ITBQJI.js.map +1 -0
- package/dist/{chunk-TCRIQMBU.js → chunk-5EKPX6QU.js} +4 -4
- package/dist/{chunk-TCRIQMBU.js.map → chunk-5EKPX6QU.js.map} +1 -1
- package/dist/{chunk-GFRGG2US.cjs → chunk-5GAONX5G.cjs} +7 -7
- package/dist/{chunk-GFRGG2US.cjs.map → chunk-5GAONX5G.cjs.map} +1 -1
- package/dist/{chunk-ALFUGRYB.cjs → chunk-6RYPD3NJ.cjs} +29 -29
- package/dist/{chunk-ALFUGRYB.cjs.map → chunk-6RYPD3NJ.cjs.map} +1 -1
- package/dist/{chunk-QGKILWGZ.cjs → chunk-7PF2L3H6.cjs} +4 -4
- package/dist/{chunk-QGKILWGZ.cjs.map → chunk-7PF2L3H6.cjs.map} +1 -1
- package/dist/chunk-B3F2D3SP.cjs +12 -0
- package/dist/{chunk-EPTSMFH7.cjs.map → chunk-B3F2D3SP.cjs.map} +1 -1
- package/dist/{chunk-7G32LIQM.js → chunk-BGYJW37L.js} +5 -5
- package/dist/{chunk-7G32LIQM.js.map → chunk-BGYJW37L.js.map} +1 -1
- package/dist/{chunk-EE7N5XXQ.cjs → chunk-BNS75YNF.cjs} +9 -10
- package/dist/chunk-BNS75YNF.cjs.map +1 -0
- package/dist/{chunk-VITTKBWF.js → chunk-CBKG6HEP.js} +5 -5
- package/dist/{chunk-VITTKBWF.js.map → chunk-CBKG6HEP.js.map} +1 -1
- package/dist/{chunk-A4PBRX4C.cjs → chunk-D54WH24V.cjs} +57 -2
- package/dist/chunk-D54WH24V.cjs.map +1 -0
- package/dist/{chunk-MCHP7RHZ.cjs → chunk-D56XG4EI.cjs} +26 -14
- package/dist/chunk-D56XG4EI.cjs.map +1 -0
- package/dist/{chunk-SQRD2CYF.js → chunk-DXEEHSGN.js} +293 -45
- package/dist/chunk-DXEEHSGN.js.map +1 -0
- package/dist/{chunk-GWEDD3DH.js → chunk-EFEOOCJ3.js} +4 -4
- package/dist/{chunk-GWEDD3DH.js.map → chunk-EFEOOCJ3.js.map} +1 -1
- package/dist/{chunk-3PRKZW6D.cjs → chunk-EKFUG4G7.cjs} +2 -2
- package/dist/chunk-EKFUG4G7.cjs.map +1 -0
- package/dist/{chunk-HJH3RMXG.cjs → chunk-F4NHQHEZ.cjs} +4 -4
- package/dist/{chunk-HJH3RMXG.cjs.map → chunk-F4NHQHEZ.cjs.map} +1 -1
- package/dist/{chunk-46GDII45.js → chunk-FL5UQRES.js} +3 -3
- package/dist/{chunk-46GDII45.js.map → chunk-FL5UQRES.js.map} +1 -1
- package/dist/{chunk-TFMVL4QH.js → chunk-FLEQ2HBK.js} +3 -3
- package/dist/{chunk-TFMVL4QH.js.map → chunk-FLEQ2HBK.js.map} +1 -1
- package/dist/{chunk-BEFM74L2.js → chunk-FQ7ZPOTZ.js} +6 -6
- package/dist/{chunk-BEFM74L2.js.map → chunk-FQ7ZPOTZ.js.map} +1 -1
- package/dist/{chunk-ST3LPB2V.cjs → chunk-H7VE3FL4.cjs} +318 -70
- package/dist/chunk-H7VE3FL4.cjs.map +1 -0
- package/dist/{chunk-BCP7LLOY.js → chunk-ID4WXTKL.js} +367 -41
- package/dist/{chunk-BCP7LLOY.js.map → chunk-ID4WXTKL.js.map} +1 -1
- package/dist/{chunk-EFELJVLA.js → chunk-ISLPNELU.js} +15 -3
- package/dist/chunk-ISLPNELU.js.map +1 -0
- package/dist/{chunk-A2I2XO52.cjs → chunk-IX64T5OL.cjs} +4 -4
- package/dist/{chunk-A2I2XO52.cjs.map → chunk-IX64T5OL.cjs.map} +1 -1
- package/dist/{chunk-QYWINYEA.cjs → chunk-J2ICGNHO.cjs} +5 -6
- package/dist/chunk-J2ICGNHO.cjs.map +1 -0
- package/dist/{chunk-7V2FGGI2.cjs → chunk-J7LXTUTP.cjs} +54 -12
- package/dist/chunk-J7LXTUTP.cjs.map +1 -0
- package/dist/{chunk-WBUFJ7BS.cjs → chunk-JQXSZHF2.cjs} +12 -2
- package/dist/chunk-JQXSZHF2.cjs.map +1 -0
- package/dist/{chunk-OVUUTCPJ.cjs → chunk-JXUTCSXX.cjs} +28 -2
- package/dist/chunk-JXUTCSXX.cjs.map +1 -0
- package/dist/{chunk-66UVLHQA.cjs → chunk-KMXWZLQX.cjs} +14 -14
- package/dist/{chunk-66UVLHQA.cjs.map → chunk-KMXWZLQX.cjs.map} +1 -1
- package/dist/{chunk-STQ3BSED.cjs → chunk-NAAMUYMS.cjs} +23 -11
- package/dist/chunk-NAAMUYMS.cjs.map +1 -0
- package/dist/{chunk-NN3QSOVS.cjs → chunk-OOA273IJ.cjs} +14 -14
- package/dist/{chunk-NN3QSOVS.cjs.map → chunk-OOA273IJ.cjs.map} +1 -1
- package/dist/{chunk-OSZPLZIV.cjs → chunk-P7GTYOLB.cjs} +130 -106
- package/dist/chunk-P7GTYOLB.cjs.map +1 -0
- package/dist/{chunk-K3BUWSFR.js → chunk-PVUI6KGR.js} +28 -2
- package/dist/chunk-PVUI6KGR.js.map +1 -0
- package/dist/{chunk-SBPC5IP3.js → chunk-Q6EDCUXV.js} +242 -10
- package/dist/chunk-Q6EDCUXV.js.map +1 -0
- package/dist/{chunk-2BIG7U6E.cjs → chunk-QC4MCOFV.cjs} +5 -5
- package/dist/{chunk-2BIG7U6E.cjs.map → chunk-QC4MCOFV.cjs.map} +1 -1
- package/dist/{chunk-JRP3VGHS.js → chunk-QLUXRWKL.js} +3 -3
- package/dist/{chunk-JRP3VGHS.js.map → chunk-QLUXRWKL.js.map} +1 -1
- package/dist/{chunk-IIT5K7SK.cjs → chunk-QR24DJDF.cjs} +6 -6
- package/dist/{chunk-IIT5K7SK.cjs.map → chunk-QR24DJDF.cjs.map} +1 -1
- package/dist/{chunk-HOIFFY4M.js → chunk-QRNYDV5Z.js} +48 -21
- package/dist/chunk-QRNYDV5Z.js.map +1 -0
- package/dist/{chunk-FRHHDHKH.js → chunk-RFRM3Q5K.js} +15 -3
- package/dist/chunk-RFRM3Q5K.js.map +1 -0
- package/dist/{chunk-ATLN63JA.js → chunk-RUQS6M7G.js} +5 -5
- package/dist/chunk-RUQS6M7G.js.map +1 -0
- package/dist/{chunk-XMYJY7NI.js → chunk-S3ZRKJHY.js} +3 -3
- package/dist/{chunk-XMYJY7NI.js.map → chunk-S3ZRKJHY.js.map} +1 -1
- package/dist/{chunk-FSXTPBRN.js → chunk-TKORQCG4.js} +49 -7
- package/dist/chunk-TKORQCG4.js.map +1 -0
- package/dist/{chunk-2Y4IFKW7.js → chunk-TKP5T34P.js} +3 -4
- package/dist/chunk-TKP5T34P.js.map +1 -0
- package/dist/{chunk-NCX65HBY.cjs → chunk-UCQ3BFSY.cjs} +301 -68
- package/dist/chunk-UCQ3BFSY.cjs.map +1 -0
- package/dist/{chunk-B75XRV3O.js → chunk-V34A6R5V.js} +12 -3
- package/dist/chunk-V34A6R5V.js.map +1 -0
- package/dist/{chunk-BNUFUFAU.js → chunk-VTN3C3CH.js} +6 -6
- package/dist/chunk-VTN3C3CH.js.map +1 -0
- package/dist/{chunk-5MUSU4ZP.cjs → chunk-VVQM4CZD.cjs} +12 -12
- package/dist/chunk-VVQM4CZD.cjs.map +1 -0
- package/dist/{chunk-IIMQJYAM.js → chunk-WDAVPX46.js} +3 -3
- package/dist/{chunk-IIMQJYAM.js.map → chunk-WDAVPX46.js.map} +1 -1
- package/dist/{chunk-YNULOIR5.cjs → chunk-WDBXJOU5.cjs} +28 -16
- package/dist/chunk-WDBXJOU5.cjs.map +1 -0
- package/dist/{chunk-PAW2XUZN.js → chunk-WUFASQUO.js} +3 -3
- package/dist/{chunk-PAW2XUZN.js.map → chunk-WUFASQUO.js.map} +1 -1
- package/dist/{chunk-PDGEXGS6.cjs → chunk-YDWLUT5V.cjs} +136 -109
- package/dist/chunk-YDWLUT5V.cjs.map +1 -0
- package/dist/{chunk-PHXITZE4.js → chunk-YMTXMPV6.js} +3 -3
- package/dist/{chunk-PHXITZE4.js.map → chunk-YMTXMPV6.js.map} +1 -1
- package/dist/{chunk-XR4YZFKW.cjs → chunk-YOALGKRE.cjs} +690 -364
- package/dist/chunk-YOALGKRE.cjs.map +1 -0
- package/dist/{chunk-6JZUSDY2.cjs → chunk-Z3WO6MND.cjs} +27 -27
- package/dist/{chunk-6JZUSDY2.cjs.map → chunk-Z3WO6MND.cjs.map} +1 -1
- package/dist/{chunk-2VLBGQBY.cjs → chunk-ZI6VQSZA.cjs} +37 -37
- package/dist/{chunk-2VLBGQBY.cjs.map → chunk-ZI6VQSZA.cjs.map} +1 -1
- package/dist/core/index.cjs +10 -11
- package/dist/core/index.d.cts +5 -5
- package/dist/core/index.d.ts +5 -5
- package/dist/core/index.js +3 -4
- package/dist/{ddl-eWg7hx6R.d.cts → ddl-BG4J805L.d.cts} +3 -3
- package/dist/{ddl-D5369kOY.d.ts → ddl-CgiS9QLj.d.ts} +3 -3
- package/dist/{define-graph-SvYXOl78.d.ts → define-graph-BGrJahvp.d.ts} +1 -1
- package/dist/{define-graph-DVF-oN1i.d.cts → define-graph-alREY2wj.d.cts} +1 -1
- package/dist/graph-extension/index.cjs +18 -19
- package/dist/graph-extension/index.d.cts +4 -4
- package/dist/graph-extension/index.d.ts +4 -4
- package/dist/graph-extension/index.js +3 -4
- package/dist/graph-merge/index.cjs +89 -90
- package/dist/graph-merge/index.cjs.map +1 -1
- package/dist/graph-merge/index.d.cts +9 -9
- package/dist/graph-merge/index.d.ts +9 -9
- package/dist/graph-merge/index.js +16 -17
- package/dist/graph-merge/index.js.map +1 -1
- package/dist/{index-By89Sezh.d.ts → index-BBxZCUdu.d.ts} +2 -2
- package/dist/{index-DcQ3Sxs-.d.cts → index-C3y_98iN.d.cts} +2 -2
- package/dist/index.cjs +124 -125
- 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 +23 -24
- package/dist/index.js.map +1 -1
- package/dist/indexes/index.cjs +11 -11
- package/dist/indexes/index.d.cts +4 -4
- package/dist/indexes/index.d.ts +4 -4
- package/dist/indexes/index.js +4 -4
- package/dist/interchange/index.cjs +27 -26
- package/dist/interchange/index.cjs.map +1 -1
- package/dist/interchange/index.d.cts +7 -7
- package/dist/interchange/index.d.ts +7 -7
- package/dist/interchange/index.js +8 -7
- package/dist/interchange/index.js.map +1 -1
- package/dist/{manager-Cn0NFIhN.d.cts → manager-KS7CGQQT.d.cts} +3 -3
- package/dist/{manager-B0KjKE93.d.ts → manager-YoLEfcc1.d.ts} +3 -3
- package/dist/{materialize-indexes-BD4V3svD.d.ts → materialize-indexes-Bhhyb1B3.d.ts} +1 -1
- package/dist/{materialize-indexes-DVRhd5h4.d.cts → materialize-indexes-OHRWypW6.d.cts} +1 -1
- package/dist/{postgres-DaEWvN4x.d.cts → postgres-DpkW3R5Y.d.cts} +1 -1
- package/dist/{postgres-u0a0HN2D.d.ts → postgres-DwqyIniy.d.ts} +1 -1
- package/dist/profiler/index.d.cts +10 -10
- package/dist/profiler/index.d.ts +10 -10
- package/dist/provenance/index.cjs +15 -15
- 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 +3 -3
- package/dist/provenance/index.js.map +1 -1
- package/dist/schema/index.cjs +30 -31
- package/dist/schema/index.d.cts +7 -7
- package/dist/schema/index.d.ts +7 -7
- package/dist/schema/index.js +8 -9
- package/dist/{searchable-BT7j9_IK.d.cts → searchable-CIZL8Hyw.d.cts} +2 -2
- package/dist/{searchable-CnYEancP.d.ts → searchable-DLWEfC4a.d.ts} +2 -2
- package/dist/{sqlite-BrMoSsI7.d.cts → sqlite-DY0WODUK.d.cts} +1 -1
- package/dist/{sqlite-CHhZUyO5.d.ts → sqlite-L-VIRzqA.d.ts} +1 -1
- package/dist/{store-view-Bvdku0Ht.d.ts → store-view-66p92IPi.d.ts} +1887 -1811
- package/dist/{store-view-w-md0nQ4.d.cts → store-view-A85FFRnk.d.cts} +1887 -1811
- package/dist/{temporal-BCORwUau.d.cts → temporal-BNbjXqer.d.cts} +1 -1
- package/dist/{temporal--x9T8K4S.d.ts → temporal-Bob6Nfbp.d.ts} +1 -1
- package/dist/{types-Cjvkj0jA.d.ts → types-Ch9a0Dx6.d.cts} +141 -17
- package/dist/{types-Cjvkj0jA.d.cts → types-Ch9a0Dx6.d.ts} +141 -17
- package/dist/{types-COODtTJU.d.ts → types-ClCzT-dT.d.ts} +1 -1
- package/dist/{types-6-WJmSD4.d.cts → types-DeORZhxn.d.cts} +1 -1
- package/dist/{where-CUQmCR6d.d.cts → where-DPw52ksb.d.cts} +1 -1
- package/dist/{where-5xVawAwL.d.ts → where-kWUZPvEA.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/chunk-2WDD2NO3.js +0 -59
- package/dist/chunk-2WDD2NO3.js.map +0 -1
- package/dist/chunk-2Y4IFKW7.js.map +0 -1
- package/dist/chunk-3PRKZW6D.cjs.map +0 -1
- package/dist/chunk-5MUSU4ZP.cjs.map +0 -1
- package/dist/chunk-63KCKSSH.js.map +0 -1
- package/dist/chunk-7V2FGGI2.cjs.map +0 -1
- package/dist/chunk-A4PBRX4C.cjs.map +0 -1
- package/dist/chunk-ATLN63JA.js.map +0 -1
- package/dist/chunk-B75XRV3O.js.map +0 -1
- package/dist/chunk-BNUFUFAU.js.map +0 -1
- package/dist/chunk-EE7N5XXQ.cjs.map +0 -1
- package/dist/chunk-EFELJVLA.js.map +0 -1
- package/dist/chunk-EPTSMFH7.cjs +0 -12
- package/dist/chunk-FGO5JFVJ.cjs.map +0 -1
- package/dist/chunk-FMGEZBAQ.js.map +0 -1
- package/dist/chunk-FMMIX6N4.js.map +0 -1
- package/dist/chunk-FRHHDHKH.js.map +0 -1
- package/dist/chunk-FSXTPBRN.js.map +0 -1
- package/dist/chunk-HOHAJ2NR.cjs +0 -61
- package/dist/chunk-HOHAJ2NR.cjs.map +0 -1
- package/dist/chunk-HOIFFY4M.js.map +0 -1
- package/dist/chunk-IJTLXNGJ.js.map +0 -1
- package/dist/chunk-K3BUWSFR.js.map +0 -1
- package/dist/chunk-MCHP7RHZ.cjs.map +0 -1
- package/dist/chunk-NCX65HBY.cjs.map +0 -1
- package/dist/chunk-OSZPLZIV.cjs.map +0 -1
- package/dist/chunk-OVUUTCPJ.cjs.map +0 -1
- package/dist/chunk-PDGEXGS6.cjs.map +0 -1
- package/dist/chunk-QYWINYEA.cjs.map +0 -1
- package/dist/chunk-SBPC5IP3.js.map +0 -1
- package/dist/chunk-SQRD2CYF.js.map +0 -1
- package/dist/chunk-ST3LPB2V.cjs.map +0 -1
- package/dist/chunk-STQ3BSED.cjs.map +0 -1
- package/dist/chunk-TVLKA4AY.js.map +0 -1
- package/dist/chunk-WBUFJ7BS.cjs.map +0 -1
- package/dist/chunk-XR4YZFKW.cjs.map +0 -1
- package/dist/chunk-YNULOIR5.cjs.map +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
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
|
|
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
11
|
var chunkU5W4LKZV_cjs = require('./chunk-U5W4LKZV.cjs');
|
|
12
12
|
var chunk764JHTLT_cjs = require('./chunk-764JHTLT.cjs');
|
|
13
13
|
var chunkC4F7VJ5D_cjs = require('./chunk-C4F7VJ5D.cjs');
|
|
@@ -101,14 +101,14 @@ function hasModernBindLimitByVersion(rows) {
|
|
|
101
101
|
}
|
|
102
102
|
function detectHardMaxBindParameters(transactionMode, hostedPlatform) {
|
|
103
103
|
if (hostedPlatform === "durable-object" || transactionMode === "do-sqlite") {
|
|
104
|
-
return
|
|
104
|
+
return chunkEKFUG4G7_cjs.DURABLE_OBJECT_MAX_BIND_PARAMETERS;
|
|
105
105
|
}
|
|
106
|
-
if (hostedPlatform === "d1") return
|
|
106
|
+
if (hostedPlatform === "d1") return chunkEKFUG4G7_cjs.D1_MAX_BIND_PARAMETERS;
|
|
107
107
|
return void 0;
|
|
108
108
|
}
|
|
109
109
|
function detectMaxBindParameters(sqliteClient, hardMaxBindParameters) {
|
|
110
110
|
if (hardMaxBindParameters !== void 0) return hardMaxBindParameters;
|
|
111
|
-
if (sqliteClient === void 0) return
|
|
111
|
+
if (sqliteClient === void 0) return chunkEKFUG4G7_cjs.SQLITE_MAX_BIND_PARAMETERS;
|
|
112
112
|
try {
|
|
113
113
|
const compiled = parseCompiledMaxVariableNumber(
|
|
114
114
|
sqliteClient.prepare("PRAGMA compile_options").all()
|
|
@@ -117,9 +117,9 @@ function detectMaxBindParameters(sqliteClient, hardMaxBindParameters) {
|
|
|
117
117
|
const isModern = hasModernBindLimitByVersion(
|
|
118
118
|
sqliteClient.prepare("SELECT sqlite_version() AS version").all()
|
|
119
119
|
);
|
|
120
|
-
return isModern ?
|
|
120
|
+
return isModern ? chunkEKFUG4G7_cjs.MODERN_SQLITE_MAX_BIND_PARAMETERS : chunkEKFUG4G7_cjs.SQLITE_MAX_BIND_PARAMETERS;
|
|
121
121
|
} catch {
|
|
122
|
-
return
|
|
122
|
+
return chunkEKFUG4G7_cjs.SQLITE_MAX_BIND_PARAMETERS;
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
function resolveSqliteClient(db) {
|
|
@@ -130,7 +130,7 @@ function resolveSqliteClient(db) {
|
|
|
130
130
|
return sqliteClient;
|
|
131
131
|
}
|
|
132
132
|
function getOrCreatePreparedStatement(cache, sqliteClient, sqlText, cacheMax) {
|
|
133
|
-
return
|
|
133
|
+
return chunkH7VE3FL4_cjs.getOrCreateLru(
|
|
134
134
|
cache,
|
|
135
135
|
sqlText,
|
|
136
136
|
cacheMax,
|
|
@@ -182,7 +182,7 @@ function createSqliteExecutionAdapter(db, statementCacheMaxOrOptions = {}) {
|
|
|
182
182
|
supportsCompiledExecution: sqliteClient !== void 0,
|
|
183
183
|
transactionMode
|
|
184
184
|
};
|
|
185
|
-
const compile = (query) =>
|
|
185
|
+
const compile = (query) => chunkOOA273IJ_cjs.compileQueryWithDialect(db, query, "SQLite");
|
|
186
186
|
if (sqliteClient !== void 0) {
|
|
187
187
|
let executeCompiled2 = function(compiledQuery) {
|
|
188
188
|
const preparedStatement = getOrCreatePreparedStatement(
|
|
@@ -255,7 +255,7 @@ function createSqliteExecutionAdapter(db, statementCacheMaxOrOptions = {}) {
|
|
|
255
255
|
execute(query) {
|
|
256
256
|
return executeDrizzleQuery(
|
|
257
257
|
db,
|
|
258
|
-
chunkU5W4LKZV_cjs.isSqlFragment(query) ?
|
|
258
|
+
chunkU5W4LKZV_cjs.isSqlFragment(query) ? chunkOOA273IJ_cjs.toDrizzleSql(query, "sqlite") : query
|
|
259
259
|
);
|
|
260
260
|
},
|
|
261
261
|
profile
|
|
@@ -270,6 +270,7 @@ var GET_EDGES_FIXED_PARAM_COUNT = 1;
|
|
|
270
270
|
var CHECK_UNIQUE_BATCH_FIXED_PARAM_COUNT = 3;
|
|
271
271
|
var FULLTEXT_UPSERT_PARAM_COUNT = 6;
|
|
272
272
|
var FULLTEXT_DELETE_FIXED_PARAM_COUNT = 2;
|
|
273
|
+
var UNIQUE_DELETE_FIXED_PARAM_COUNT = 2;
|
|
273
274
|
var UNIQUE_INSERT_PARAM_COUNT = 6;
|
|
274
275
|
var SQLITE_ANALYZE_ROW_LIMIT = 1e3;
|
|
275
276
|
function computeSqliteBatchChunkSizes(maxBindParameters) {
|
|
@@ -280,7 +281,7 @@ function computeSqliteBatchChunkSizes(maxBindParameters) {
|
|
|
280
281
|
),
|
|
281
282
|
embeddingUpsertBatchSize: Math.max(
|
|
282
283
|
1,
|
|
283
|
-
Math.floor(maxBindParameters /
|
|
284
|
+
Math.floor(maxBindParameters / chunkH7VE3FL4_cjs.EMBEDDING_UPSERT_PARAM_COUNT)
|
|
284
285
|
),
|
|
285
286
|
fulltextUpsertBatchSize: Math.max(
|
|
286
287
|
1,
|
|
@@ -296,7 +297,7 @@ function computeSqliteBatchChunkSizes(maxBindParameters) {
|
|
|
296
297
|
),
|
|
297
298
|
findEdgesEndpointChunkSize: Math.max(
|
|
298
299
|
1,
|
|
299
|
-
maxBindParameters -
|
|
300
|
+
maxBindParameters - chunkH7VE3FL4_cjs.FIND_EDGES_ENDPOINT_FIXED_PARAM_COUNT
|
|
300
301
|
),
|
|
301
302
|
getEdgesChunkSize: Math.max(
|
|
302
303
|
1,
|
|
@@ -310,17 +311,21 @@ function computeSqliteBatchChunkSizes(maxBindParameters) {
|
|
|
310
311
|
1,
|
|
311
312
|
Math.floor(maxBindParameters / NODE_INSERT_PARAM_COUNT)
|
|
312
313
|
),
|
|
314
|
+
uniqueDeleteChunkSize: Math.max(
|
|
315
|
+
1,
|
|
316
|
+
maxBindParameters - UNIQUE_DELETE_FIXED_PARAM_COUNT
|
|
317
|
+
),
|
|
313
318
|
uniqueInsertBatchSize: Math.max(
|
|
314
319
|
1,
|
|
315
320
|
Math.floor(maxBindParameters / UNIQUE_INSERT_PARAM_COUNT)
|
|
316
321
|
)
|
|
317
322
|
};
|
|
318
323
|
}
|
|
319
|
-
var toNodeRow =
|
|
320
|
-
var toEdgeRow =
|
|
321
|
-
var toUniqueRow =
|
|
322
|
-
var toSchemaVersionRow =
|
|
323
|
-
|
|
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
|
|
324
329
|
);
|
|
325
330
|
var PENDING_FOREVER = new Promise(noop);
|
|
326
331
|
function pendingForever() {
|
|
@@ -396,20 +401,20 @@ function throwSqliteTransactionsDisabled(message) {
|
|
|
396
401
|
}
|
|
397
402
|
function buildSqliteCapabilities(options) {
|
|
398
403
|
const base = options.transactionMode === "none" ? {
|
|
399
|
-
...
|
|
404
|
+
...chunkEKFUG4G7_cjs.SQLITE_CAPABILITIES,
|
|
400
405
|
transactions: false,
|
|
401
406
|
graphAnalytics: {
|
|
402
|
-
...
|
|
407
|
+
...chunkEKFUG4G7_cjs.SQLITE_CAPABILITIES.graphAnalytics ?? {
|
|
403
408
|
mathFunctions: false
|
|
404
409
|
},
|
|
405
410
|
supported: false
|
|
406
411
|
}
|
|
407
|
-
} :
|
|
412
|
+
} : chunkEKFUG4G7_cjs.SQLITE_CAPABILITIES;
|
|
408
413
|
return {
|
|
409
414
|
...base,
|
|
410
415
|
maxBindParameters: options.maxBindParameters,
|
|
411
|
-
fulltext:
|
|
412
|
-
...options.vectorStrategy === void 0 ? {} : { vector:
|
|
416
|
+
fulltext: chunkJXUTCSXX_cjs.buildFulltextCapabilities(options.fulltextStrategy),
|
|
417
|
+
...options.vectorStrategy === void 0 ? {} : { vector: chunkJXUTCSXX_cjs.buildVectorCapabilities(options.vectorStrategy) }
|
|
413
418
|
};
|
|
414
419
|
}
|
|
415
420
|
function resolveMaxBindParametersCapability(profile, override) {
|
|
@@ -417,7 +422,7 @@ function resolveMaxBindParametersCapability(profile, override) {
|
|
|
417
422
|
return profile.hardMaxBindParameters === void 0 ? requested : Math.min(requested, profile.hardMaxBindParameters);
|
|
418
423
|
}
|
|
419
424
|
function resolveSqliteGraphAnalyticsCapabilities(profile, override) {
|
|
420
|
-
const requested = override ??
|
|
425
|
+
const requested = override ?? chunkEKFUG4G7_cjs.SQLITE_CAPABILITIES.graphAnalytics ?? {
|
|
421
426
|
supported: false,
|
|
422
427
|
mathFunctions: false
|
|
423
428
|
};
|
|
@@ -463,7 +468,7 @@ function createSqliteOperationBackend(options) {
|
|
|
463
468
|
return runWithSerializedQueue(serializedQueue, async () => {
|
|
464
469
|
if (compiledRun === void 0) {
|
|
465
470
|
await db.run(
|
|
466
|
-
chunkU5W4LKZV_cjs.isSqlFragment(query) ?
|
|
471
|
+
chunkU5W4LKZV_cjs.isSqlFragment(query) ? chunkOOA273IJ_cjs.toDrizzleSql(query, "sqlite") : query
|
|
467
472
|
);
|
|
468
473
|
return;
|
|
469
474
|
}
|
|
@@ -471,16 +476,17 @@ function createSqliteOperationBackend(options) {
|
|
|
471
476
|
});
|
|
472
477
|
}
|
|
473
478
|
const batchConfig = computeSqliteBatchChunkSizes(
|
|
474
|
-
capabilities.maxBindParameters ??
|
|
479
|
+
capabilities.maxBindParameters ?? chunkEKFUG4G7_cjs.SQLITE_MAX_BIND_PARAMETERS
|
|
475
480
|
);
|
|
476
|
-
const commonBackend =
|
|
481
|
+
const commonBackend = chunkH7VE3FL4_cjs.createCommonOperationBackend({
|
|
477
482
|
batchConfig,
|
|
478
483
|
execution: {
|
|
479
484
|
execAll,
|
|
480
485
|
execGet,
|
|
481
486
|
execRun
|
|
482
487
|
},
|
|
483
|
-
nowIso:
|
|
488
|
+
nowIso: chunkF4NHQHEZ_cjs.nowIso,
|
|
489
|
+
maxBindParameters: capabilities.maxBindParameters ?? chunkEKFUG4G7_cjs.SQLITE_MAX_BIND_PARAMETERS,
|
|
484
490
|
operationStrategy,
|
|
485
491
|
rowMappers: {
|
|
486
492
|
toEdgeRow,
|
|
@@ -500,26 +506,26 @@ function createSqliteOperationBackend(options) {
|
|
|
500
506
|
};
|
|
501
507
|
const vectorEmbeddingMethods = vectorStrategy === void 0 ? {} : {
|
|
502
508
|
async upsertEmbedding(params) {
|
|
503
|
-
const slot =
|
|
509
|
+
const slot = chunkH7VE3FL4_cjs.vectorSlotFromParams(params);
|
|
504
510
|
await contributionMaterializer.assertVectorSlot(slot);
|
|
505
|
-
const statements = vectorStrategy.buildUpsert(slot, params,
|
|
511
|
+
const statements = vectorStrategy.buildUpsert(slot, params, chunkF4NHQHEZ_cjs.nowIso());
|
|
506
512
|
try {
|
|
507
513
|
for (const statement of statements) {
|
|
508
514
|
await execRun(statement);
|
|
509
515
|
}
|
|
510
516
|
} catch (error) {
|
|
511
|
-
throw
|
|
517
|
+
throw chunkH7VE3FL4_cjs.mapVectorWriteError(error, params);
|
|
512
518
|
}
|
|
513
519
|
},
|
|
514
520
|
async upsertEmbeddingBatch(params) {
|
|
515
521
|
if (params.rows.length === 0) return;
|
|
516
|
-
const slot =
|
|
522
|
+
const slot = chunkH7VE3FL4_cjs.vectorSlotFromParams(params);
|
|
517
523
|
await contributionMaterializer.assertVectorSlot(slot);
|
|
518
524
|
const rowsById = new Map(
|
|
519
525
|
params.rows.map((row) => [row.nodeId, row])
|
|
520
526
|
);
|
|
521
527
|
const rows = [...rowsById.values()];
|
|
522
|
-
const timestamp =
|
|
528
|
+
const timestamp = chunkF4NHQHEZ_cjs.nowIso();
|
|
523
529
|
try {
|
|
524
530
|
for (const chunk2 of chunkZDH3DX3C_cjs.chunk(
|
|
525
531
|
rows,
|
|
@@ -550,37 +556,52 @@ function createSqliteOperationBackend(options) {
|
|
|
550
556
|
}
|
|
551
557
|
}
|
|
552
558
|
} catch (error) {
|
|
553
|
-
throw
|
|
559
|
+
throw chunkH7VE3FL4_cjs.mapVectorWriteError(error, params);
|
|
554
560
|
}
|
|
555
561
|
},
|
|
556
562
|
async deleteEmbedding(params) {
|
|
557
|
-
const slot =
|
|
563
|
+
const slot = chunkH7VE3FL4_cjs.vectorSlotFromParams(params);
|
|
558
564
|
await contributionMaterializer.assertVectorSlot(slot);
|
|
559
565
|
const statements = vectorStrategy.buildDelete(slot, params);
|
|
560
566
|
for (const statement of statements) {
|
|
561
567
|
await execRun(statement);
|
|
562
568
|
}
|
|
563
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
|
+
},
|
|
564
585
|
async vectorSearch(params) {
|
|
565
|
-
|
|
566
|
-
const slot =
|
|
586
|
+
chunkJXUTCSXX_cjs.assertVectorSearchLimit(params.limit);
|
|
587
|
+
const slot = chunkH7VE3FL4_cjs.vectorSlotFromParams(params);
|
|
567
588
|
const query = vectorStrategy.buildSearch(
|
|
568
589
|
slot,
|
|
569
590
|
params,
|
|
570
591
|
// Store-compiled candidates (predicates + subclass + currency)
|
|
571
592
|
// take precedence; the live-node default covers direct backend use.
|
|
572
|
-
params.candidates ??
|
|
593
|
+
params.candidates ?? chunkH7VE3FL4_cjs.buildLiveNodeCandidates(
|
|
573
594
|
tableNames.nodes,
|
|
574
595
|
params.graphId,
|
|
575
596
|
params.nodeKind,
|
|
576
|
-
|
|
597
|
+
chunkF4NHQHEZ_cjs.nowIso()
|
|
577
598
|
)
|
|
578
599
|
);
|
|
579
600
|
let rows;
|
|
580
601
|
try {
|
|
581
602
|
rows = await execAll(query);
|
|
582
603
|
} catch (error) {
|
|
583
|
-
throw
|
|
604
|
+
throw chunkH7VE3FL4_cjs.mapVectorWriteError(error, params);
|
|
584
605
|
}
|
|
585
606
|
return rows.map((row) => ({
|
|
586
607
|
nodeId: row.node_id,
|
|
@@ -592,9 +613,9 @@ function createSqliteOperationBackend(options) {
|
|
|
592
613
|
// fallback by simply not exposing the member.
|
|
593
614
|
...capabilities.windowFunctions ? {
|
|
594
615
|
async hybridSearch(params) {
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
const slot =
|
|
616
|
+
chunkJXUTCSXX_cjs.assertVectorSearchLimit(params.limit);
|
|
617
|
+
chunkJXUTCSXX_cjs.assertVectorSearchLimit(params.vector.k);
|
|
618
|
+
const slot = chunkH7VE3FL4_cjs.vectorSlotFromParams({
|
|
598
619
|
graphId: params.graphId,
|
|
599
620
|
nodeKind: params.nodeKind,
|
|
600
621
|
fieldPath: params.vector.fieldPath,
|
|
@@ -602,11 +623,11 @@ function createSqliteOperationBackend(options) {
|
|
|
602
623
|
metric: params.vector.metric,
|
|
603
624
|
indexType: params.vector.indexType
|
|
604
625
|
});
|
|
605
|
-
const candidates = params.candidates ??
|
|
626
|
+
const candidates = params.candidates ?? chunkH7VE3FL4_cjs.buildLiveNodeCandidates(
|
|
606
627
|
tableNames.nodes,
|
|
607
628
|
params.graphId,
|
|
608
629
|
params.nodeKind,
|
|
609
|
-
|
|
630
|
+
chunkF4NHQHEZ_cjs.nowIso()
|
|
610
631
|
);
|
|
611
632
|
const vectorParams = {
|
|
612
633
|
graphId: params.graphId,
|
|
@@ -626,16 +647,16 @@ function createSqliteOperationBackend(options) {
|
|
|
626
647
|
);
|
|
627
648
|
const statement = operationStrategy.buildHybridSearch(
|
|
628
649
|
{ ...params, candidates },
|
|
629
|
-
|
|
650
|
+
chunkOOA273IJ_cjs.toDrizzleSql(vectorSql, "sqlite"),
|
|
630
651
|
params.vector.metric === "cosine"
|
|
631
652
|
);
|
|
632
653
|
let raw;
|
|
633
654
|
try {
|
|
634
655
|
raw = await execAll(statement);
|
|
635
656
|
} catch (error) {
|
|
636
|
-
throw
|
|
657
|
+
throw chunkH7VE3FL4_cjs.mapVectorWriteError(error, vectorParams);
|
|
637
658
|
}
|
|
638
|
-
return raw.map((row) =>
|
|
659
|
+
return raw.map((row) => chunkH7VE3FL4_cjs.mapHybridSearchRow(row, toNodeRow));
|
|
639
660
|
}
|
|
640
661
|
} : {}
|
|
641
662
|
};
|
|
@@ -673,7 +694,7 @@ function createSqliteOperationBackend(options) {
|
|
|
673
694
|
);
|
|
674
695
|
}
|
|
675
696
|
const active = await commonBackend.getActiveSchema(params.graphId);
|
|
676
|
-
|
|
697
|
+
chunkH7VE3FL4_cjs.assertActiveSchemaVersion(
|
|
677
698
|
params.graphId,
|
|
678
699
|
params.expectedVersion,
|
|
679
700
|
active?.version ?? 0
|
|
@@ -681,7 +702,7 @@ function createSqliteOperationBackend(options) {
|
|
|
681
702
|
},
|
|
682
703
|
async createVectorIndex(params) {
|
|
683
704
|
if (vectorStrategy === void 0) return;
|
|
684
|
-
const slot =
|
|
705
|
+
const slot = chunkH7VE3FL4_cjs.vectorSlotFromCreateIndexParams(params);
|
|
685
706
|
await contributionMaterializer.ensureVectorSlot(slot);
|
|
686
707
|
const indexStatement = vectorStrategy.buildCreateIndex?.(slot);
|
|
687
708
|
if (indexStatement !== void 0) {
|
|
@@ -690,18 +711,18 @@ function createSqliteOperationBackend(options) {
|
|
|
690
711
|
},
|
|
691
712
|
async dropVectorIndex(params) {
|
|
692
713
|
if (vectorStrategy === void 0) return;
|
|
693
|
-
const slot =
|
|
714
|
+
const slot = chunkH7VE3FL4_cjs.vectorSlotFromDropIndexParams(params);
|
|
694
715
|
const dropStatement = vectorStrategy.buildDropIndex?.(slot);
|
|
695
716
|
if (dropStatement === void 0) return;
|
|
696
717
|
try {
|
|
697
718
|
await execRun(dropStatement);
|
|
698
719
|
} catch (error) {
|
|
699
|
-
if (!
|
|
720
|
+
if (!chunkJQXSZHF2_cjs.isMissingTableError(error)) throw error;
|
|
700
721
|
}
|
|
701
722
|
},
|
|
702
723
|
// === Fulltext Operations ===
|
|
703
724
|
async upsertFulltext(params) {
|
|
704
|
-
const timestamp =
|
|
725
|
+
const timestamp = chunkF4NHQHEZ_cjs.nowIso();
|
|
705
726
|
const statements = operationStrategy.buildUpsertFulltext(
|
|
706
727
|
params,
|
|
707
728
|
timestamp
|
|
@@ -718,7 +739,7 @@ function createSqliteOperationBackend(options) {
|
|
|
718
739
|
},
|
|
719
740
|
async upsertFulltextBatch(params) {
|
|
720
741
|
if (params.rows.length === 0) return;
|
|
721
|
-
const timestamp =
|
|
742
|
+
const timestamp = chunkF4NHQHEZ_cjs.nowIso();
|
|
722
743
|
for (const rows of chunkZDH3DX3C_cjs.chunk(
|
|
723
744
|
params.rows,
|
|
724
745
|
batchConfig.fulltextUpsertBatchSize
|
|
@@ -752,7 +773,7 @@ function createSqliteOperationBackend(options) {
|
|
|
752
773
|
const rows = await execAll(query);
|
|
753
774
|
return rows.map((row, index) => ({
|
|
754
775
|
nodeId: row.node_id,
|
|
755
|
-
score:
|
|
776
|
+
score: chunkF4NHQHEZ_cjs.coerceNumericScore(row.score),
|
|
756
777
|
rank: index + 1,
|
|
757
778
|
...row.snippet === null ? {} : { snippet: row.snippet }
|
|
758
779
|
}));
|
|
@@ -771,14 +792,14 @@ function createSqliteOperationBackend(options) {
|
|
|
771
792
|
return operationBackend;
|
|
772
793
|
}
|
|
773
794
|
function createSqliteBackend(db, options = {}) {
|
|
774
|
-
const tables2 = options.tables ??
|
|
775
|
-
const fulltextStrategy = options.fulltext ??
|
|
795
|
+
const tables2 = options.tables ?? chunkZ3WO6MND_cjs.tables2;
|
|
796
|
+
const fulltextStrategy = options.fulltext ?? chunkJXUTCSXX_cjs.fts5Strategy;
|
|
776
797
|
const profileHints = options.executionProfile ?? {};
|
|
777
798
|
const executionAdapter = createSqliteExecutionAdapter(db, { profileHints });
|
|
778
799
|
const { isSync, transactionMode } = executionAdapter.profile;
|
|
779
800
|
const vectorStrategy = options.vector;
|
|
780
801
|
const capabilityOverrides = options.capabilities ?? {};
|
|
781
|
-
const capabilities =
|
|
802
|
+
const capabilities = chunkEKFUG4G7_cjs.normalizeGraphAnalyticsCapabilities({
|
|
782
803
|
...buildSqliteCapabilities({
|
|
783
804
|
fulltextStrategy,
|
|
784
805
|
vectorStrategy,
|
|
@@ -816,14 +837,14 @@ function createSqliteBackend(db, options = {}) {
|
|
|
816
837
|
tableNames.recordedEdges,
|
|
817
838
|
tableNames.recordedClock
|
|
818
839
|
];
|
|
819
|
-
const operationStrategy =
|
|
840
|
+
const operationStrategy = chunkH7VE3FL4_cjs.createSqliteOperationStrategy(
|
|
820
841
|
tables2,
|
|
821
842
|
fulltextStrategy
|
|
822
843
|
);
|
|
823
844
|
const serializedQueue = transactionMode === "none" ? void 0 : createSerializedExecutionQueue();
|
|
824
845
|
const matTable = tables2.contributionMaterializations;
|
|
825
846
|
async function ensureContributionMaterializationsTableImpl() {
|
|
826
|
-
await db.run(drizzleOrm.sql.raw(
|
|
847
|
+
await db.run(drizzleOrm.sql.raw(chunkZ3WO6MND_cjs.generateSqliteCreateTableSQL(matTable)));
|
|
827
848
|
}
|
|
828
849
|
async function getContributionMaterializationRow(identity) {
|
|
829
850
|
const rows = await db.select().from(matTable).where(
|
|
@@ -836,25 +857,25 @@ function createSqliteBackend(db, options = {}) {
|
|
|
836
857
|
);
|
|
837
858
|
const row = rows[0];
|
|
838
859
|
if (row === void 0) return void 0;
|
|
839
|
-
return
|
|
860
|
+
return chunkH7VE3FL4_cjs.mapContributionMaterializationRow(
|
|
840
861
|
row,
|
|
841
|
-
|
|
862
|
+
chunkH7VE3FL4_cjs.SQLITE_CONTRIBUTION_MAT_TIMESTAMPS.decode
|
|
842
863
|
);
|
|
843
864
|
}
|
|
844
865
|
async function getContributionMaterializationRows(graphId) {
|
|
845
866
|
const rows = await db.select().from(matTable).where(drizzleOrm.eq(matTable.graphId, graphId));
|
|
846
867
|
return rows.map(
|
|
847
|
-
(row) =>
|
|
868
|
+
(row) => chunkH7VE3FL4_cjs.mapContributionMaterializationRow(
|
|
848
869
|
row,
|
|
849
|
-
|
|
870
|
+
chunkH7VE3FL4_cjs.SQLITE_CONTRIBUTION_MAT_TIMESTAMPS.decode
|
|
850
871
|
)
|
|
851
872
|
);
|
|
852
873
|
}
|
|
853
874
|
async function recordContributionMaterializationRow(params) {
|
|
854
875
|
await db.insert(matTable).values(
|
|
855
|
-
|
|
876
|
+
chunkH7VE3FL4_cjs.buildContributionInsertValues(
|
|
856
877
|
params,
|
|
857
|
-
|
|
878
|
+
chunkH7VE3FL4_cjs.SQLITE_CONTRIBUTION_MAT_TIMESTAMPS.encode
|
|
858
879
|
)
|
|
859
880
|
).onConflictDoUpdate({
|
|
860
881
|
target: [
|
|
@@ -863,7 +884,7 @@ function createSqliteBackend(db, options = {}) {
|
|
|
863
884
|
matTable.owner,
|
|
864
885
|
matTable.tableName
|
|
865
886
|
],
|
|
866
|
-
set:
|
|
887
|
+
set: chunkH7VE3FL4_cjs.buildContributionOnConflictSet(
|
|
867
888
|
matTable.materializedAt,
|
|
868
889
|
params.materializedAt
|
|
869
890
|
)
|
|
@@ -883,9 +904,9 @@ function createSqliteBackend(db, options = {}) {
|
|
|
883
904
|
const rows = await executionAdapter.execute(
|
|
884
905
|
operationStrategy.buildTableExists(tableName)
|
|
885
906
|
);
|
|
886
|
-
return
|
|
907
|
+
return chunkH7VE3FL4_cjs.tableExistsFromRow(rows[0]);
|
|
887
908
|
}
|
|
888
|
-
const contributionMaterializer =
|
|
909
|
+
const contributionMaterializer = chunkH7VE3FL4_cjs.createContributionMaterializer({
|
|
889
910
|
dialect: "sqlite",
|
|
890
911
|
fulltextStrategy,
|
|
891
912
|
fulltextTableName: tables2.fulltextTableName,
|
|
@@ -1007,7 +1028,7 @@ function createSqliteBackend(db, options = {}) {
|
|
|
1007
1028
|
vectorStrategy,
|
|
1008
1029
|
contributionMaterializer
|
|
1009
1030
|
});
|
|
1010
|
-
return
|
|
1031
|
+
return chunkH7VE3FL4_cjs.gateFulltext(txBackend, contributionMaterializer.assertInitialized);
|
|
1011
1032
|
}
|
|
1012
1033
|
const backend = {
|
|
1013
1034
|
...operations,
|
|
@@ -1019,29 +1040,29 @@ function createSqliteBackend(db, options = {}) {
|
|
|
1019
1040
|
...options_.schemaWrite
|
|
1020
1041
|
});
|
|
1021
1042
|
}
|
|
1022
|
-
await
|
|
1023
|
-
const indexDefinitions = await
|
|
1043
|
+
await chunkH7VE3FL4_cjs.assertTrustedImportDatabaseEmpty(tx, tableNames);
|
|
1044
|
+
const indexDefinitions = await chunkH7VE3FL4_cjs.suspendSqliteSecondaryIndexes(
|
|
1024
1045
|
tx,
|
|
1025
1046
|
tableNames
|
|
1026
1047
|
);
|
|
1027
1048
|
const result = await fn(
|
|
1028
|
-
|
|
1049
|
+
chunkH7VE3FL4_cjs.createSqliteTrustedImportSession(executionAdapter, tableNames)
|
|
1029
1050
|
);
|
|
1030
|
-
await
|
|
1031
|
-
await
|
|
1051
|
+
await chunkH7VE3FL4_cjs.restoreSecondaryIndexes(tx, indexDefinitions);
|
|
1052
|
+
await chunkH7VE3FL4_cjs.analyzeImportedTables(tx, tableNames);
|
|
1032
1053
|
return result;
|
|
1033
1054
|
});
|
|
1034
1055
|
}
|
|
1035
1056
|
} : {},
|
|
1036
1057
|
async bootstrapTables() {
|
|
1037
|
-
const statements =
|
|
1058
|
+
const statements = chunkZ3WO6MND_cjs.generateSqliteDDL(tables2, fulltextStrategy);
|
|
1038
1059
|
for (const statement of statements) {
|
|
1039
1060
|
await db.run(drizzleOrm.sql.raw(statement));
|
|
1040
1061
|
}
|
|
1041
1062
|
},
|
|
1042
1063
|
async ensureRevisionOriginsTable() {
|
|
1043
1064
|
await db.run(
|
|
1044
|
-
drizzleOrm.sql.raw(
|
|
1065
|
+
drizzleOrm.sql.raw(chunkZ3WO6MND_cjs.generateSqliteCreateTableSQL(tables2.revisionOrigins))
|
|
1045
1066
|
);
|
|
1046
1067
|
},
|
|
1047
1068
|
// Every fulltext-touching method asserts the durable marker instead
|
|
@@ -1049,7 +1070,7 @@ function createSqliteBackend(db, options = {}) {
|
|
|
1049
1070
|
// uninitialized database throws `StoreNotInitializedError` rather
|
|
1050
1071
|
// than self-healing (#135). Shared verbatim with the tx-scoped gate
|
|
1051
1072
|
// via `gateFulltextMethods`.
|
|
1052
|
-
...
|
|
1073
|
+
...chunkH7VE3FL4_cjs.gateFulltextMethods(
|
|
1053
1074
|
operations,
|
|
1054
1075
|
contributionMaterializer.assertInitialized
|
|
1055
1076
|
),
|
|
@@ -1058,7 +1079,7 @@ function createSqliteBackend(db, options = {}) {
|
|
|
1058
1079
|
},
|
|
1059
1080
|
async ensureIndexMaterializationsTable() {
|
|
1060
1081
|
await db.run(
|
|
1061
|
-
drizzleOrm.sql.raw(
|
|
1082
|
+
drizzleOrm.sql.raw(chunkZ3WO6MND_cjs.generateSqliteCreateTableSQL(tables2.indexMaterializations))
|
|
1062
1083
|
);
|
|
1063
1084
|
},
|
|
1064
1085
|
async getIndexMaterialization(indexName) {
|
|
@@ -1066,26 +1087,26 @@ function createSqliteBackend(db, options = {}) {
|
|
|
1066
1087
|
const rows = await db.select().from(t).where(drizzleOrm.eq(t.indexName, indexName));
|
|
1067
1088
|
const row = rows[0];
|
|
1068
1089
|
if (row === void 0) return void 0;
|
|
1069
|
-
return
|
|
1090
|
+
return chunkH7VE3FL4_cjs.mapMaterializationRow(row, chunkH7VE3FL4_cjs.SQLITE_INDEX_MAT_TIMESTAMPS.decode);
|
|
1070
1091
|
},
|
|
1071
1092
|
async getIndexMaterializations(statusKeys) {
|
|
1072
1093
|
if (statusKeys.length === 0) return [];
|
|
1073
1094
|
const t = tables2.indexMaterializations;
|
|
1074
1095
|
const rows = await db.select().from(t).where(drizzleOrm.inArray(t.indexName, [...statusKeys]));
|
|
1075
1096
|
return rows.map(
|
|
1076
|
-
(row) =>
|
|
1097
|
+
(row) => chunkH7VE3FL4_cjs.mapMaterializationRow(row, chunkH7VE3FL4_cjs.SQLITE_INDEX_MAT_TIMESTAMPS.decode)
|
|
1077
1098
|
);
|
|
1078
1099
|
},
|
|
1079
1100
|
async recordIndexMaterialization(params) {
|
|
1080
1101
|
const t = tables2.indexMaterializations;
|
|
1081
1102
|
await db.insert(t).values(
|
|
1082
|
-
|
|
1103
|
+
chunkH7VE3FL4_cjs.buildMaterializationInsertValues(
|
|
1083
1104
|
params,
|
|
1084
|
-
|
|
1105
|
+
chunkH7VE3FL4_cjs.SQLITE_INDEX_MAT_TIMESTAMPS.encode
|
|
1085
1106
|
)
|
|
1086
1107
|
).onConflictDoUpdate({
|
|
1087
1108
|
target: t.indexName,
|
|
1088
|
-
set:
|
|
1109
|
+
set: chunkH7VE3FL4_cjs.buildMaterializationOnConflictSet(params.materializedAt)
|
|
1089
1110
|
});
|
|
1090
1111
|
},
|
|
1091
1112
|
async ensureContributionMaterializationsTable() {
|
|
@@ -1101,37 +1122,37 @@ function createSqliteBackend(db, options = {}) {
|
|
|
1101
1122
|
await contributionMaterializer.assertInitialized(graphId);
|
|
1102
1123
|
},
|
|
1103
1124
|
async ensureKindRemovalsTable() {
|
|
1104
|
-
await db.run(drizzleOrm.sql.raw(
|
|
1125
|
+
await db.run(drizzleOrm.sql.raw(chunkZ3WO6MND_cjs.generateSqliteCreateTableSQL(tables2.kindRemovals)));
|
|
1105
1126
|
},
|
|
1106
1127
|
async getPendingKindRemovals(graphId) {
|
|
1107
1128
|
const t = tables2.kindRemovals;
|
|
1108
1129
|
const rows = await db.select().from(t).where(drizzleOrm.and(drizzleOrm.eq(t.graphId, graphId), drizzleOrm.isNull(t.removedAt)));
|
|
1109
1130
|
return rows.map(
|
|
1110
|
-
(row) =>
|
|
1131
|
+
(row) => chunkH7VE3FL4_cjs.mapKindRemovalRow(row, chunkH7VE3FL4_cjs.SQLITE_KIND_REMOVAL_TIMESTAMPS.decode)
|
|
1111
1132
|
);
|
|
1112
1133
|
},
|
|
1113
1134
|
async getAllKindRemovals(graphId) {
|
|
1114
1135
|
const t = tables2.kindRemovals;
|
|
1115
1136
|
const rows = await db.select().from(t).where(drizzleOrm.eq(t.graphId, graphId));
|
|
1116
1137
|
return rows.map(
|
|
1117
|
-
(row) =>
|
|
1138
|
+
(row) => chunkH7VE3FL4_cjs.mapKindRemovalRow(row, chunkH7VE3FL4_cjs.SQLITE_KIND_REMOVAL_TIMESTAMPS.decode)
|
|
1118
1139
|
);
|
|
1119
1140
|
},
|
|
1120
1141
|
async recordKindRemoval(params) {
|
|
1121
1142
|
const t = tables2.kindRemovals;
|
|
1122
1143
|
await db.insert(t).values(
|
|
1123
|
-
|
|
1144
|
+
chunkH7VE3FL4_cjs.buildKindRemovalInsertValues(
|
|
1124
1145
|
params,
|
|
1125
|
-
|
|
1146
|
+
chunkH7VE3FL4_cjs.SQLITE_KIND_REMOVAL_TIMESTAMPS.encode
|
|
1126
1147
|
)
|
|
1127
1148
|
).onConflictDoUpdate({
|
|
1128
1149
|
target: [t.graphId, t.kindName, t.entity, t.schemaVersion],
|
|
1129
|
-
set:
|
|
1150
|
+
set: chunkH7VE3FL4_cjs.buildKindRemovalOnConflictSet(t.removedAt, params.removedAt)
|
|
1130
1151
|
});
|
|
1131
1152
|
},
|
|
1132
1153
|
async ensureReconciliationMarkersTable() {
|
|
1133
1154
|
await db.run(
|
|
1134
|
-
drizzleOrm.sql.raw(
|
|
1155
|
+
drizzleOrm.sql.raw(chunkZ3WO6MND_cjs.generateSqliteCreateTableSQL(tables2.reconciliationMarkers))
|
|
1135
1156
|
);
|
|
1136
1157
|
},
|
|
1137
1158
|
async ensureRuntimeContributions(graphId) {
|
|
@@ -1148,6 +1169,9 @@ function createSqliteBackend(db, options = {}) {
|
|
|
1148
1169
|
async verifyContributions(graphId, vectorSlots) {
|
|
1149
1170
|
return contributionMaterializer.verifyContributions(graphId, vectorSlots);
|
|
1150
1171
|
},
|
|
1172
|
+
async repairContributions(graphId, vectorSlots) {
|
|
1173
|
+
return contributionMaterializer.repairContributions(graphId, vectorSlots);
|
|
1174
|
+
},
|
|
1151
1175
|
// Vector counterparts of the runtime-contribution methods. Present
|
|
1152
1176
|
// only when a vector strategy is wired (omitted on a plain SQLite
|
|
1153
1177
|
// connection with no vector extension), mirroring the embedding/
|
|
@@ -1184,17 +1208,17 @@ function createSqliteBackend(db, options = {}) {
|
|
|
1184
1208
|
async refreshStatistics() {
|
|
1185
1209
|
try {
|
|
1186
1210
|
await db.run(
|
|
1187
|
-
|
|
1211
|
+
chunkOOA273IJ_cjs.toDrizzleSql(
|
|
1188
1212
|
chunkU5W4LKZV_cjs.sql`PRAGMA analysis_limit = ${chunkU5W4LKZV_cjs.sql.raw(String(SQLITE_ANALYZE_ROW_LIMIT))}`,
|
|
1189
1213
|
"sqlite"
|
|
1190
1214
|
)
|
|
1191
1215
|
);
|
|
1192
1216
|
} catch (error) {
|
|
1193
|
-
if (!
|
|
1217
|
+
if (!chunkJQXSZHF2_cjs.isSqliteNotAuthorizedError(error)) throw error;
|
|
1194
1218
|
}
|
|
1195
1219
|
for (const tableName of coreAnalyzeTables) {
|
|
1196
1220
|
await db.run(
|
|
1197
|
-
|
|
1221
|
+
chunkOOA273IJ_cjs.toDrizzleSql(
|
|
1198
1222
|
chunkU5W4LKZV_cjs.sql`ANALYZE ${chunkU5W4LKZV_cjs.sql.identifier(tableName)}`,
|
|
1199
1223
|
"sqlite"
|
|
1200
1224
|
)
|
|
@@ -1203,13 +1227,13 @@ function createSqliteBackend(db, options = {}) {
|
|
|
1203
1227
|
for (const tableName of recordedAnalyzeTables) {
|
|
1204
1228
|
try {
|
|
1205
1229
|
await db.run(
|
|
1206
|
-
|
|
1230
|
+
chunkOOA273IJ_cjs.toDrizzleSql(
|
|
1207
1231
|
chunkU5W4LKZV_cjs.sql`ANALYZE ${chunkU5W4LKZV_cjs.sql.identifier(tableName)}`,
|
|
1208
1232
|
"sqlite"
|
|
1209
1233
|
)
|
|
1210
1234
|
);
|
|
1211
1235
|
} catch (error) {
|
|
1212
|
-
if (!
|
|
1236
|
+
if (!chunkJQXSZHF2_cjs.isMissingTableError(error)) throw error;
|
|
1213
1237
|
}
|
|
1214
1238
|
}
|
|
1215
1239
|
},
|
|
@@ -1220,7 +1244,7 @@ function createSqliteBackend(db, options = {}) {
|
|
|
1220
1244
|
},
|
|
1221
1245
|
async commitSchemaVersionIfKindsEmpty(params, probes) {
|
|
1222
1246
|
return runSchemaWriteTransaction(
|
|
1223
|
-
(target) =>
|
|
1247
|
+
(target) => chunkH7VE3FL4_cjs.commitSchemaVersionIfKindsEmpty(target, params, probes)
|
|
1224
1248
|
);
|
|
1225
1249
|
},
|
|
1226
1250
|
async setActiveVersion(params) {
|
|
@@ -1235,7 +1259,7 @@ function createSqliteBackend(db, options = {}) {
|
|
|
1235
1259
|
return backend.transactionWithNative((tx) => fn(tx), options2);
|
|
1236
1260
|
},
|
|
1237
1261
|
async transactionWithNative(fn, options2) {
|
|
1238
|
-
const temporaryWrites = options2?.temporaryWrites ===
|
|
1262
|
+
const temporaryWrites = options2?.temporaryWrites === chunkEKFUG4G7_cjs.INTERNAL_TEMPORARY_WRITES;
|
|
1239
1263
|
if (temporaryWrites && options2.accessMode !== "read_only") {
|
|
1240
1264
|
throw new chunkC4F7VJ5D_cjs.ConfigurationError(
|
|
1241
1265
|
"Temporary-write transactions must be semantically read-only.",
|
|
@@ -1265,7 +1289,7 @@ function createSqliteBackend(db, options = {}) {
|
|
|
1265
1289
|
);
|
|
1266
1290
|
try {
|
|
1267
1291
|
const result = await fn(
|
|
1268
|
-
|
|
1292
|
+
chunkH7VE3FL4_cjs.gateFulltext(
|
|
1269
1293
|
txBackend,
|
|
1270
1294
|
contributionMaterializer.assertInitialized
|
|
1271
1295
|
),
|
|
@@ -1297,7 +1321,7 @@ function createSqliteBackend(db, options = {}) {
|
|
|
1297
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)."
|
|
1298
1322
|
);
|
|
1299
1323
|
}
|
|
1300
|
-
|
|
1324
|
+
chunkH7VE3FL4_cjs.assertAdoptedDialect(
|
|
1301
1325
|
externalTx,
|
|
1302
1326
|
sqliteCore.BaseSQLiteDatabase,
|
|
1303
1327
|
"sqlite"
|
|
@@ -1329,5 +1353,5 @@ function createTransactionBackend(options) {
|
|
|
1329
1353
|
}
|
|
1330
1354
|
|
|
1331
1355
|
exports.createSqliteBackend = createSqliteBackend;
|
|
1332
|
-
//# sourceMappingURL=chunk-
|
|
1333
|
-
//# sourceMappingURL=chunk-
|
|
1356
|
+
//# sourceMappingURL=chunk-P7GTYOLB.cjs.map
|
|
1357
|
+
//# sourceMappingURL=chunk-P7GTYOLB.cjs.map
|