@nicia-ai/typegraph 0.49.0 → 0.51.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/README.md +12 -0
- package/dist/backend/drizzle/indexes.cjs +11 -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 +7 -5
- package/dist/backend/index.cjs +190 -53
- package/dist/backend/index.d.cts +90 -4
- package/dist/backend/index.d.ts +90 -4
- package/dist/backend/index.js +9 -12
- package/dist/backend/postgres/index.cjs +36 -28
- package/dist/backend/postgres/index.d.cts +7 -7
- package/dist/backend/postgres/index.d.ts +7 -7
- package/dist/backend/postgres/index.js +19 -15
- package/dist/backend/postgres/pglite-store.cjs +7 -62
- package/dist/backend/postgres/pglite-store.cjs.map +1 -1
- package/dist/backend/postgres/pglite-store.d.cts +8 -8
- package/dist/backend/postgres/pglite-store.d.ts +8 -8
- package/dist/backend/postgres/pglite-store.js +7 -62
- package/dist/backend/postgres/pglite-store.js.map +1 -1
- package/dist/backend/postgres/pglite.cjs +21 -17
- package/dist/backend/postgres/pglite.d.cts +3 -3
- package/dist/backend/postgres/pglite.d.ts +3 -3
- package/dist/backend/postgres/pglite.js +20 -16
- package/dist/backend/sqlite/index.cjs +33 -25
- package/dist/backend/sqlite/index.d.cts +7 -7
- package/dist/backend/sqlite/index.d.ts +7 -7
- package/dist/backend/sqlite/index.js +17 -13
- package/dist/backend/sqlite/libsql.cjs +24 -20
- 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 +19 -15
- package/dist/backend/sqlite/libsql.js.map +1 -1
- package/dist/backend/sqlite/local-store.cjs +9 -64
- 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 +8 -64
- package/dist/backend/sqlite/local-store.js.map +1 -1
- package/dist/backend/sqlite/local.cjs +25 -20
- package/dist/backend/sqlite/local.d.cts +3 -3
- package/dist/backend/sqlite/local.d.ts +3 -3
- package/dist/backend/sqlite/local.js +21 -16
- package/dist/chunk-2CVDZCXH.cjs +1278 -0
- package/dist/chunk-2CVDZCXH.cjs.map +1 -0
- package/dist/{chunk-MYKHJI2J.js → chunk-2DWTBNSH.js} +3 -3
- package/dist/{chunk-MYKHJI2J.js.map → chunk-2DWTBNSH.js.map} +1 -1
- package/dist/{chunk-JB6T4GLL.cjs → chunk-2KCTP3U2.cjs} +870 -528
- package/dist/chunk-2KCTP3U2.cjs.map +1 -0
- package/dist/{chunk-OORXGFL5.cjs → chunk-322TBTOQ.cjs} +48 -48
- package/dist/{chunk-OORXGFL5.cjs.map → chunk-322TBTOQ.cjs.map} +1 -1
- package/dist/{chunk-FA2AFWLP.cjs → chunk-36SX6QXP.cjs} +31 -12
- package/dist/chunk-36SX6QXP.cjs.map +1 -0
- package/dist/{chunk-SDBBMD4N.js → chunk-36VYWVQU.js} +3 -3
- package/dist/{chunk-SDBBMD4N.js.map → chunk-36VYWVQU.js.map} +1 -1
- package/dist/chunk-4DKY6RIU.js +1253 -0
- package/dist/chunk-4DKY6RIU.js.map +1 -0
- package/dist/chunk-4QKOZYMV.js +9 -0
- package/dist/chunk-4QKOZYMV.js.map +1 -0
- package/dist/{chunk-WIC7DRXW.js → chunk-57JM6NW3.js} +9 -19
- package/dist/chunk-57JM6NW3.js.map +1 -0
- package/dist/chunk-5WWEYV4H.cjs +5113 -0
- package/dist/chunk-5WWEYV4H.cjs.map +1 -0
- package/dist/chunk-6KQEICJ6.cjs +12 -0
- package/dist/{chunk-MKJ4KXL5.cjs.map → chunk-6KQEICJ6.cjs.map} +1 -1
- package/dist/{chunk-DZAICA5J.js → chunk-6NKSE5AU.js} +4 -4
- package/dist/{chunk-DZAICA5J.js.map → chunk-6NKSE5AU.js.map} +1 -1
- package/dist/{chunk-KKBDXCLQ.js → chunk-6NLYIMJO.js} +4 -4
- package/dist/{chunk-KKBDXCLQ.js.map → chunk-6NLYIMJO.js.map} +1 -1
- package/dist/{chunk-BFUOME67.cjs → chunk-7B7I7YAW.cjs} +20 -11
- package/dist/chunk-7B7I7YAW.cjs.map +1 -0
- package/dist/{chunk-ZDKTPBGV.js → chunk-7G5IYROL.js} +6 -548
- package/dist/chunk-7G5IYROL.js.map +1 -0
- package/dist/{chunk-3DMMGT6S.js → chunk-7QFRK6PU.js} +4 -8
- package/dist/chunk-7QFRK6PU.js.map +1 -0
- package/dist/chunk-A4C4NJ5U.cjs +12 -0
- package/dist/chunk-A4C4NJ5U.cjs.map +1 -0
- package/dist/{chunk-CHAOFCHV.js → chunk-AH2A74OZ.js} +3 -3
- package/dist/{chunk-CHAOFCHV.js.map → chunk-AH2A74OZ.js.map} +1 -1
- package/dist/{chunk-UGHQV7MP.cjs → chunk-B3MN7EJR.cjs} +228 -162
- package/dist/chunk-B3MN7EJR.cjs.map +1 -0
- package/dist/{chunk-TZEGUG6D.cjs → chunk-BZ5MVITP.cjs} +4 -4
- package/dist/{chunk-TZEGUG6D.cjs.map → chunk-BZ5MVITP.cjs.map} +1 -1
- package/dist/{chunk-YVF2EM7B.js → chunk-CAI6SMP6.js} +3 -3
- package/dist/{chunk-YVF2EM7B.js.map → chunk-CAI6SMP6.js.map} +1 -1
- package/dist/{chunk-JONXFAPO.js → chunk-CBOD7TXH.js} +5 -5
- package/dist/{chunk-JONXFAPO.js.map → chunk-CBOD7TXH.js.map} +1 -1
- package/dist/{chunk-FQPEMEWX.cjs → chunk-CRZ56SZU.cjs} +81 -32
- package/dist/chunk-CRZ56SZU.cjs.map +1 -0
- package/dist/{chunk-DO7SAMEK.cjs → chunk-D3GWARN7.cjs} +47 -47
- package/dist/{chunk-DO7SAMEK.cjs.map → chunk-D3GWARN7.cjs.map} +1 -1
- package/dist/{chunk-QTD6HX4O.js → chunk-D3OUDFU7.js} +5 -5
- package/dist/{chunk-QTD6HX4O.js.map → chunk-D3OUDFU7.js.map} +1 -1
- package/dist/{chunk-2QGYQBS2.cjs → chunk-DWUDZ66O.cjs} +10 -10
- package/dist/{chunk-2QGYQBS2.cjs.map → chunk-DWUDZ66O.cjs.map} +1 -1
- package/dist/chunk-EKG2UXNX.cjs +23 -0
- package/dist/chunk-EKG2UXNX.cjs.map +1 -0
- package/dist/chunk-FMMW3KX7.cjs +148 -0
- package/dist/chunk-FMMW3KX7.cjs.map +1 -0
- package/dist/{chunk-XVWOYKIK.js → chunk-FZHF5UWR.js} +3 -3
- package/dist/{chunk-XVWOYKIK.js.map → chunk-FZHF5UWR.js.map} +1 -1
- package/dist/chunk-H2VWDQWC.cjs +571 -0
- package/dist/chunk-H2VWDQWC.cjs.map +1 -0
- package/dist/chunk-H4FY6OZK.js +13 -0
- package/dist/chunk-H4FY6OZK.js.map +1 -0
- package/dist/{chunk-EDN4Y4ZG.cjs → chunk-H5IJSROF.cjs} +9 -15
- package/dist/chunk-H5IJSROF.cjs.map +1 -0
- package/dist/chunk-HZUB5CON.js +27 -0
- package/dist/chunk-HZUB5CON.js.map +1 -0
- package/dist/{chunk-NACVVDWB.js → chunk-I5IOSA27.js} +103 -105
- package/dist/chunk-I5IOSA27.js.map +1 -0
- package/dist/{chunk-OI2GQ25X.cjs → chunk-I7YAY2VQ.cjs} +7 -7
- package/dist/{chunk-OI2GQ25X.cjs.map → chunk-I7YAY2VQ.cjs.map} +1 -1
- package/dist/chunk-IRCWIA3R.js +20 -0
- package/dist/chunk-IRCWIA3R.js.map +1 -0
- package/dist/chunk-IVQBLXBK.cjs +55 -0
- package/dist/chunk-IVQBLXBK.cjs.map +1 -0
- package/dist/{chunk-7SQSZN2J.js → chunk-IZD4HTCP.js} +5 -5
- package/dist/{chunk-7SQSZN2J.js.map → chunk-IZD4HTCP.js.map} +1 -1
- package/dist/{chunk-3FPR224C.cjs → chunk-JHRUZ73O.cjs} +116 -107
- package/dist/chunk-JHRUZ73O.cjs.map +1 -0
- package/dist/{chunk-EZEEWCFJ.cjs → chunk-JQKMEKKW.cjs} +525 -298
- package/dist/chunk-JQKMEKKW.cjs.map +1 -0
- package/dist/chunk-JVA3KDEA.cjs +691 -0
- package/dist/chunk-JVA3KDEA.cjs.map +1 -0
- package/dist/{chunk-5K2BKEBD.js → chunk-K46SDNQD.js} +10 -4
- package/dist/chunk-K46SDNQD.js.map +1 -0
- package/dist/{chunk-7LZJNLA5.js → chunk-K67P5DLL.js} +108 -42
- package/dist/chunk-K67P5DLL.js.map +1 -0
- package/dist/{chunk-3G5W2U2L.cjs → chunk-KACEYDYV.cjs} +335 -258
- package/dist/chunk-KACEYDYV.cjs.map +1 -0
- package/dist/{chunk-JFRT7S3B.cjs → chunk-L6EVYIID.cjs} +318 -478
- package/dist/chunk-L6EVYIID.cjs.map +1 -0
- package/dist/{chunk-SHFBB23Q.js → chunk-LI4K2KEJ.js} +6 -4
- package/dist/chunk-LI4K2KEJ.js.map +1 -0
- package/dist/chunk-LKZDQ2B4.js +1581 -0
- package/dist/chunk-LKZDQ2B4.js.map +1 -0
- package/dist/{chunk-WODMN3Q2.cjs → chunk-LLFPQOBA.cjs} +27 -27
- package/dist/{chunk-WODMN3Q2.cjs.map → chunk-LLFPQOBA.cjs.map} +1 -1
- package/dist/{chunk-P6YLZTRE.js → chunk-LZMQ3SFK.js} +3 -3
- package/dist/{chunk-P6YLZTRE.js.map → chunk-LZMQ3SFK.js.map} +1 -1
- package/dist/{chunk-HEV35TGT.js → chunk-M3VTS3F6.js} +13 -4
- package/dist/chunk-M3VTS3F6.js.map +1 -0
- package/dist/{chunk-TQHGE7UC.cjs → chunk-M5MSP3BI.cjs} +18 -10
- package/dist/chunk-M5MSP3BI.cjs.map +1 -0
- package/dist/{chunk-D4QLTJSM.js → chunk-NBOS7BY3.js} +63 -23
- package/dist/chunk-NBOS7BY3.js.map +1 -0
- package/dist/chunk-NGQDGL5X.js +140 -0
- package/dist/chunk-NGQDGL5X.js.map +1 -0
- package/dist/{chunk-SIT26LAZ.cjs → chunk-NLX5OWK7.cjs} +33 -5
- package/dist/chunk-NLX5OWK7.cjs.map +1 -0
- package/dist/chunk-NUQ2YFFH.cjs +1637 -0
- package/dist/chunk-NUQ2YFFH.cjs.map +1 -0
- package/dist/{chunk-UMGZDVOA.cjs → chunk-OGL4X4PH.cjs} +206 -208
- package/dist/chunk-OGL4X4PH.cjs.map +1 -0
- package/dist/{chunk-LRQKXRXO.cjs → chunk-OTNTGEXR.cjs} +4 -4
- package/dist/{chunk-LRQKXRXO.cjs.map → chunk-OTNTGEXR.cjs.map} +1 -1
- package/dist/chunk-OTWE63BW.js +53 -0
- package/dist/chunk-OTWE63BW.js.map +1 -0
- package/dist/chunk-PC5NGH5A.js +549 -0
- package/dist/chunk-PC5NGH5A.js.map +1 -0
- package/dist/{chunk-26YKDNUD.cjs → chunk-PS3TUWJM.cjs} +12 -10
- package/dist/chunk-PS3TUWJM.cjs.map +1 -0
- package/dist/{chunk-OMZ37BM2.js → chunk-PVFFH7TL.js} +5 -5
- package/dist/{chunk-OMZ37BM2.js.map → chunk-PVFFH7TL.js.map} +1 -1
- package/dist/chunk-QCD5JKU4.cjs +15 -0
- package/dist/chunk-QCD5JKU4.cjs.map +1 -0
- package/dist/{chunk-UGHG7PGX.js → chunk-QG5VEOKX.js} +30 -4
- package/dist/chunk-QG5VEOKX.js.map +1 -0
- package/dist/{chunk-TUNPBZY3.cjs → chunk-QLLZM5I3.cjs} +4 -4
- package/dist/{chunk-TUNPBZY3.cjs.map → chunk-QLLZM5I3.cjs.map} +1 -1
- package/dist/{chunk-BRRP76WO.js → chunk-RCBG6YMT.js} +781 -375
- package/dist/chunk-RCBG6YMT.js.map +1 -0
- package/dist/{chunk-LTXQOEIC.js → chunk-RI7RJH4G.js} +281 -204
- package/dist/chunk-RI7RJH4G.js.map +1 -0
- package/dist/{chunk-GYEG3ZLZ.cjs → chunk-RJMHU2MG.cjs} +121 -18
- package/dist/chunk-RJMHU2MG.cjs.map +1 -0
- package/dist/{chunk-GLHXM7C4.js → chunk-RVUL2HXY.js} +61 -23
- package/dist/chunk-RVUL2HXY.js.map +1 -0
- package/dist/chunk-RWUWTJQY.cjs +30 -0
- package/dist/chunk-RWUWTJQY.cjs.map +1 -0
- package/dist/{chunk-2O4PCIZ6.cjs → chunk-S5GU4LUN.cjs} +13 -13
- package/dist/{chunk-2O4PCIZ6.cjs.map → chunk-S5GU4LUN.cjs.map} +1 -1
- package/dist/{chunk-JPD2CTC3.js → chunk-SDPWO2Z5.js} +7 -7
- package/dist/{chunk-JPD2CTC3.js.map → chunk-SDPWO2Z5.js.map} +1 -1
- package/dist/{chunk-OVI7IXYX.js → chunk-SLGGT2XD.js} +3 -3
- package/dist/{chunk-OVI7IXYX.js.map → chunk-SLGGT2XD.js.map} +1 -1
- package/dist/{chunk-ROR5ZR6A.cjs → chunk-TIJUA4I6.cjs} +45 -45
- package/dist/{chunk-ROR5ZR6A.cjs.map → chunk-TIJUA4I6.cjs.map} +1 -1
- package/dist/{chunk-AOSSQDVO.cjs → chunk-TM54OBHX.cjs} +13 -13
- package/dist/{chunk-AOSSQDVO.cjs.map → chunk-TM54OBHX.cjs.map} +1 -1
- package/dist/{chunk-KF6K7TGH.js → chunk-TYEYRCXL.js} +766 -433
- package/dist/chunk-TYEYRCXL.js.map +1 -0
- package/dist/{chunk-Z2JCLZFJ.js → chunk-UKOVGCRN.js} +2151 -570
- package/dist/chunk-UKOVGCRN.js.map +1 -0
- package/dist/chunk-UYKDYE5D.cjs +12 -0
- package/dist/{chunk-CICO5GXD.cjs.map → chunk-UYKDYE5D.cjs.map} +1 -1
- package/dist/{chunk-S5TERQVW.js → chunk-VAAC7L57.js} +284 -66
- package/dist/chunk-VAAC7L57.js.map +1 -0
- package/dist/{chunk-7UOLHNWC.cjs → chunk-VKHXYVN7.cjs} +22 -33
- package/dist/chunk-VKHXYVN7.cjs.map +1 -0
- package/dist/{chunk-6NGW27EO.cjs → chunk-VLBTRXA2.cjs} +10 -10
- package/dist/{chunk-6NGW27EO.cjs.map → chunk-VLBTRXA2.cjs.map} +1 -1
- package/dist/{chunk-YIURNGXI.js → chunk-VUQZNUHU.js} +22 -6
- package/dist/chunk-VUQZNUHU.js.map +1 -0
- package/dist/{chunk-YYUHLYM2.cjs → chunk-WDM5WQK4.cjs} +183 -143
- package/dist/chunk-WDM5WQK4.cjs.map +1 -0
- package/dist/{chunk-ZFMCDJGB.js → chunk-WFSYYU4W.js} +70 -220
- package/dist/chunk-WFSYYU4W.js.map +1 -0
- package/dist/{chunk-SR725PWF.cjs → chunk-WRBV2FNH.cjs} +2065 -1659
- package/dist/chunk-WRBV2FNH.cjs.map +1 -0
- package/dist/{chunk-MRDBBHIZ.cjs → chunk-X4GDXBOP.cjs} +2 -2
- package/dist/chunk-X4GDXBOP.cjs.map +1 -0
- package/dist/chunk-XORONCV3.js +202 -0
- package/dist/chunk-XORONCV3.js.map +1 -0
- package/dist/{chunk-D5R42W5D.js → chunk-XZW2CTNO.js} +115 -12
- package/dist/chunk-XZW2CTNO.js.map +1 -0
- package/dist/{chunk-ZLONH2UD.js → chunk-YDEJQWOL.js} +2 -2
- package/dist/chunk-YDEJQWOL.js.map +1 -0
- package/dist/{chunk-2TYSSBU5.js → chunk-YT2IVFAI.js} +30 -21
- package/dist/chunk-YT2IVFAI.js.map +1 -0
- package/dist/chunk-ZGVTNKTX.cjs +217 -0
- package/dist/chunk-ZGVTNKTX.cjs.map +1 -0
- package/dist/core/index.cjs +29 -28
- package/dist/core/index.d.cts +4 -4
- package/dist/core/index.d.ts +4 -4
- package/dist/core/index.js +9 -8
- package/dist/{ddl-D_oW-EVO.d.ts → ddl-BvcbgzHo.d.ts} +3 -3
- package/dist/{ddl-BL1NZLMY.d.cts → ddl-Ufebz5q5.d.cts} +3 -3
- package/dist/graph-extension/index.cjs +21 -20
- package/dist/graph-extension/index.d.cts +2 -4
- package/dist/graph-extension/index.d.ts +2 -4
- package/dist/graph-extension/index.js +5 -4
- package/dist/graph-merge/index.cjs +324 -307
- package/dist/graph-merge/index.cjs.map +1 -1
- package/dist/graph-merge/index.d.cts +8 -9
- package/dist/graph-merge/index.d.ts +8 -9
- package/dist/graph-merge/index.js +51 -34
- package/dist/graph-merge/index.js.map +1 -1
- package/dist/index.cjs +224 -222
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -12
- package/dist/index.d.ts +11 -12
- package/dist/index.js +38 -36
- package/dist/index.js.map +1 -1
- package/dist/indexes/index.cjs +15 -13
- package/dist/indexes/index.d.cts +4 -4
- package/dist/indexes/index.d.ts +4 -4
- package/dist/indexes/index.js +8 -6
- package/dist/{ingestion-import-target-dNeL7iAv.d.ts → ingestion-import-target-CAs1OX-l.d.cts} +1 -1
- package/dist/{ingestion-import-target-XPxZYw89.d.cts → ingestion-import-target-DCQSPfNx.d.ts} +1 -1
- package/dist/interchange/index.cjs +57 -54
- package/dist/interchange/index.cjs.map +1 -1
- package/dist/interchange/index.d.cts +19 -8
- package/dist/interchange/index.d.ts +19 -8
- package/dist/interchange/index.js +21 -18
- package/dist/interchange/index.js.map +1 -1
- package/dist/local-store-impl-6DDTFM32.cjs +77 -0
- package/dist/local-store-impl-6DDTFM32.cjs.map +1 -0
- package/dist/local-store-impl-OXTOVU2J.js +75 -0
- package/dist/local-store-impl-OXTOVU2J.js.map +1 -0
- package/dist/{manager-CYaff3n3.d.cts → manager-B68OrPR2.d.ts} +29 -2
- package/dist/{manager-D9eRT_ns.d.ts → manager-D_t7oK69.d.cts} +29 -2
- package/dist/pglite-store-impl-6EMZGL7K.js +73 -0
- package/dist/pglite-store-impl-6EMZGL7K.js.map +1 -0
- package/dist/pglite-store-impl-GJG3Y7RP.cjs +75 -0
- package/dist/pglite-store-impl-GJG3Y7RP.cjs.map +1 -0
- package/dist/{postgres-CcL4bAHS.d.ts → postgres-BPLSVyHM.d.ts} +279 -2
- package/dist/{postgres-DMj39MEu.d.cts → postgres-CqvtFC2y.d.cts} +279 -2
- package/dist/profiler/index.d.cts +9 -9
- package/dist/profiler/index.d.ts +9 -9
- package/dist/provenance/index.cjs +59 -44
- 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 +28 -13
- package/dist/provenance/index.js.map +1 -1
- package/dist/{repair-validity-windows-BFNZvd_H.d.cts → repair-validity-windows-DEzCKAdy.d.cts} +7 -3
- package/dist/{repair-validity-windows-DlUSqwCg.d.ts → repair-validity-windows-GMdaS2AH.d.ts} +7 -3
- package/dist/resolve-D_H8MHtq.d.ts +1805 -0
- package/dist/resolve-WEW8gWws.d.cts +1805 -0
- package/dist/schema/index.cjs +48 -46
- package/dist/schema/index.d.cts +4 -6
- package/dist/schema/index.d.ts +4 -6
- package/dist/schema/index.js +21 -19
- package/dist/{searchable-bpE1bBfc.d.ts → searchable-C_UREI9K.d.ts} +1 -1
- package/dist/{searchable-DHJMh_nj.d.cts → searchable-ClgET_i7.d.cts} +1 -1
- package/dist/{sqlite-YppHrNFb.d.cts → sqlite-D1mXO9Kp.d.cts} +310 -2
- package/dist/{sqlite-D7Oz0SQh.d.ts → sqlite-MZA3oZNB.d.ts} +310 -2
- package/dist/{store-bphCSo7z.d.cts → store-CuFX7fCx.d.cts} +117 -31
- package/dist/{store-DRrFCx5x.d.ts → store-D-ZjXQpW.d.ts} +117 -31
- package/dist/{temporal-CbnLzTmM.d.ts → temporal-CpyEiRY8.d.cts} +1 -1
- package/dist/{temporal-5GqpYCk2.d.cts → temporal-y0Aep9Su.d.ts} +1 -1
- package/dist/{types-BqFZTQmV.d.cts → types-6yf0Vv-_.d.cts} +2016 -94
- package/dist/{types-BqFZTQmV.d.ts → types-6yf0Vv-_.d.ts} +2016 -94
- package/dist/{types-Bx74kaTt.d.ts → types-DzJ4dlzk.d.cts} +1 -1
- package/dist/{types-CXAhpW-c.d.cts → types-_vVSB9k-.d.ts} +1 -1
- package/dist/{where-O-k2wgYm.d.ts → where-DuG2LCLe.d.ts} +1 -1
- package/dist/{where-DI_Fqz-X.d.cts → where-Mhf_yyKX.d.cts} +1 -1
- package/package.json +7 -2
- package/dist/chunk-26YKDNUD.cjs.map +0 -1
- package/dist/chunk-2TYSSBU5.js.map +0 -1
- package/dist/chunk-3DMMGT6S.js.map +0 -1
- package/dist/chunk-3FPR224C.cjs.map +0 -1
- package/dist/chunk-3G5W2U2L.cjs.map +0 -1
- package/dist/chunk-3KOY4FH3.cjs +0 -934
- package/dist/chunk-3KOY4FH3.cjs.map +0 -1
- package/dist/chunk-3QNZ5SAJ.cjs +0 -3502
- package/dist/chunk-3QNZ5SAJ.cjs.map +0 -1
- package/dist/chunk-3U5ABFDW.cjs +0 -259
- package/dist/chunk-3U5ABFDW.cjs.map +0 -1
- package/dist/chunk-5K2BKEBD.js.map +0 -1
- package/dist/chunk-5PRKMB24.cjs +0 -124
- package/dist/chunk-5PRKMB24.cjs.map +0 -1
- package/dist/chunk-6LN7FIVU.js +0 -107
- package/dist/chunk-6LN7FIVU.js.map +0 -1
- package/dist/chunk-6SWPJEYN.js +0 -1126
- package/dist/chunk-6SWPJEYN.js.map +0 -1
- package/dist/chunk-7LZJNLA5.js.map +0 -1
- package/dist/chunk-7UOLHNWC.cjs.map +0 -1
- package/dist/chunk-BFUOME67.cjs.map +0 -1
- package/dist/chunk-BRRP76WO.js.map +0 -1
- package/dist/chunk-CICO5GXD.cjs +0 -12
- package/dist/chunk-D4QLTJSM.js.map +0 -1
- package/dist/chunk-D5R42W5D.js.map +0 -1
- package/dist/chunk-EDN4Y4ZG.cjs.map +0 -1
- package/dist/chunk-EZEEWCFJ.cjs.map +0 -1
- package/dist/chunk-FA2AFWLP.cjs.map +0 -1
- package/dist/chunk-FQPEMEWX.cjs.map +0 -1
- package/dist/chunk-GLHXM7C4.js.map +0 -1
- package/dist/chunk-GYEG3ZLZ.cjs.map +0 -1
- package/dist/chunk-HDL2ARHX.cjs +0 -1156
- package/dist/chunk-HDL2ARHX.cjs.map +0 -1
- package/dist/chunk-HEV35TGT.js.map +0 -1
- package/dist/chunk-I4GAZH5Z.js +0 -913
- package/dist/chunk-I4GAZH5Z.js.map +0 -1
- package/dist/chunk-JB6T4GLL.cjs.map +0 -1
- package/dist/chunk-JBQQ7THH.js +0 -20
- package/dist/chunk-JBQQ7THH.js.map +0 -1
- package/dist/chunk-JFRT7S3B.cjs.map +0 -1
- package/dist/chunk-KF6K7TGH.js.map +0 -1
- package/dist/chunk-L3LQNR34.cjs +0 -1254
- package/dist/chunk-L3LQNR34.cjs.map +0 -1
- package/dist/chunk-LTXQOEIC.js.map +0 -1
- package/dist/chunk-MKJ4KXL5.cjs +0 -12
- package/dist/chunk-MRDBBHIZ.cjs.map +0 -1
- package/dist/chunk-NACVVDWB.js.map +0 -1
- package/dist/chunk-NVY5CJFP.js +0 -244
- package/dist/chunk-NVY5CJFP.js.map +0 -1
- package/dist/chunk-PWLJ77UV.cjs +0 -23
- package/dist/chunk-PWLJ77UV.cjs.map +0 -1
- package/dist/chunk-S5TERQVW.js.map +0 -1
- package/dist/chunk-SHFBB23Q.js.map +0 -1
- package/dist/chunk-SIT26LAZ.cjs.map +0 -1
- package/dist/chunk-SR725PWF.cjs.map +0 -1
- package/dist/chunk-TQHGE7UC.cjs.map +0 -1
- package/dist/chunk-UGHG7PGX.js.map +0 -1
- package/dist/chunk-UGHQV7MP.cjs.map +0 -1
- package/dist/chunk-UMGZDVOA.cjs.map +0 -1
- package/dist/chunk-WIC7DRXW.js.map +0 -1
- package/dist/chunk-YIURNGXI.js.map +0 -1
- package/dist/chunk-YYUHLYM2.cjs.map +0 -1
- package/dist/chunk-Z2JCLZFJ.js.map +0 -1
- package/dist/chunk-ZDKTPBGV.js.map +0 -1
- package/dist/chunk-ZFMCDJGB.js.map +0 -1
- package/dist/chunk-ZLONH2UD.js.map +0 -1
- package/dist/index-COs_z6nV.d.cts +0 -1132
- package/dist/index-D7d1u2gr.d.ts +0 -1132
- package/dist/materialize-indexes-DJ3ykH59.d.ts +0 -266
- package/dist/materialize-indexes-DTtAnvfY.d.cts +0 -266
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var chunkMRDBBHIZ_cjs = require('./chunk-MRDBBHIZ.cjs');
|
|
3
|
+
var chunk5WWEYV4H_cjs = require('./chunk-5WWEYV4H.cjs');
|
|
4
|
+
var chunkLLFPQOBA_cjs = require('./chunk-LLFPQOBA.cjs');
|
|
5
|
+
var chunk36SX6QXP_cjs = require('./chunk-36SX6QXP.cjs');
|
|
6
|
+
var chunkNLX5OWK7_cjs = require('./chunk-NLX5OWK7.cjs');
|
|
7
|
+
var chunkNUQ2YFFH_cjs = require('./chunk-NUQ2YFFH.cjs');
|
|
8
|
+
var chunkH2VWDQWC_cjs = require('./chunk-H2VWDQWC.cjs');
|
|
9
|
+
var chunkH5IJSROF_cjs = require('./chunk-H5IJSROF.cjs');
|
|
10
|
+
var chunkX4GDXBOP_cjs = require('./chunk-X4GDXBOP.cjs');
|
|
12
11
|
var chunkN66HCGCY_cjs = require('./chunk-N66HCGCY.cjs');
|
|
13
12
|
var drizzleOrm = require('drizzle-orm');
|
|
14
13
|
var sqliteCore = require('drizzle-orm/sqlite-core');
|
|
@@ -100,14 +99,14 @@ function hasModernBindLimitByVersion(rows) {
|
|
|
100
99
|
}
|
|
101
100
|
function detectHardMaxBindParameters(transactionMode, hostedPlatform) {
|
|
102
101
|
if (hostedPlatform === "durable-object" || transactionMode === "do-sqlite") {
|
|
103
|
-
return
|
|
102
|
+
return chunkNUQ2YFFH_cjs.DURABLE_OBJECT_MAX_BIND_PARAMETERS;
|
|
104
103
|
}
|
|
105
|
-
if (hostedPlatform === "d1") return
|
|
104
|
+
if (hostedPlatform === "d1") return chunkNUQ2YFFH_cjs.D1_MAX_BIND_PARAMETERS;
|
|
106
105
|
return void 0;
|
|
107
106
|
}
|
|
108
107
|
function detectMaxBindParameters(sqliteClient, hardMaxBindParameters) {
|
|
109
108
|
if (hardMaxBindParameters !== void 0) return hardMaxBindParameters;
|
|
110
|
-
if (sqliteClient === void 0) return
|
|
109
|
+
if (sqliteClient === void 0) return chunkNUQ2YFFH_cjs.SQLITE_MAX_BIND_PARAMETERS;
|
|
111
110
|
try {
|
|
112
111
|
const compiled = parseCompiledMaxVariableNumber(
|
|
113
112
|
sqliteClient.prepare("PRAGMA compile_options").all()
|
|
@@ -116,9 +115,9 @@ function detectMaxBindParameters(sqliteClient, hardMaxBindParameters) {
|
|
|
116
115
|
const isModern = hasModernBindLimitByVersion(
|
|
117
116
|
sqliteClient.prepare("SELECT sqlite_version() AS version").all()
|
|
118
117
|
);
|
|
119
|
-
return isModern ?
|
|
118
|
+
return isModern ? chunkNUQ2YFFH_cjs.MODERN_SQLITE_MAX_BIND_PARAMETERS : chunkNUQ2YFFH_cjs.SQLITE_MAX_BIND_PARAMETERS;
|
|
120
119
|
} catch {
|
|
121
|
-
return
|
|
120
|
+
return chunkNUQ2YFFH_cjs.SQLITE_MAX_BIND_PARAMETERS;
|
|
122
121
|
}
|
|
123
122
|
}
|
|
124
123
|
function preparingClient(client) {
|
|
@@ -148,7 +147,7 @@ function resolveSqliteClient(db) {
|
|
|
148
147
|
return sqliteClient;
|
|
149
148
|
}
|
|
150
149
|
function getOrCreatePreparedStatement(cache, sqliteClient, sqlText, cacheMax) {
|
|
151
|
-
return
|
|
150
|
+
return chunk5WWEYV4H_cjs.getOrCreateLru(
|
|
152
151
|
cache,
|
|
153
152
|
sqlText,
|
|
154
153
|
cacheMax,
|
|
@@ -200,7 +199,7 @@ function createSqliteExecutionAdapter(db, statementCacheMaxOrOptions = {}) {
|
|
|
200
199
|
supportsCompiledExecution: sqliteClient !== void 0,
|
|
201
200
|
transactionMode
|
|
202
201
|
};
|
|
203
|
-
const compile = (query) =>
|
|
202
|
+
const compile = (query) => chunkLLFPQOBA_cjs.compileQueryWithDialect(db, query, "SQLite");
|
|
204
203
|
if (sqliteClient !== void 0) {
|
|
205
204
|
let executeCompiled2 = function(compiledQuery) {
|
|
206
205
|
const preparedStatement = getOrCreatePreparedStatement(
|
|
@@ -273,7 +272,7 @@ function createSqliteExecutionAdapter(db, statementCacheMaxOrOptions = {}) {
|
|
|
273
272
|
execute(query) {
|
|
274
273
|
return executeDrizzleQuery(
|
|
275
274
|
db,
|
|
276
|
-
|
|
275
|
+
chunkH5IJSROF_cjs.isSqlFragment(query) ? chunkLLFPQOBA_cjs.toDrizzleSql(query, "sqlite") : query
|
|
277
276
|
);
|
|
278
277
|
},
|
|
279
278
|
profile
|
|
@@ -297,6 +296,11 @@ var IDENTITY_TABLE_LOGICAL_NAMES = /* @__PURE__ */ new Set([
|
|
|
297
296
|
"identityClosure",
|
|
298
297
|
"identitySeparation"
|
|
299
298
|
]);
|
|
299
|
+
var RECORDED_TABLE_LOGICAL_NAMES = /* @__PURE__ */ new Set([
|
|
300
|
+
"recordedNodes",
|
|
301
|
+
"recordedEdges",
|
|
302
|
+
"recordedClock"
|
|
303
|
+
]);
|
|
300
304
|
function computeSqliteBatchChunkSizes(maxBindParameters) {
|
|
301
305
|
return {
|
|
302
306
|
checkUniqueBatchChunkSize: Math.max(
|
|
@@ -305,7 +309,7 @@ function computeSqliteBatchChunkSizes(maxBindParameters) {
|
|
|
305
309
|
),
|
|
306
310
|
embeddingUpsertBatchSize: Math.max(
|
|
307
311
|
1,
|
|
308
|
-
Math.floor(maxBindParameters /
|
|
312
|
+
Math.floor(maxBindParameters / chunk5WWEYV4H_cjs.EMBEDDING_UPSERT_PARAM_COUNT)
|
|
309
313
|
),
|
|
310
314
|
fulltextUpsertBatchSize: Math.max(
|
|
311
315
|
1,
|
|
@@ -321,7 +325,7 @@ function computeSqliteBatchChunkSizes(maxBindParameters) {
|
|
|
321
325
|
),
|
|
322
326
|
findEdgesEndpointChunkSize: Math.max(
|
|
323
327
|
1,
|
|
324
|
-
maxBindParameters -
|
|
328
|
+
maxBindParameters - chunk5WWEYV4H_cjs.FIND_EDGES_ENDPOINT_FIXED_PARAM_COUNT
|
|
325
329
|
),
|
|
326
330
|
getEdgesChunkSize: Math.max(
|
|
327
331
|
1,
|
|
@@ -345,11 +349,11 @@ function computeSqliteBatchChunkSizes(maxBindParameters) {
|
|
|
345
349
|
)
|
|
346
350
|
};
|
|
347
351
|
}
|
|
348
|
-
var toNodeRow =
|
|
349
|
-
var toEdgeRow =
|
|
350
|
-
var toUniqueRow =
|
|
351
|
-
var toSchemaVersionRow =
|
|
352
|
-
|
|
352
|
+
var toNodeRow = chunk36SX6QXP_cjs.createNodeRowMapper(chunk36SX6QXP_cjs.SQLITE_ROW_MAPPER_CONFIG);
|
|
353
|
+
var toEdgeRow = chunk36SX6QXP_cjs.createEdgeRowMapper(chunk36SX6QXP_cjs.SQLITE_ROW_MAPPER_CONFIG);
|
|
354
|
+
var toUniqueRow = chunk36SX6QXP_cjs.createUniqueRowMapper(chunk36SX6QXP_cjs.SQLITE_ROW_MAPPER_CONFIG);
|
|
355
|
+
var toSchemaVersionRow = chunk36SX6QXP_cjs.createSchemaVersionRowMapper(
|
|
356
|
+
chunk36SX6QXP_cjs.SQLITE_ROW_MAPPER_CONFIG
|
|
353
357
|
);
|
|
354
358
|
var PENDING_FOREVER = new Promise(noop);
|
|
355
359
|
function pendingForever() {
|
|
@@ -368,7 +372,7 @@ async function loadQueueTaskContext() {
|
|
|
368
372
|
void loadQueueTaskContext();
|
|
369
373
|
function rejectReentrantQueueSubmission() {
|
|
370
374
|
return Promise.reject(
|
|
371
|
-
new
|
|
375
|
+
new chunkX4GDXBOP_cjs.ConfigurationError(
|
|
372
376
|
"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.",
|
|
373
377
|
{ backend: "sqlite", capability: "concurrentRootAccess" },
|
|
374
378
|
{
|
|
@@ -389,7 +393,7 @@ function createSerializedExecutionQueue() {
|
|
|
389
393
|
disposed = true;
|
|
390
394
|
},
|
|
391
395
|
runExclusive(task) {
|
|
392
|
-
if (isDisposed()) return Promise.reject(new
|
|
396
|
+
if (isDisposed()) return Promise.reject(new chunkX4GDXBOP_cjs.BackendDisposedError());
|
|
393
397
|
if (queueTaskContext?.getStore() === taskMarker) {
|
|
394
398
|
return rejectReentrantQueueSubmission();
|
|
395
399
|
}
|
|
@@ -417,7 +421,7 @@ function runWithSerializedQueue(queue, task) {
|
|
|
417
421
|
return queue.runExclusive(task);
|
|
418
422
|
}
|
|
419
423
|
function throwSqliteTransactionsDisabled(message) {
|
|
420
|
-
throw new
|
|
424
|
+
throw new chunkX4GDXBOP_cjs.ConfigurationError(message, {
|
|
421
425
|
backend: "sqlite",
|
|
422
426
|
capability: "transactions",
|
|
423
427
|
supportsTransactions: false
|
|
@@ -425,20 +429,20 @@ function throwSqliteTransactionsDisabled(message) {
|
|
|
425
429
|
}
|
|
426
430
|
function buildSqliteCapabilities(options) {
|
|
427
431
|
const base = options.transactionMode === "none" ? {
|
|
428
|
-
...
|
|
432
|
+
...chunkNUQ2YFFH_cjs.SQLITE_CAPABILITIES,
|
|
429
433
|
transactions: false,
|
|
430
434
|
graphAnalytics: {
|
|
431
|
-
...
|
|
435
|
+
...chunkNUQ2YFFH_cjs.SQLITE_CAPABILITIES.graphAnalytics ?? {
|
|
432
436
|
mathFunctions: false
|
|
433
437
|
},
|
|
434
438
|
supported: false
|
|
435
439
|
}
|
|
436
|
-
} :
|
|
440
|
+
} : chunkNUQ2YFFH_cjs.SQLITE_CAPABILITIES;
|
|
437
441
|
return {
|
|
438
442
|
...base,
|
|
439
443
|
maxBindParameters: options.maxBindParameters,
|
|
440
|
-
fulltext:
|
|
441
|
-
...options.vectorStrategy === void 0 ? {} : { vector:
|
|
444
|
+
fulltext: chunkH2VWDQWC_cjs.buildFulltextCapabilities(options.fulltextStrategy),
|
|
445
|
+
...options.vectorStrategy === void 0 ? {} : { vector: chunkH2VWDQWC_cjs.buildVectorCapabilities(options.vectorStrategy) }
|
|
442
446
|
};
|
|
443
447
|
}
|
|
444
448
|
function resolveMaxBindParametersCapability(profile, override) {
|
|
@@ -446,7 +450,7 @@ function resolveMaxBindParametersCapability(profile, override) {
|
|
|
446
450
|
return profile.hardMaxBindParameters === void 0 ? requested : Math.min(requested, profile.hardMaxBindParameters);
|
|
447
451
|
}
|
|
448
452
|
function resolveSqliteGraphAnalyticsCapabilities(profile, override) {
|
|
449
|
-
const requested = override ??
|
|
453
|
+
const requested = override ?? chunkNUQ2YFFH_cjs.SQLITE_CAPABILITIES.graphAnalytics ?? {
|
|
450
454
|
supported: false,
|
|
451
455
|
mathFunctions: false
|
|
452
456
|
};
|
|
@@ -492,7 +496,7 @@ function createSqliteOperationBackend(options) {
|
|
|
492
496
|
return runWithSerializedQueue(serializedQueue, async () => {
|
|
493
497
|
if (compiledRun === void 0) {
|
|
494
498
|
await db.run(
|
|
495
|
-
|
|
499
|
+
chunkH5IJSROF_cjs.isSqlFragment(query) ? chunkLLFPQOBA_cjs.toDrizzleSql(query, "sqlite") : query
|
|
496
500
|
);
|
|
497
501
|
return;
|
|
498
502
|
}
|
|
@@ -500,17 +504,17 @@ function createSqliteOperationBackend(options) {
|
|
|
500
504
|
});
|
|
501
505
|
}
|
|
502
506
|
const batchConfig = computeSqliteBatchChunkSizes(
|
|
503
|
-
capabilities.maxBindParameters ??
|
|
507
|
+
capabilities.maxBindParameters ?? chunkNUQ2YFFH_cjs.SQLITE_MAX_BIND_PARAMETERS
|
|
504
508
|
);
|
|
505
|
-
const commonOperationMembers =
|
|
509
|
+
const commonOperationMembers = chunk5WWEYV4H_cjs.createCommonOperationBackend({
|
|
506
510
|
batchConfig,
|
|
507
511
|
execution: {
|
|
508
512
|
execAll,
|
|
509
513
|
execGet,
|
|
510
514
|
execRun
|
|
511
515
|
},
|
|
512
|
-
nowIso:
|
|
513
|
-
maxBindParameters: capabilities.maxBindParameters ??
|
|
516
|
+
nowIso: chunk36SX6QXP_cjs.nowIso,
|
|
517
|
+
maxBindParameters: capabilities.maxBindParameters ?? chunkNUQ2YFFH_cjs.SQLITE_MAX_BIND_PARAMETERS,
|
|
514
518
|
operationStrategy,
|
|
515
519
|
rowMappers: {
|
|
516
520
|
toEdgeRow,
|
|
@@ -530,28 +534,28 @@ function createSqliteOperationBackend(options) {
|
|
|
530
534
|
};
|
|
531
535
|
const vectorEmbeddingMethods = vectorStrategy === void 0 ? {} : {
|
|
532
536
|
async upsertEmbedding(params) {
|
|
533
|
-
const slot =
|
|
537
|
+
const slot = chunk5WWEYV4H_cjs.vectorSlotFromParams(params);
|
|
534
538
|
await contributionMaterializer.assertVectorSlot(slot);
|
|
535
|
-
const statements = vectorStrategy.buildUpsert(slot, params,
|
|
539
|
+
const statements = vectorStrategy.buildUpsert(slot, params, chunk36SX6QXP_cjs.nowIso());
|
|
536
540
|
try {
|
|
537
541
|
for (const statement of statements) {
|
|
538
542
|
await execRun(statement);
|
|
539
543
|
}
|
|
540
544
|
} catch (error) {
|
|
541
|
-
throw
|
|
545
|
+
throw chunk5WWEYV4H_cjs.mapVectorWriteError(error, params);
|
|
542
546
|
}
|
|
543
547
|
},
|
|
544
548
|
async upsertEmbeddingBatch(params) {
|
|
545
549
|
if (params.rows.length === 0) return;
|
|
546
|
-
const slot =
|
|
550
|
+
const slot = chunk5WWEYV4H_cjs.vectorSlotFromParams(params);
|
|
547
551
|
await contributionMaterializer.assertVectorSlot(slot);
|
|
548
552
|
const rowsById = new Map(
|
|
549
553
|
params.rows.map((row) => [row.nodeId, row])
|
|
550
554
|
);
|
|
551
555
|
const rows = [...rowsById.values()];
|
|
552
|
-
const timestamp =
|
|
556
|
+
const timestamp = chunk36SX6QXP_cjs.nowIso();
|
|
553
557
|
try {
|
|
554
|
-
for (const chunk2 of
|
|
558
|
+
for (const chunk2 of chunkNLX5OWK7_cjs.chunk(
|
|
555
559
|
rows,
|
|
556
560
|
batchConfig.embeddingUpsertBatchSize
|
|
557
561
|
)) {
|
|
@@ -580,11 +584,11 @@ function createSqliteOperationBackend(options) {
|
|
|
580
584
|
}
|
|
581
585
|
}
|
|
582
586
|
} catch (error) {
|
|
583
|
-
throw
|
|
587
|
+
throw chunk5WWEYV4H_cjs.mapVectorWriteError(error, params);
|
|
584
588
|
}
|
|
585
589
|
},
|
|
586
590
|
async deleteEmbedding(params) {
|
|
587
|
-
const slot =
|
|
591
|
+
const slot = chunk5WWEYV4H_cjs.vectorSlotFromParams(params);
|
|
588
592
|
await contributionMaterializer.assertVectorSlot(slot);
|
|
589
593
|
const statements = vectorStrategy.buildDelete(slot, params);
|
|
590
594
|
for (const statement of statements) {
|
|
@@ -593,9 +597,9 @@ function createSqliteOperationBackend(options) {
|
|
|
593
597
|
},
|
|
594
598
|
async deleteEmbeddingBatch(params) {
|
|
595
599
|
if (params.nodeIds.length === 0) return;
|
|
596
|
-
const slot =
|
|
600
|
+
const slot = chunk5WWEYV4H_cjs.vectorSlotFromParams(params);
|
|
597
601
|
await contributionMaterializer.assertVectorSlot(slot);
|
|
598
|
-
for (const nodeIds of
|
|
602
|
+
for (const nodeIds of chunkNLX5OWK7_cjs.chunk(
|
|
599
603
|
[...new Set(params.nodeIds)],
|
|
600
604
|
batchConfig.embeddingUpsertBatchSize
|
|
601
605
|
)) {
|
|
@@ -607,33 +611,33 @@ function createSqliteOperationBackend(options) {
|
|
|
607
611
|
}
|
|
608
612
|
},
|
|
609
613
|
async vectorSearch(params) {
|
|
610
|
-
|
|
611
|
-
|
|
614
|
+
chunkH2VWDQWC_cjs.assertVectorSearchLimit(params.limit);
|
|
615
|
+
chunkH2VWDQWC_cjs.resolveEfSearchOverride({
|
|
612
616
|
efSearch: params.efSearch,
|
|
613
617
|
indexType: params.indexType,
|
|
614
|
-
tuning:
|
|
618
|
+
tuning: chunkH2VWDQWC_cjs.vectorSearchFrontierTuning(vectorStrategy),
|
|
615
619
|
transactions: capabilities.transactions,
|
|
616
620
|
dialect: "SQLite",
|
|
617
621
|
engine: vectorStrategy.name
|
|
618
622
|
});
|
|
619
|
-
const slot =
|
|
623
|
+
const slot = chunk5WWEYV4H_cjs.vectorSlotFromParams(params);
|
|
620
624
|
const query = vectorStrategy.buildSearch(
|
|
621
625
|
slot,
|
|
622
626
|
params,
|
|
623
627
|
// Store-compiled candidates (predicates + subclass + currency)
|
|
624
628
|
// take precedence; the live-node default covers direct backend use.
|
|
625
|
-
params.candidates ??
|
|
629
|
+
params.candidates ?? chunk5WWEYV4H_cjs.buildLiveNodeCandidates(
|
|
626
630
|
tableNames.nodes,
|
|
627
631
|
params.graphId,
|
|
628
632
|
params.nodeKind,
|
|
629
|
-
|
|
633
|
+
chunk36SX6QXP_cjs.nowIso()
|
|
630
634
|
)
|
|
631
635
|
);
|
|
632
636
|
let rows;
|
|
633
637
|
try {
|
|
634
638
|
rows = await execAll(query);
|
|
635
639
|
} catch (error) {
|
|
636
|
-
throw
|
|
640
|
+
throw chunk5WWEYV4H_cjs.mapVectorWriteError(error, params);
|
|
637
641
|
}
|
|
638
642
|
return rows.map((row) => ({
|
|
639
643
|
nodeId: row.node_id,
|
|
@@ -645,17 +649,17 @@ function createSqliteOperationBackend(options) {
|
|
|
645
649
|
// fallback by simply not exposing the member.
|
|
646
650
|
...capabilities.windowFunctions ? {
|
|
647
651
|
async hybridSearch(params) {
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
652
|
+
chunkH2VWDQWC_cjs.assertVectorSearchLimit(params.limit);
|
|
653
|
+
chunkH2VWDQWC_cjs.assertVectorSearchLimit(params.vector.k);
|
|
654
|
+
chunkH2VWDQWC_cjs.resolveEfSearchOverride({
|
|
651
655
|
efSearch: params.vector.efSearch,
|
|
652
656
|
indexType: params.vector.indexType,
|
|
653
|
-
tuning:
|
|
657
|
+
tuning: chunkH2VWDQWC_cjs.vectorSearchFrontierTuning(vectorStrategy),
|
|
654
658
|
transactions: capabilities.transactions,
|
|
655
659
|
dialect: "SQLite",
|
|
656
660
|
engine: vectorStrategy.name
|
|
657
661
|
});
|
|
658
|
-
const slot =
|
|
662
|
+
const slot = chunk5WWEYV4H_cjs.vectorSlotFromParams({
|
|
659
663
|
graphId: params.graphId,
|
|
660
664
|
nodeKind: params.nodeKind,
|
|
661
665
|
fieldPath: params.vector.fieldPath,
|
|
@@ -663,11 +667,11 @@ function createSqliteOperationBackend(options) {
|
|
|
663
667
|
metric: params.vector.metric,
|
|
664
668
|
indexType: params.vector.indexType
|
|
665
669
|
});
|
|
666
|
-
const candidates = params.candidates ??
|
|
670
|
+
const candidates = params.candidates ?? chunk5WWEYV4H_cjs.buildLiveNodeCandidates(
|
|
667
671
|
tableNames.nodes,
|
|
668
672
|
params.graphId,
|
|
669
673
|
params.nodeKind,
|
|
670
|
-
|
|
674
|
+
chunk36SX6QXP_cjs.nowIso()
|
|
671
675
|
);
|
|
672
676
|
const vectorParams = {
|
|
673
677
|
graphId: params.graphId,
|
|
@@ -683,20 +687,20 @@ function createSqliteOperationBackend(options) {
|
|
|
683
687
|
const vectorSql = vectorStrategy.buildSearch(
|
|
684
688
|
slot,
|
|
685
689
|
vectorParams,
|
|
686
|
-
|
|
690
|
+
chunkH5IJSROF_cjs.sql.raw("SELECT node_id FROM tg_hybrid_cand")
|
|
687
691
|
);
|
|
688
692
|
const statement = operationStrategy.buildHybridSearch(
|
|
689
693
|
{ ...params, candidates },
|
|
690
|
-
|
|
694
|
+
chunkLLFPQOBA_cjs.toDrizzleSql(vectorSql, "sqlite"),
|
|
691
695
|
params.vector.metric === "cosine"
|
|
692
696
|
);
|
|
693
697
|
let raw;
|
|
694
698
|
try {
|
|
695
699
|
raw = await execAll(statement);
|
|
696
700
|
} catch (error) {
|
|
697
|
-
throw
|
|
701
|
+
throw chunk5WWEYV4H_cjs.mapVectorWriteError(error, vectorParams);
|
|
698
702
|
}
|
|
699
|
-
return raw.map((row) =>
|
|
703
|
+
return raw.map((row) => chunk5WWEYV4H_cjs.mapHybridSearchRow(row, toNodeRow));
|
|
700
704
|
}
|
|
701
705
|
} : {}
|
|
702
706
|
};
|
|
@@ -741,7 +745,7 @@ function createSqliteOperationBackend(options) {
|
|
|
741
745
|
...vectorStrategy === void 0 ? {} : { vectorStrategy },
|
|
742
746
|
async lockSchemaVersionForWrite(params) {
|
|
743
747
|
if (!transactionScoped) {
|
|
744
|
-
throw new
|
|
748
|
+
throw new chunkX4GDXBOP_cjs.ConfigurationError(
|
|
745
749
|
"The schema write fence requires an explicit SQLite transaction.",
|
|
746
750
|
{
|
|
747
751
|
code: "SCHEMA_WRITE_FENCE_TRANSACTION_REQUIRED",
|
|
@@ -752,7 +756,7 @@ function createSqliteOperationBackend(options) {
|
|
|
752
756
|
const active = await commonOperationMembers.getActiveSchema(
|
|
753
757
|
params.graphId
|
|
754
758
|
);
|
|
755
|
-
|
|
759
|
+
chunk5WWEYV4H_cjs.assertActiveSchemaVersion(
|
|
756
760
|
params.graphId,
|
|
757
761
|
params.expectedVersion,
|
|
758
762
|
active?.version ?? 0
|
|
@@ -760,7 +764,7 @@ function createSqliteOperationBackend(options) {
|
|
|
760
764
|
},
|
|
761
765
|
async createVectorIndex(params) {
|
|
762
766
|
if (vectorStrategy === void 0) return;
|
|
763
|
-
const slot =
|
|
767
|
+
const slot = chunk5WWEYV4H_cjs.vectorSlotFromCreateIndexParams(params);
|
|
764
768
|
await contributionMaterializer.ensureVectorSlot(slot);
|
|
765
769
|
const indexStatement = vectorStrategy.buildCreateIndex?.(slot);
|
|
766
770
|
if (indexStatement !== void 0) {
|
|
@@ -769,18 +773,18 @@ function createSqliteOperationBackend(options) {
|
|
|
769
773
|
},
|
|
770
774
|
async dropVectorIndex(params) {
|
|
771
775
|
if (vectorStrategy === void 0) return;
|
|
772
|
-
const slot =
|
|
776
|
+
const slot = chunk5WWEYV4H_cjs.vectorSlotFromDropIndexParams(params);
|
|
773
777
|
const dropStatement = vectorStrategy.buildDropIndex?.(slot);
|
|
774
778
|
if (dropStatement === void 0) return;
|
|
775
779
|
try {
|
|
776
780
|
await execRun(dropStatement);
|
|
777
781
|
} catch (error) {
|
|
778
|
-
if (!
|
|
782
|
+
if (!chunkNLX5OWK7_cjs.isMissingTableError(error)) throw error;
|
|
779
783
|
}
|
|
780
784
|
},
|
|
781
785
|
// === Fulltext Operations ===
|
|
782
786
|
async upsertFulltext(params) {
|
|
783
|
-
const timestamp =
|
|
787
|
+
const timestamp = chunk36SX6QXP_cjs.nowIso();
|
|
784
788
|
const statements = operationStrategy.buildUpsertFulltext(
|
|
785
789
|
params,
|
|
786
790
|
timestamp
|
|
@@ -797,8 +801,8 @@ function createSqliteOperationBackend(options) {
|
|
|
797
801
|
},
|
|
798
802
|
async upsertFulltextBatch(params) {
|
|
799
803
|
if (params.rows.length === 0) return;
|
|
800
|
-
const timestamp =
|
|
801
|
-
for (const rows of
|
|
804
|
+
const timestamp = chunk36SX6QXP_cjs.nowIso();
|
|
805
|
+
for (const rows of chunkNLX5OWK7_cjs.chunk(
|
|
802
806
|
params.rows,
|
|
803
807
|
batchConfig.fulltextUpsertBatchSize
|
|
804
808
|
)) {
|
|
@@ -813,7 +817,7 @@ function createSqliteOperationBackend(options) {
|
|
|
813
817
|
},
|
|
814
818
|
async deleteFulltextBatch(params) {
|
|
815
819
|
if (params.nodeIds.length === 0) return;
|
|
816
|
-
for (const nodeIds of
|
|
820
|
+
for (const nodeIds of chunkNLX5OWK7_cjs.chunk(
|
|
817
821
|
params.nodeIds,
|
|
818
822
|
batchConfig.fulltextDeleteChunkSize
|
|
819
823
|
)) {
|
|
@@ -831,7 +835,7 @@ function createSqliteOperationBackend(options) {
|
|
|
831
835
|
const rows = await execAll(query);
|
|
832
836
|
return rows.map((row, index) => ({
|
|
833
837
|
nodeId: row.node_id,
|
|
834
|
-
score:
|
|
838
|
+
score: chunk36SX6QXP_cjs.coerceNumericScore(row.score),
|
|
835
839
|
rank: index + 1,
|
|
836
840
|
...row.snippet === null ? {} : { snippet: row.snippet }
|
|
837
841
|
}));
|
|
@@ -864,18 +868,18 @@ function getSerializedSqliteConnection(db) {
|
|
|
864
868
|
return isLocalLibsqlClient(client) ? client : void 0;
|
|
865
869
|
}
|
|
866
870
|
function createSqliteBackend(db, options = {}) {
|
|
867
|
-
const resourceAudit =
|
|
871
|
+
const resourceAudit = chunkNLX5OWK7_cjs.resolveDeclaredBackendResource(
|
|
868
872
|
getSerializedSqliteConnection(db),
|
|
869
873
|
options.serializedResource
|
|
870
874
|
);
|
|
871
|
-
const tables2 = options.tables ??
|
|
872
|
-
const fulltextStrategy = options.fulltext ??
|
|
875
|
+
const tables2 = options.tables ?? chunk5WWEYV4H_cjs.tables2;
|
|
876
|
+
const fulltextStrategy = options.fulltext ?? chunkH2VWDQWC_cjs.fts5Strategy;
|
|
873
877
|
const profileHints = options.executionProfile ?? {};
|
|
874
878
|
const executionAdapter = createSqliteExecutionAdapter(db, { profileHints });
|
|
875
879
|
const { isSync, transactionMode } = executionAdapter.profile;
|
|
876
880
|
const vectorStrategy = options.vector;
|
|
877
881
|
const capabilityOverrides = options.capabilities ?? {};
|
|
878
|
-
const declaredCapabilities =
|
|
882
|
+
const declaredCapabilities = chunkNUQ2YFFH_cjs.normalizeGraphAnalyticsCapabilities({
|
|
879
883
|
...buildSqliteCapabilities({
|
|
880
884
|
fulltextStrategy,
|
|
881
885
|
vectorStrategy,
|
|
@@ -892,18 +896,20 @@ function createSqliteBackend(db, options = {}) {
|
|
|
892
896
|
capabilityOverrides.graphAnalytics
|
|
893
897
|
)
|
|
894
898
|
});
|
|
895
|
-
const capabilities =
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
899
|
+
const capabilities = chunk5WWEYV4H_cjs.assertBundledCapabilityDeclarations(
|
|
900
|
+
{
|
|
901
|
+
...declaredCapabilities,
|
|
902
|
+
contributions: {
|
|
903
|
+
supported: true,
|
|
904
|
+
probe: true,
|
|
905
|
+
rebuild: chunk5WWEYV4H_cjs.contributionRebuildSupported(
|
|
906
|
+
fulltextStrategy,
|
|
907
|
+
tables2.fulltextTableName,
|
|
908
|
+
declaredCapabilities.transactions
|
|
909
|
+
)
|
|
910
|
+
}
|
|
905
911
|
}
|
|
906
|
-
|
|
912
|
+
);
|
|
907
913
|
const tableNames = {
|
|
908
914
|
nodes: drizzleOrm.getTableName(tables2.nodes),
|
|
909
915
|
edges: drizzleOrm.getTableName(tables2.edges),
|
|
@@ -916,7 +922,8 @@ function createSqliteBackend(db, options = {}) {
|
|
|
916
922
|
identityClosure: drizzleOrm.getTableName(tables2.identityClosure),
|
|
917
923
|
identitySeparation: drizzleOrm.getTableName(tables2.identitySeparation),
|
|
918
924
|
fulltext: tables2.fulltextTableName,
|
|
919
|
-
uniques: drizzleOrm.getTableName(tables2.uniques)
|
|
925
|
+
uniques: drizzleOrm.getTableName(tables2.uniques),
|
|
926
|
+
edgeClaims: drizzleOrm.getTableName(tables2.edgeClaims)
|
|
920
927
|
};
|
|
921
928
|
const coreAnalyzeTables = [
|
|
922
929
|
tableNames.nodes,
|
|
@@ -933,14 +940,14 @@ function createSqliteBackend(db, options = {}) {
|
|
|
933
940
|
tableNames.identityClosure,
|
|
934
941
|
tableNames.identitySeparation
|
|
935
942
|
];
|
|
936
|
-
const operationStrategy =
|
|
943
|
+
const operationStrategy = chunk5WWEYV4H_cjs.createSqliteOperationStrategy(
|
|
937
944
|
tables2,
|
|
938
945
|
fulltextStrategy
|
|
939
946
|
);
|
|
940
947
|
const serializedQueue = transactionMode === "none" ? void 0 : createSerializedExecutionQueue();
|
|
941
948
|
const matTable = tables2.contributionMaterializations;
|
|
942
949
|
async function ensureContributionMaterializationsTableImpl() {
|
|
943
|
-
await db.run(drizzleOrm.sql.raw(
|
|
950
|
+
await db.run(drizzleOrm.sql.raw(chunk5WWEYV4H_cjs.generateSqliteCreateTableSQL(matTable)));
|
|
944
951
|
}
|
|
945
952
|
async function getContributionMaterializationRow(identity) {
|
|
946
953
|
const rows = await db.select().from(matTable).where(
|
|
@@ -953,25 +960,25 @@ function createSqliteBackend(db, options = {}) {
|
|
|
953
960
|
);
|
|
954
961
|
const row = rows[0];
|
|
955
962
|
if (row === void 0) return void 0;
|
|
956
|
-
return
|
|
963
|
+
return chunk5WWEYV4H_cjs.mapContributionMaterializationRow(
|
|
957
964
|
row,
|
|
958
|
-
|
|
965
|
+
chunk5WWEYV4H_cjs.SQLITE_CONTRIBUTION_MAT_TIMESTAMPS.decode
|
|
959
966
|
);
|
|
960
967
|
}
|
|
961
968
|
async function getContributionMaterializationRows(graphId) {
|
|
962
969
|
const rows = await db.select().from(matTable).where(drizzleOrm.eq(matTable.graphId, graphId));
|
|
963
970
|
return rows.map(
|
|
964
|
-
(row) =>
|
|
971
|
+
(row) => chunk5WWEYV4H_cjs.mapContributionMaterializationRow(
|
|
965
972
|
row,
|
|
966
|
-
|
|
973
|
+
chunk5WWEYV4H_cjs.SQLITE_CONTRIBUTION_MAT_TIMESTAMPS.decode
|
|
967
974
|
)
|
|
968
975
|
);
|
|
969
976
|
}
|
|
970
977
|
async function recordContributionMaterializationRow(params) {
|
|
971
978
|
await db.insert(matTable).values(
|
|
972
|
-
|
|
979
|
+
chunk5WWEYV4H_cjs.buildContributionInsertValues(
|
|
973
980
|
params,
|
|
974
|
-
|
|
981
|
+
chunk5WWEYV4H_cjs.SQLITE_CONTRIBUTION_MAT_TIMESTAMPS.encode
|
|
975
982
|
)
|
|
976
983
|
).onConflictDoUpdate({
|
|
977
984
|
target: [
|
|
@@ -980,7 +987,7 @@ function createSqliteBackend(db, options = {}) {
|
|
|
980
987
|
matTable.owner,
|
|
981
988
|
matTable.tableName
|
|
982
989
|
],
|
|
983
|
-
set:
|
|
990
|
+
set: chunk5WWEYV4H_cjs.buildContributionOnConflictSet(
|
|
984
991
|
matTable.materializedAt,
|
|
985
992
|
params.materializedAt
|
|
986
993
|
)
|
|
@@ -1000,21 +1007,32 @@ function createSqliteBackend(db, options = {}) {
|
|
|
1000
1007
|
const rows = await executionAdapter.execute(
|
|
1001
1008
|
operationStrategy.buildTableExists(tableName)
|
|
1002
1009
|
);
|
|
1003
|
-
return
|
|
1010
|
+
return chunk5WWEYV4H_cjs.tableExistsFromRow(rows[0]);
|
|
1004
1011
|
}
|
|
1005
1012
|
function identityContributionsFor(identityTableNames) {
|
|
1006
|
-
const identityTables =
|
|
1013
|
+
const identityTables = chunk5WWEYV4H_cjs.createSqliteTables({
|
|
1007
1014
|
identityAssertions: identityTableNames.identityAssertions,
|
|
1008
1015
|
recordedIdentityAssertions: identityTableNames.recordedIdentityAssertions,
|
|
1009
1016
|
identityClosure: identityTableNames.identityClosure,
|
|
1010
1017
|
identitySeparation: identityTableNames.identitySeparation
|
|
1011
1018
|
});
|
|
1012
|
-
return
|
|
1019
|
+
return chunk5WWEYV4H_cjs.sqliteContributions(identityTables, fulltextStrategy).filter(
|
|
1013
1020
|
(contribution) => IDENTITY_TABLE_LOGICAL_NAMES.has(contribution.logicalName)
|
|
1014
1021
|
);
|
|
1015
1022
|
}
|
|
1016
|
-
|
|
1023
|
+
function recordedContributionsFor(recordedTableNames) {
|
|
1024
|
+
const recordedTables = chunk5WWEYV4H_cjs.createSqliteTables({
|
|
1025
|
+
recordedNodes: recordedTableNames.recordedNodes,
|
|
1026
|
+
recordedEdges: recordedTableNames.recordedEdges,
|
|
1027
|
+
recordedClock: recordedTableNames.recordedClock
|
|
1028
|
+
});
|
|
1029
|
+
return chunk5WWEYV4H_cjs.sqliteContributions(recordedTables, fulltextStrategy).filter(
|
|
1030
|
+
(contribution) => RECORDED_TABLE_LOGICAL_NAMES.has(contribution.logicalName)
|
|
1031
|
+
);
|
|
1032
|
+
}
|
|
1033
|
+
const contributionMaterializer = chunk5WWEYV4H_cjs.createContributionMaterializer({
|
|
1017
1034
|
dialect: "sqlite",
|
|
1035
|
+
fenceTarget: chunkNUQ2YFFH_cjs.markFirstPartyFactory({ dialect: "sqlite", capabilities }),
|
|
1018
1036
|
fulltextStrategy,
|
|
1019
1037
|
fulltextTableName: tables2.fulltextTableName,
|
|
1020
1038
|
vectorStrategy,
|
|
@@ -1153,7 +1171,7 @@ function createSqliteBackend(db, options = {}) {
|
|
|
1153
1171
|
vectorStrategy,
|
|
1154
1172
|
contributionMaterializer
|
|
1155
1173
|
});
|
|
1156
|
-
return
|
|
1174
|
+
return chunk5WWEYV4H_cjs.gateFulltext(
|
|
1157
1175
|
txBackend,
|
|
1158
1176
|
contributionMaterializer.assertInitialized,
|
|
1159
1177
|
contributionMaterializer.refuseUnavailableFulltext
|
|
@@ -1169,29 +1187,29 @@ function createSqliteBackend(db, options = {}) {
|
|
|
1169
1187
|
...options_.schemaWrite
|
|
1170
1188
|
});
|
|
1171
1189
|
}
|
|
1172
|
-
await
|
|
1173
|
-
const indexDefinitions = await
|
|
1190
|
+
await chunk5WWEYV4H_cjs.assertTrustedImportDatabaseEmpty(tx, tableNames);
|
|
1191
|
+
const indexDefinitions = await chunk5WWEYV4H_cjs.suspendSqliteSecondaryIndexes(
|
|
1174
1192
|
tx,
|
|
1175
1193
|
tableNames
|
|
1176
1194
|
);
|
|
1177
1195
|
const result = await fn(
|
|
1178
|
-
|
|
1196
|
+
chunk5WWEYV4H_cjs.createSqliteTrustedImportSession(executionAdapter, tableNames)
|
|
1179
1197
|
);
|
|
1180
|
-
await
|
|
1181
|
-
await
|
|
1198
|
+
await chunk5WWEYV4H_cjs.restoreSecondaryIndexes(tx, indexDefinitions);
|
|
1199
|
+
await chunk5WWEYV4H_cjs.analyzeImportedTables(tx, tableNames);
|
|
1182
1200
|
return result;
|
|
1183
1201
|
});
|
|
1184
1202
|
}
|
|
1185
1203
|
} : {},
|
|
1186
1204
|
async bootstrapTables() {
|
|
1187
|
-
const statements =
|
|
1205
|
+
const statements = chunk5WWEYV4H_cjs.generateSqliteDDL(tables2, fulltextStrategy);
|
|
1188
1206
|
for (const statement of statements) {
|
|
1189
1207
|
await db.run(drizzleOrm.sql.raw(statement));
|
|
1190
1208
|
}
|
|
1191
1209
|
},
|
|
1192
1210
|
async ensureRevisionOriginsTable() {
|
|
1193
1211
|
await db.run(
|
|
1194
|
-
drizzleOrm.sql.raw(
|
|
1212
|
+
drizzleOrm.sql.raw(chunk5WWEYV4H_cjs.generateSqliteCreateTableSQL(tables2.revisionOrigins))
|
|
1195
1213
|
);
|
|
1196
1214
|
},
|
|
1197
1215
|
async ensureIdentityTables(identityTableNames, options2) {
|
|
@@ -1216,12 +1234,33 @@ function createSqliteBackend(db, options = {}) {
|
|
|
1216
1234
|
(contribution) => [...contribution.createDdl]
|
|
1217
1235
|
);
|
|
1218
1236
|
},
|
|
1237
|
+
recordedTableDdl(recordedTableNames) {
|
|
1238
|
+
const contributions = recordedContributionsFor(recordedTableNames);
|
|
1239
|
+
function ddlFor(logicalName) {
|
|
1240
|
+
const contribution = chunkN66HCGCY_cjs.requireDefined(
|
|
1241
|
+
contributions.find((entry) => entry.logicalName === logicalName),
|
|
1242
|
+
`recordedTableDdl: no contribution for ${logicalName}.`
|
|
1243
|
+
);
|
|
1244
|
+
return {
|
|
1245
|
+
createTable: chunkN66HCGCY_cjs.requireDefined(
|
|
1246
|
+
contribution.createDdl[0],
|
|
1247
|
+
`recordedTableDdl: empty DDL for ${logicalName}.`
|
|
1248
|
+
),
|
|
1249
|
+
indexes: contribution.createDdl.slice(1)
|
|
1250
|
+
};
|
|
1251
|
+
}
|
|
1252
|
+
return {
|
|
1253
|
+
recordedClock: ddlFor("recordedClock"),
|
|
1254
|
+
recordedEdges: ddlFor("recordedEdges"),
|
|
1255
|
+
recordedNodes: ddlFor("recordedNodes")
|
|
1256
|
+
};
|
|
1257
|
+
},
|
|
1219
1258
|
// Every fulltext-touching method asserts the durable marker instead
|
|
1220
1259
|
// of lazily emitting DDL. Steady state performs zero ensure; an
|
|
1221
1260
|
// uninitialized database throws `StoreNotInitializedError` rather
|
|
1222
1261
|
// than self-healing (#135). Shared verbatim with the tx-scoped gate
|
|
1223
1262
|
// via `gateFulltextMethods`.
|
|
1224
|
-
...
|
|
1263
|
+
...chunk5WWEYV4H_cjs.gateFulltextMethods(
|
|
1225
1264
|
operations,
|
|
1226
1265
|
contributionMaterializer.assertInitialized,
|
|
1227
1266
|
contributionMaterializer.refuseUnavailableFulltext
|
|
@@ -1231,7 +1270,7 @@ function createSqliteBackend(db, options = {}) {
|
|
|
1231
1270
|
},
|
|
1232
1271
|
async ensureIndexMaterializationsTable() {
|
|
1233
1272
|
await db.run(
|
|
1234
|
-
drizzleOrm.sql.raw(
|
|
1273
|
+
drizzleOrm.sql.raw(chunk5WWEYV4H_cjs.generateSqliteCreateTableSQL(tables2.indexMaterializations))
|
|
1235
1274
|
);
|
|
1236
1275
|
},
|
|
1237
1276
|
async getIndexMaterialization(indexName) {
|
|
@@ -1239,26 +1278,26 @@ function createSqliteBackend(db, options = {}) {
|
|
|
1239
1278
|
const rows = await db.select().from(t).where(drizzleOrm.eq(t.indexName, indexName));
|
|
1240
1279
|
const row = rows[0];
|
|
1241
1280
|
if (row === void 0) return void 0;
|
|
1242
|
-
return
|
|
1281
|
+
return chunk5WWEYV4H_cjs.mapMaterializationRow(row, chunk5WWEYV4H_cjs.SQLITE_INDEX_MAT_TIMESTAMPS.decode);
|
|
1243
1282
|
},
|
|
1244
1283
|
async getIndexMaterializations(statusKeys) {
|
|
1245
1284
|
if (statusKeys.length === 0) return [];
|
|
1246
1285
|
const t = tables2.indexMaterializations;
|
|
1247
1286
|
const rows = await db.select().from(t).where(drizzleOrm.inArray(t.indexName, [...statusKeys]));
|
|
1248
1287
|
return rows.map(
|
|
1249
|
-
(row) =>
|
|
1288
|
+
(row) => chunk5WWEYV4H_cjs.mapMaterializationRow(row, chunk5WWEYV4H_cjs.SQLITE_INDEX_MAT_TIMESTAMPS.decode)
|
|
1250
1289
|
);
|
|
1251
1290
|
},
|
|
1252
1291
|
async recordIndexMaterialization(params) {
|
|
1253
1292
|
const t = tables2.indexMaterializations;
|
|
1254
1293
|
await db.insert(t).values(
|
|
1255
|
-
|
|
1294
|
+
chunk5WWEYV4H_cjs.buildMaterializationInsertValues(
|
|
1256
1295
|
params,
|
|
1257
|
-
|
|
1296
|
+
chunk5WWEYV4H_cjs.SQLITE_INDEX_MAT_TIMESTAMPS.encode
|
|
1258
1297
|
)
|
|
1259
1298
|
).onConflictDoUpdate({
|
|
1260
1299
|
target: t.indexName,
|
|
1261
|
-
set:
|
|
1300
|
+
set: chunk5WWEYV4H_cjs.buildMaterializationOnConflictSet(params.materializedAt)
|
|
1262
1301
|
});
|
|
1263
1302
|
},
|
|
1264
1303
|
async ensureContributionMaterializationsTable() {
|
|
@@ -1274,37 +1313,37 @@ function createSqliteBackend(db, options = {}) {
|
|
|
1274
1313
|
await contributionMaterializer.assertInitialized(graphId);
|
|
1275
1314
|
},
|
|
1276
1315
|
async ensureKindRemovalsTable() {
|
|
1277
|
-
await db.run(drizzleOrm.sql.raw(
|
|
1316
|
+
await db.run(drizzleOrm.sql.raw(chunk5WWEYV4H_cjs.generateSqliteCreateTableSQL(tables2.kindRemovals)));
|
|
1278
1317
|
},
|
|
1279
1318
|
async getPendingKindRemovals(graphId) {
|
|
1280
1319
|
const t = tables2.kindRemovals;
|
|
1281
1320
|
const rows = await db.select().from(t).where(drizzleOrm.and(drizzleOrm.eq(t.graphId, graphId), drizzleOrm.isNull(t.removedAt)));
|
|
1282
1321
|
return rows.map(
|
|
1283
|
-
(row) =>
|
|
1322
|
+
(row) => chunk5WWEYV4H_cjs.mapKindRemovalRow(row, chunk5WWEYV4H_cjs.SQLITE_KIND_REMOVAL_TIMESTAMPS.decode)
|
|
1284
1323
|
);
|
|
1285
1324
|
},
|
|
1286
1325
|
async getAllKindRemovals(graphId) {
|
|
1287
1326
|
const t = tables2.kindRemovals;
|
|
1288
1327
|
const rows = await db.select().from(t).where(drizzleOrm.eq(t.graphId, graphId));
|
|
1289
1328
|
return rows.map(
|
|
1290
|
-
(row) =>
|
|
1329
|
+
(row) => chunk5WWEYV4H_cjs.mapKindRemovalRow(row, chunk5WWEYV4H_cjs.SQLITE_KIND_REMOVAL_TIMESTAMPS.decode)
|
|
1291
1330
|
);
|
|
1292
1331
|
},
|
|
1293
1332
|
async recordKindRemoval(params) {
|
|
1294
1333
|
const t = tables2.kindRemovals;
|
|
1295
1334
|
await db.insert(t).values(
|
|
1296
|
-
|
|
1335
|
+
chunk5WWEYV4H_cjs.buildKindRemovalInsertValues(
|
|
1297
1336
|
params,
|
|
1298
|
-
|
|
1337
|
+
chunk5WWEYV4H_cjs.SQLITE_KIND_REMOVAL_TIMESTAMPS.encode
|
|
1299
1338
|
)
|
|
1300
1339
|
).onConflictDoUpdate({
|
|
1301
1340
|
target: [t.graphId, t.kindName, t.entity, t.schemaVersion],
|
|
1302
|
-
set:
|
|
1341
|
+
set: chunk5WWEYV4H_cjs.buildKindRemovalOnConflictSet(t.removedAt, params.removedAt)
|
|
1303
1342
|
});
|
|
1304
1343
|
},
|
|
1305
1344
|
async ensureReconciliationMarkersTable() {
|
|
1306
1345
|
await db.run(
|
|
1307
|
-
drizzleOrm.sql.raw(
|
|
1346
|
+
drizzleOrm.sql.raw(chunk5WWEYV4H_cjs.generateSqliteCreateTableSQL(tables2.reconciliationMarkers))
|
|
1308
1347
|
);
|
|
1309
1348
|
},
|
|
1310
1349
|
async ensureRuntimeContributions(graphId) {
|
|
@@ -1370,18 +1409,18 @@ function createSqliteBackend(db, options = {}) {
|
|
|
1370
1409
|
async refreshStatistics() {
|
|
1371
1410
|
try {
|
|
1372
1411
|
await db.run(
|
|
1373
|
-
|
|
1374
|
-
|
|
1412
|
+
chunkLLFPQOBA_cjs.toDrizzleSql(
|
|
1413
|
+
chunkH5IJSROF_cjs.sql`PRAGMA analysis_limit = ${chunkH5IJSROF_cjs.sql.raw(String(SQLITE_ANALYZE_ROW_LIMIT))}`,
|
|
1375
1414
|
"sqlite"
|
|
1376
1415
|
)
|
|
1377
1416
|
);
|
|
1378
1417
|
} catch (error) {
|
|
1379
|
-
if (!
|
|
1418
|
+
if (!chunkNLX5OWK7_cjs.isSqliteNotAuthorizedError(error)) throw error;
|
|
1380
1419
|
}
|
|
1381
1420
|
for (const tableName of coreAnalyzeTables) {
|
|
1382
1421
|
await db.run(
|
|
1383
|
-
|
|
1384
|
-
|
|
1422
|
+
chunkLLFPQOBA_cjs.toDrizzleSql(
|
|
1423
|
+
chunkH5IJSROF_cjs.sql`ANALYZE ${chunkH5IJSROF_cjs.sql.identifier(tableName)}`,
|
|
1385
1424
|
"sqlite"
|
|
1386
1425
|
)
|
|
1387
1426
|
);
|
|
@@ -1389,13 +1428,13 @@ function createSqliteBackend(db, options = {}) {
|
|
|
1389
1428
|
for (const tableName of guardedAnalyzeTables) {
|
|
1390
1429
|
try {
|
|
1391
1430
|
await db.run(
|
|
1392
|
-
|
|
1393
|
-
|
|
1431
|
+
chunkLLFPQOBA_cjs.toDrizzleSql(
|
|
1432
|
+
chunkH5IJSROF_cjs.sql`ANALYZE ${chunkH5IJSROF_cjs.sql.identifier(tableName)}`,
|
|
1394
1433
|
"sqlite"
|
|
1395
1434
|
)
|
|
1396
1435
|
);
|
|
1397
1436
|
} catch (error) {
|
|
1398
|
-
if (!
|
|
1437
|
+
if (!chunkNLX5OWK7_cjs.isMissingTableError(error)) throw error;
|
|
1399
1438
|
}
|
|
1400
1439
|
}
|
|
1401
1440
|
},
|
|
@@ -1406,7 +1445,7 @@ function createSqliteBackend(db, options = {}) {
|
|
|
1406
1445
|
},
|
|
1407
1446
|
async commitSchemaVersionIfKindsEmpty(params, probes) {
|
|
1408
1447
|
return runSchemaWriteTransaction(
|
|
1409
|
-
(target) =>
|
|
1448
|
+
(target) => chunk5WWEYV4H_cjs.commitSchemaVersionIfKindsEmpty(target, params, probes)
|
|
1410
1449
|
);
|
|
1411
1450
|
},
|
|
1412
1451
|
async commitSchemaVersionWithPreflight(params, preflight) {
|
|
@@ -1427,9 +1466,9 @@ function createSqliteBackend(db, options = {}) {
|
|
|
1427
1466
|
return backend.transactionWithNative((tx) => fn(tx), options2);
|
|
1428
1467
|
},
|
|
1429
1468
|
async transactionWithNative(fn, options2) {
|
|
1430
|
-
const temporaryWrites = options2?.temporaryWrites ===
|
|
1469
|
+
const temporaryWrites = options2?.temporaryWrites === chunkNUQ2YFFH_cjs.INTERNAL_TEMPORARY_WRITES;
|
|
1431
1470
|
if (temporaryWrites && options2.accessMode !== "read_only") {
|
|
1432
|
-
throw new
|
|
1471
|
+
throw new chunkX4GDXBOP_cjs.ConfigurationError(
|
|
1433
1472
|
"Temporary-write transactions must be semantically read-only.",
|
|
1434
1473
|
{ dialect: "sqlite" }
|
|
1435
1474
|
);
|
|
@@ -1457,7 +1496,7 @@ function createSqliteBackend(db, options = {}) {
|
|
|
1457
1496
|
);
|
|
1458
1497
|
try {
|
|
1459
1498
|
const result = await fn(
|
|
1460
|
-
|
|
1499
|
+
chunk5WWEYV4H_cjs.gateFulltext(
|
|
1461
1500
|
txBackend,
|
|
1462
1501
|
contributionMaterializer.assertInitialized,
|
|
1463
1502
|
contributionMaterializer.refuseUnavailableFulltext
|
|
@@ -1490,7 +1529,7 @@ function createSqliteBackend(db, options = {}) {
|
|
|
1490
1529
|
"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)."
|
|
1491
1530
|
);
|
|
1492
1531
|
}
|
|
1493
|
-
|
|
1532
|
+
chunk5WWEYV4H_cjs.assertAdoptedDialect(
|
|
1494
1533
|
externalTx,
|
|
1495
1534
|
sqliteCore.BaseSQLiteDatabase,
|
|
1496
1535
|
"sqlite"
|
|
@@ -1502,7 +1541,8 @@ function createSqliteBackend(db, options = {}) {
|
|
|
1502
1541
|
return Promise.resolve();
|
|
1503
1542
|
}
|
|
1504
1543
|
};
|
|
1505
|
-
|
|
1544
|
+
chunkNLX5OWK7_cjs.auditBackendResource(backend, resourceAudit);
|
|
1545
|
+
chunkNUQ2YFFH_cjs.markFirstPartyFactory(backend);
|
|
1506
1546
|
return backend;
|
|
1507
1547
|
}
|
|
1508
1548
|
function createTransactionBackend(options) {
|
|
@@ -1524,5 +1564,5 @@ function createTransactionBackend(options) {
|
|
|
1524
1564
|
|
|
1525
1565
|
exports.createSqliteBackend = createSqliteBackend;
|
|
1526
1566
|
exports.isLocalLibsqlClient = isLocalLibsqlClient;
|
|
1527
|
-
//# sourceMappingURL=chunk-
|
|
1528
|
-
//# sourceMappingURL=chunk-
|
|
1567
|
+
//# sourceMappingURL=chunk-WDM5WQK4.cjs.map
|
|
1568
|
+
//# sourceMappingURL=chunk-WDM5WQK4.cjs.map
|