@nicia-ai/typegraph 0.37.1 → 0.38.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 -10
- package/dist/backend/drizzle/indexes.cjs +32 -0
- package/dist/backend/drizzle/indexes.cjs.map +1 -0
- package/dist/backend/drizzle/indexes.d.cts +43 -0
- package/dist/backend/drizzle/indexes.d.ts +43 -0
- package/dist/backend/drizzle/indexes.js +11 -0
- package/dist/backend/drizzle/indexes.js.map +1 -0
- package/dist/backend/index.cjs +161 -0
- package/dist/backend/index.cjs.map +1 -0
- package/dist/backend/index.d.cts +3 -0
- package/dist/backend/index.d.ts +3 -0
- package/dist/backend/index.js +8 -0
- package/dist/backend/index.js.map +1 -0
- package/dist/backend/postgres/index.cjs +32 -28
- package/dist/backend/postgres/index.d.cts +13 -12
- package/dist/backend/postgres/index.d.ts +13 -12
- package/dist/backend/postgres/index.js +19 -15
- package/dist/backend/postgres/pglite-store.cjs +67 -0
- package/dist/backend/postgres/pglite-store.cjs.map +1 -0
- package/dist/backend/postgres/pglite-store.d.cts +38 -0
- package/dist/backend/postgres/pglite-store.d.ts +38 -0
- package/dist/backend/postgres/pglite-store.js +65 -0
- package/dist/backend/postgres/pglite-store.js.map +1 -0
- package/dist/backend/postgres/pglite.cjs +25 -50
- package/dist/backend/postgres/pglite.cjs.map +1 -1
- package/dist/backend/postgres/pglite.d.cts +10 -9
- package/dist/backend/postgres/pglite.d.ts +10 -9
- package/dist/backend/postgres/pglite.js +20 -52
- package/dist/backend/postgres/pglite.js.map +1 -1
- package/dist/backend/sqlite/index.cjs +29 -25
- package/dist/backend/sqlite/index.d.cts +11 -11
- package/dist/backend/sqlite/index.d.ts +11 -11
- package/dist/backend/sqlite/index.js +17 -13
- package/dist/backend/sqlite/libsql.cjs +23 -19
- package/dist/backend/sqlite/libsql.cjs.map +1 -1
- package/dist/backend/sqlite/libsql.d.cts +9 -10
- package/dist/backend/sqlite/libsql.d.ts +9 -10
- package/dist/backend/sqlite/libsql.js +19 -15
- package/dist/backend/sqlite/libsql.js.map +1 -1
- package/dist/backend/sqlite/local-store.cjs +72 -0
- package/dist/backend/sqlite/local-store.cjs.map +1 -0
- package/dist/backend/sqlite/local-store.d.cts +42 -0
- package/dist/backend/sqlite/local-store.d.ts +42 -0
- package/dist/backend/sqlite/local-store.js +67 -0
- package/dist/backend/sqlite/local-store.js.map +1 -0
- package/dist/backend/sqlite/local.cjs +28 -183
- package/dist/backend/sqlite/local.cjs.map +1 -1
- package/dist/backend/sqlite/local.d.cts +8 -81
- package/dist/backend/sqlite/local.d.ts +8 -81
- package/dist/backend/sqlite/local.js +20 -180
- package/dist/backend/sqlite/local.js.map +1 -1
- package/dist/chunk-2EBMPJBO.js +16 -0
- package/dist/chunk-2EBMPJBO.js.map +1 -0
- package/dist/{chunk-5AVRFNP4.cjs → chunk-2SL7OGPR.cjs} +2866 -1507
- package/dist/chunk-2SL7OGPR.cjs.map +1 -0
- package/dist/chunk-35S6P5ZU.js +27 -0
- package/dist/chunk-35S6P5ZU.js.map +1 -0
- package/dist/chunk-3LKL3S6X.js +50 -0
- package/dist/chunk-3LKL3S6X.js.map +1 -0
- package/dist/chunk-6G5CQ6JX.js +47 -0
- package/dist/chunk-6G5CQ6JX.js.map +1 -0
- package/dist/chunk-6XDBRDZE.js +312 -0
- package/dist/chunk-6XDBRDZE.js.map +1 -0
- package/dist/chunk-764JHTLT.cjs +15 -0
- package/dist/chunk-764JHTLT.cjs.map +1 -0
- package/dist/chunk-76HE7DJP.js +68 -0
- package/dist/chunk-76HE7DJP.js.map +1 -0
- package/dist/{chunk-VGDDG3XJ.cjs → chunk-7M3NACL3.cjs} +12 -12
- package/dist/{chunk-VGDDG3XJ.cjs.map → chunk-7M3NACL3.cjs.map} +1 -1
- package/dist/{chunk-NXQFATMF.cjs → chunk-7VLCN3JB.cjs} +153 -123
- package/dist/chunk-7VLCN3JB.cjs.map +1 -0
- package/dist/{chunk-GA4TT3DH.js → chunk-A2FGSWMQ.js} +1845 -489
- package/dist/chunk-A2FGSWMQ.js.map +1 -0
- package/dist/chunk-AOL64O4Z.js +165 -0
- package/dist/chunk-AOL64O4Z.js.map +1 -0
- package/dist/{chunk-27SSDCEP.cjs → chunk-B63IFHXR.cjs} +53 -74
- package/dist/chunk-B63IFHXR.cjs.map +1 -0
- package/dist/{chunk-3XXGYU62.cjs → chunk-BKAKAVRW.cjs} +56 -53
- package/dist/chunk-BKAKAVRW.cjs.map +1 -0
- package/dist/{chunk-YTSN73ND.js → chunk-BQITNFQJ.js} +3 -3
- package/dist/{chunk-YTSN73ND.js.map → chunk-BQITNFQJ.js.map} +1 -1
- package/dist/{chunk-NUIG3BCV.cjs → chunk-CQC6VBAF.cjs} +93 -155
- package/dist/chunk-CQC6VBAF.cjs.map +1 -0
- package/dist/{chunk-6EEO3OVU.cjs → chunk-CWX77JB4.cjs} +22 -59
- package/dist/chunk-CWX77JB4.cjs.map +1 -0
- package/dist/{chunk-UGZUAYAR.js → chunk-D7PG5D5K.js} +4 -3
- package/dist/chunk-D7PG5D5K.js.map +1 -0
- package/dist/chunk-DDCIXXOO.js +9 -0
- package/dist/chunk-DDCIXXOO.js.map +1 -0
- package/dist/chunk-DDCYVIVV.cjs +44 -0
- package/dist/chunk-DDCYVIVV.cjs.map +1 -0
- package/dist/{chunk-XPCZADMT.cjs → chunk-DOVMTPKE.cjs} +89 -27
- package/dist/chunk-DOVMTPKE.cjs.map +1 -0
- package/dist/{chunk-5PNMDJ7J.js → chunk-DPNA466P.js} +14 -9
- package/dist/chunk-DPNA466P.js.map +1 -0
- package/dist/{chunk-BYPOGQWK.js → chunk-DRACN6XG.js} +6 -4
- package/dist/chunk-DRACN6XG.js.map +1 -0
- package/dist/chunk-E6TXEISH.cjs +175 -0
- package/dist/chunk-E6TXEISH.cjs.map +1 -0
- package/dist/{chunk-TKT2XHED.js → chunk-E6YZRKMM.js} +13 -12
- package/dist/chunk-E6YZRKMM.js.map +1 -0
- package/dist/{chunk-3C2RYI6L.cjs → chunk-EOJFGECD.cjs} +11 -11
- package/dist/chunk-EOJFGECD.cjs.map +1 -0
- package/dist/{chunk-XWV4JT34.js → chunk-ERZ4QPQX.js} +27 -22
- package/dist/chunk-ERZ4QPQX.js.map +1 -0
- package/dist/{chunk-DFVLCOP6.js → chunk-EZH7FNUS.js} +3 -3
- package/dist/{chunk-DFVLCOP6.js.map → chunk-EZH7FNUS.js.map} +1 -1
- package/dist/{chunk-WWFHO375.cjs → chunk-FJMPR3OH.cjs} +4 -3
- package/dist/chunk-FJMPR3OH.cjs.map +1 -0
- package/dist/chunk-FMNUSGZ4.cjs +12 -0
- package/dist/chunk-FMNUSGZ4.cjs.map +1 -0
- package/dist/{chunk-K3Q3LJY3.js → chunk-G32AO634.js} +201 -100
- package/dist/chunk-G32AO634.js.map +1 -0
- package/dist/{chunk-EXU3RASM.js → chunk-G3CSQLLT.js} +20 -474
- package/dist/chunk-G3CSQLLT.js.map +1 -0
- package/dist/chunk-GNPGGLAE.cjs +212 -0
- package/dist/chunk-GNPGGLAE.cjs.map +1 -0
- package/dist/{chunk-QARBLBXT.cjs → chunk-GUUWKPTK.cjs} +7 -7
- package/dist/{chunk-QARBLBXT.cjs.map → chunk-GUUWKPTK.cjs.map} +1 -1
- package/dist/chunk-GYA4JRP5.js +31 -0
- package/dist/chunk-GYA4JRP5.js.map +1 -0
- package/dist/chunk-I6FX7AAG.js +39 -0
- package/dist/chunk-I6FX7AAG.js.map +1 -0
- package/dist/chunk-IMQKXL4E.cjs +12 -0
- package/dist/{chunk-QSXTWU4U.cjs.map → chunk-IMQKXL4E.cjs.map} +1 -1
- package/dist/chunk-J6IJARLG.js +94 -0
- package/dist/chunk-J6IJARLG.js.map +1 -0
- package/dist/{chunk-W63OVYY4.js → chunk-K34OPSJK.js} +3 -3
- package/dist/{chunk-W63OVYY4.js.map → chunk-K34OPSJK.js.map} +1 -1
- package/dist/{chunk-TGOMW4MB.cjs → chunk-KCLZHYPU.cjs} +110 -109
- package/dist/chunk-KCLZHYPU.cjs.map +1 -0
- package/dist/{chunk-XGPUQ56G.js → chunk-KFLXWVUJ.js} +4 -38
- package/dist/chunk-KFLXWVUJ.js.map +1 -0
- package/dist/{chunk-3DS7Z4T4.cjs → chunk-LZ3TVJY4.cjs} +44 -43
- package/dist/chunk-LZ3TVJY4.cjs.map +1 -0
- package/dist/{chunk-UXLSNRYL.js → chunk-MTNEGGM2.js} +4 -4
- package/dist/chunk-MTNEGGM2.js.map +1 -0
- package/dist/{chunk-IP3CGGPA.cjs → chunk-N2V3HJFV.cjs} +92 -185
- package/dist/chunk-N2V3HJFV.cjs.map +1 -0
- package/dist/chunk-NAUA4PW5.cjs +28 -0
- package/dist/chunk-NAUA4PW5.cjs.map +1 -0
- package/dist/chunk-NMQ6C6TS.cjs +61 -0
- package/dist/chunk-NMQ6C6TS.cjs.map +1 -0
- package/dist/{chunk-2N6EOBTH.cjs → chunk-NPWACFQJ.cjs} +58 -53
- package/dist/chunk-NPWACFQJ.cjs.map +1 -0
- package/dist/{chunk-5KEQ74YU.cjs → chunk-NT6ILURI.cjs} +9 -86
- package/dist/chunk-NT6ILURI.cjs.map +1 -0
- package/dist/chunk-NU23DUSJ.cjs +192 -0
- package/dist/chunk-NU23DUSJ.cjs.map +1 -0
- package/dist/{chunk-WOJMKB3N.cjs → chunk-NWYCOFEZ.cjs} +1677 -308
- package/dist/chunk-NWYCOFEZ.cjs.map +1 -0
- package/dist/{chunk-3GH67G4Z.cjs → chunk-O5H62ZWJ.cjs} +4 -42
- package/dist/chunk-O5H62ZWJ.cjs.map +1 -0
- package/dist/{chunk-3SLPDKHQ.js → chunk-PH4IJ3V5.js} +5 -77
- package/dist/chunk-PH4IJ3V5.js.map +1 -0
- package/dist/chunk-PWXGB77L.cjs +56 -0
- package/dist/chunk-PWXGB77L.cjs.map +1 -0
- package/dist/chunk-PZHC5GCD.js +193 -0
- package/dist/chunk-PZHC5GCD.js.map +1 -0
- package/dist/chunk-QMQLUA66.js +12 -0
- package/dist/chunk-QMQLUA66.js.map +1 -0
- package/dist/{chunk-5WWVZMVX.js → chunk-QZ7A6HBM.js} +2 -2
- package/dist/{chunk-5WWVZMVX.js.map → chunk-QZ7A6HBM.js.map} +1 -1
- package/dist/{chunk-VKGKDOKR.js → chunk-RQPRCEIO.js} +1539 -206
- package/dist/chunk-RQPRCEIO.js.map +1 -0
- package/dist/chunk-RW24SAHI.cjs +74 -0
- package/dist/chunk-RW24SAHI.cjs.map +1 -0
- package/dist/{chunk-BVRDGYXQ.cjs → chunk-SAFZ6JTI.cjs} +14 -9
- package/dist/chunk-SAFZ6JTI.cjs.map +1 -0
- package/dist/{chunk-L7HQ2OSI.js → chunk-SCTZRFW5.js} +87 -166
- package/dist/chunk-SCTZRFW5.js.map +1 -0
- package/dist/{chunk-5KPNWT6X.js → chunk-SDHV2MWU.js} +24 -45
- package/dist/chunk-SDHV2MWU.js.map +1 -0
- package/dist/chunk-SVJ5GEXW.cjs +45 -0
- package/dist/chunk-SVJ5GEXW.cjs.map +1 -0
- package/dist/chunk-SVUKGWSN.cjs +102 -0
- package/dist/chunk-SVUKGWSN.cjs.map +1 -0
- package/dist/chunk-TAUGGLNQ.js +59 -0
- package/dist/chunk-TAUGGLNQ.js.map +1 -0
- package/dist/{chunk-UV3WP5WZ.js → chunk-TE5ZA4VX.js} +55 -27
- package/dist/chunk-TE5ZA4VX.js.map +1 -0
- package/dist/{chunk-A42GCBGX.cjs → chunk-TRF4EBJT.cjs} +6 -4
- package/dist/chunk-TRF4EBJT.cjs.map +1 -0
- package/dist/{chunk-KQJ54OG5.js → chunk-U4JDJKPD.js} +19 -56
- package/dist/chunk-U4JDJKPD.js.map +1 -0
- package/dist/chunk-UH2USOMG.cjs +627 -0
- package/dist/chunk-UH2USOMG.cjs.map +1 -0
- package/dist/{chunk-RCVLFTCT.js → chunk-UPXDVI3T.js} +13 -12
- package/dist/chunk-UPXDVI3T.js.map +1 -0
- package/dist/{chunk-5VQM6VWP.cjs → chunk-UWG5GX6E.cjs} +2 -2
- package/dist/{chunk-5VQM6VWP.cjs.map → chunk-UWG5GX6E.cjs.map} +1 -1
- package/dist/{chunk-3RWZPJKV.js → chunk-VBH7ZXSZ.js} +21 -78
- package/dist/chunk-VBH7ZXSZ.js.map +1 -0
- package/dist/{chunk-K5UBVGJN.js → chunk-VDYA2HMS.js} +6 -6
- package/dist/{chunk-K5UBVGJN.js.map → chunk-VDYA2HMS.js.map} +1 -1
- package/dist/chunk-X4PVHAZ6.cjs +83 -0
- package/dist/chunk-X4PVHAZ6.cjs.map +1 -0
- package/dist/{chunk-UYQMBBWJ.js → chunk-X6CNEA32.js} +23 -20
- package/dist/chunk-X6CNEA32.js.map +1 -0
- package/dist/chunk-X6RDQ5NB.cjs +335 -0
- package/dist/chunk-X6RDQ5NB.cjs.map +1 -0
- package/dist/chunk-XD6X7O5R.js +184 -0
- package/dist/chunk-XD6X7O5R.js.map +1 -0
- package/dist/{chunk-DIQ3AV5W.cjs → chunk-XFY73JWD.cjs} +324 -224
- package/dist/chunk-XFY73JWD.cjs.map +1 -0
- package/dist/{chunk-DEFQM7JU.cjs → chunk-XRU7V7FF.cjs} +7 -7
- package/dist/{chunk-DEFQM7JU.cjs.map → chunk-XRU7V7FF.cjs.map} +1 -1
- package/dist/{chunk-TPF25IG6.js → chunk-XZA3Y4YH.js} +3 -3
- package/dist/{chunk-TPF25IG6.js.map → chunk-XZA3Y4YH.js.map} +1 -1
- package/dist/chunk-Y7M44XEK.js +462 -0
- package/dist/chunk-Y7M44XEK.js.map +1 -0
- package/dist/{chunk-RRSNR3TP.js → chunk-YIRLBUNN.js} +3 -3
- package/dist/{chunk-RRSNR3TP.js.map → chunk-YIRLBUNN.js.map} +1 -1
- package/dist/{chunk-IXGYRP2P.js → chunk-YJDSPA5E.js} +79 -49
- package/dist/chunk-YJDSPA5E.js.map +1 -0
- package/dist/{chunk-EJYMTO3K.cjs → chunk-YLINFV7Z.cjs} +144 -116
- package/dist/chunk-YLINFV7Z.cjs.map +1 -0
- package/dist/{chunk-QERAIDRJ.js → chunk-Z2PPIVOO.js} +82 -22
- package/dist/chunk-Z2PPIVOO.js.map +1 -0
- package/dist/chunk-Z5QHVL5U.cjs +12 -0
- package/dist/chunk-Z5QHVL5U.cjs.map +1 -0
- package/dist/chunk-ZDH3DX3C.cjs +30 -0
- package/dist/chunk-ZDH3DX3C.cjs.map +1 -0
- package/dist/chunk-ZE6NVENI.js +77 -0
- package/dist/chunk-ZE6NVENI.js.map +1 -0
- package/dist/chunk-ZHX4KEM7.cjs +49 -0
- package/dist/chunk-ZHX4KEM7.cjs.map +1 -0
- package/dist/chunk-ZKZAIX42.cjs +479 -0
- package/dist/chunk-ZKZAIX42.cjs.map +1 -0
- package/dist/{chunk-TEDRJXOG.cjs → chunk-ZY4GXIVN.cjs} +5 -5
- package/dist/{chunk-TEDRJXOG.cjs.map → chunk-ZY4GXIVN.cjs.map} +1 -1
- package/dist/core/index.cjs +117 -0
- package/dist/core/index.cjs.map +1 -0
- package/dist/core/index.d.cts +225 -0
- package/dist/core/index.d.ts +225 -0
- package/dist/core/index.js +12 -0
- package/dist/core/index.js.map +1 -0
- package/dist/{ddl-CS0KUVwB.d.ts → ddl-Dx3Z0_WC.d.ts} +3 -3
- package/dist/{ddl-BD-ZfKeX.d.cts → ddl-J6sDyABg.d.cts} +3 -3
- package/dist/define-graph-CzEvA_8F.d.cts +174 -0
- package/dist/define-graph-DRo9xpYN.d.ts +174 -0
- package/dist/{extension-types-BM2ACfYO.d.cts → extension-types-BLEVH4SG.d.cts} +1 -1
- package/dist/{extension-types-BM2ACfYO.d.ts → extension-types-BLEVH4SG.d.ts} +1 -1
- package/dist/graph-extension/index.cjs +21 -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 +6 -4
- package/dist/graph-merge/index.cjs +265 -214
- package/dist/graph-merge/index.cjs.map +1 -1
- package/dist/graph-merge/index.d.cts +8 -89
- package/dist/graph-merge/index.d.ts +8 -89
- package/dist/graph-merge/index.js +141 -90
- package/dist/graph-merge/index.js.map +1 -1
- package/dist/{index-BeacbPoe.d.ts → index-BD_3TCgh.d.ts} +6 -4
- package/dist/{index-BPM59vsg.d.cts → index-BihFPsPu.d.cts} +6 -4
- package/dist/{fulltext-strategy-C27vXaeB.d.cts → index-Bq7vSPHy.d.ts} +3195 -2646
- package/dist/{fulltext-strategy-DebsMrqg.d.ts → index-CrFL_ENI.d.cts} +3195 -2646
- package/dist/index.cjs +326 -315
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +59 -240
- package/dist/index.d.ts +59 -240
- package/dist/index.js +46 -79
- package/dist/index.js.map +1 -1
- package/dist/indexes/index.cjs +26 -38
- package/dist/indexes/index.d.cts +6 -41
- package/dist/indexes/index.d.ts +6 -41
- package/dist/indexes/index.js +14 -10
- package/dist/interchange/index.cjs +48 -39
- package/dist/interchange/index.cjs.map +1 -1
- package/dist/interchange/index.d.cts +7 -8
- package/dist/interchange/index.d.ts +7 -8
- package/dist/interchange/index.js +23 -14
- package/dist/interchange/index.js.map +1 -1
- package/dist/local-options-CZ1BnIoF.d.cts +29 -0
- package/dist/local-options-CZ1BnIoF.d.ts +29 -0
- package/dist/{manager-D00_NXvT.d.ts → manager-CASfhmzV.d.ts} +4 -173
- package/dist/{manager-nU1vTJLy.d.cts → manager-nCEJiYBb.d.cts} +4 -173
- package/dist/{materialize-indexes-zK2J_flP.d.ts → materialize-indexes-D4iei4Kp.d.ts} +1 -1
- package/dist/{materialize-indexes-CuR3gAZb.d.cts → materialize-indexes-ExQ6OrAh.d.cts} +1 -1
- package/dist/{postgres-IaBA4RgE.d.ts → postgres-Cl1ZAN1G.d.ts} +1 -1
- package/dist/{postgres-YrYmPlaU.d.cts → postgres-DMgIKQU-.d.cts} +1 -1
- package/dist/postgres-execution-fKW0qRiN.d.cts +14 -0
- package/dist/postgres-execution-fKW0qRiN.d.ts +14 -0
- package/dist/profiler/index.cjs +9 -8
- package/dist/profiler/index.cjs.map +1 -1
- package/dist/profiler/index.d.cts +9 -17
- package/dist/profiler/index.d.ts +9 -17
- package/dist/profiler/index.js +8 -7
- package/dist/profiler/index.js.map +1 -1
- package/dist/provenance/index.cjs +61 -55
- package/dist/provenance/index.cjs.map +1 -1
- package/dist/provenance/index.d.cts +7 -8
- package/dist/provenance/index.d.ts +7 -8
- package/dist/provenance/index.js +34 -28
- package/dist/provenance/index.js.map +1 -1
- package/dist/schema/index.cjs +46 -37
- package/dist/schema/index.cjs.map +1 -1
- package/dist/schema/index.d.cts +8 -10
- package/dist/schema/index.d.ts +8 -10
- package/dist/schema/index.js +22 -13
- package/dist/schema/index.js.map +1 -1
- package/dist/{sqlite-BUOHPx7p.d.ts → sqlite-BDkW39aa.d.cts} +1 -1
- package/dist/{sqlite-Pp8O19WE.d.cts → sqlite-CYfhvESj.d.ts} +1 -1
- package/dist/sqlite-execution-DwbE2a9y.d.cts +32 -0
- package/dist/sqlite-execution-DwbE2a9y.d.ts +32 -0
- package/dist/{store-view-X96Rd00T.d.cts → store-view-BoHqdHjB.d.cts} +394 -1393
- package/dist/{store-view-ANL6mTph.d.ts → store-view-Ctq-3OHy.d.ts} +394 -1393
- package/dist/temporal-BC_NQV5Y.d.cts +281 -0
- package/dist/temporal-DqtOEo_B.d.ts +281 -0
- package/dist/{types-r-Zyq2Hz.d.cts → types-COq3-vMC.d.cts} +2 -2
- package/dist/{types-wsvuBgPK.d.ts → types-CUevi_D1.d.ts} +2 -2
- package/dist/{where-CJOpJj3a.d.ts → where-BdE_cYtx.d.ts} +5 -5
- package/dist/{where-K3uBP33l.d.cts → where-C92TXCzT.d.cts} +5 -5
- package/package.json +37 -6
- package/dist/chunk-27SSDCEP.cjs.map +0 -1
- package/dist/chunk-2N6EOBTH.cjs.map +0 -1
- package/dist/chunk-3C2RYI6L.cjs.map +0 -1
- package/dist/chunk-3DS7Z4T4.cjs.map +0 -1
- package/dist/chunk-3GH67G4Z.cjs.map +0 -1
- package/dist/chunk-3RWZPJKV.js.map +0 -1
- package/dist/chunk-3SLPDKHQ.js.map +0 -1
- package/dist/chunk-3XXGYU62.cjs.map +0 -1
- package/dist/chunk-44TA22QT.js +0 -1478
- package/dist/chunk-44TA22QT.js.map +0 -1
- package/dist/chunk-5AVRFNP4.cjs.map +0 -1
- package/dist/chunk-5KEQ74YU.cjs.map +0 -1
- package/dist/chunk-5KPNWT6X.js.map +0 -1
- package/dist/chunk-5PNMDJ7J.js.map +0 -1
- package/dist/chunk-6EEO3OVU.cjs.map +0 -1
- package/dist/chunk-7YSP4V4R.cjs +0 -69
- package/dist/chunk-7YSP4V4R.cjs.map +0 -1
- package/dist/chunk-A42GCBGX.cjs.map +0 -1
- package/dist/chunk-BVRDGYXQ.cjs.map +0 -1
- package/dist/chunk-BYPOGQWK.js.map +0 -1
- package/dist/chunk-CUHM5CWJ.cjs +0 -12
- package/dist/chunk-CUHM5CWJ.cjs.map +0 -1
- package/dist/chunk-DIQ3AV5W.cjs.map +0 -1
- package/dist/chunk-EJYMTO3K.cjs.map +0 -1
- package/dist/chunk-EXU3RASM.js.map +0 -1
- package/dist/chunk-GA4TT3DH.js.map +0 -1
- package/dist/chunk-IP3CGGPA.cjs.map +0 -1
- package/dist/chunk-IPSVVTWT.cjs +0 -1540
- package/dist/chunk-IPSVVTWT.cjs.map +0 -1
- package/dist/chunk-IXGYRP2P.js.map +0 -1
- package/dist/chunk-K3Q3LJY3.js.map +0 -1
- package/dist/chunk-KQJ54OG5.js.map +0 -1
- package/dist/chunk-L7HQ2OSI.js.map +0 -1
- package/dist/chunk-M6VES7V6.js +0 -239
- package/dist/chunk-M6VES7V6.js.map +0 -1
- package/dist/chunk-NUIG3BCV.cjs.map +0 -1
- package/dist/chunk-NXQFATMF.cjs.map +0 -1
- package/dist/chunk-OHMP6N2J.js +0 -47
- package/dist/chunk-OHMP6N2J.js.map +0 -1
- package/dist/chunk-QERAIDRJ.js.map +0 -1
- package/dist/chunk-QSXTWU4U.cjs +0 -12
- package/dist/chunk-RCVLFTCT.js.map +0 -1
- package/dist/chunk-TGOMW4MB.cjs.map +0 -1
- package/dist/chunk-TKT2XHED.js.map +0 -1
- package/dist/chunk-UGZUAYAR.js.map +0 -1
- package/dist/chunk-UV3WP5WZ.js.map +0 -1
- package/dist/chunk-UXLSNRYL.js.map +0 -1
- package/dist/chunk-UYQMBBWJ.js.map +0 -1
- package/dist/chunk-VKGKDOKR.js.map +0 -1
- package/dist/chunk-VL2V6PEN.cjs +0 -261
- package/dist/chunk-VL2V6PEN.cjs.map +0 -1
- package/dist/chunk-WOJMKB3N.cjs.map +0 -1
- package/dist/chunk-WWFHO375.cjs.map +0 -1
- package/dist/chunk-XGPUQ56G.js.map +0 -1
- package/dist/chunk-XGU7DZDA.cjs +0 -1095
- package/dist/chunk-XGU7DZDA.cjs.map +0 -1
- package/dist/chunk-XPCZADMT.cjs.map +0 -1
- package/dist/chunk-XWV4JT34.js.map +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { S as SqliteExecutionProfileHints,
|
|
2
|
-
export {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
export {
|
|
6
|
-
|
|
7
|
-
import '
|
|
1
|
+
import { S as SqliteExecutionProfileHints, A as AnySqliteDatabase } from '../../sqlite-execution-DwbE2a9y.cjs';
|
|
2
|
+
export { a as SqliteTransactionMode } from '../../sqlite-execution-DwbE2a9y.cjs';
|
|
3
|
+
import { F as FulltextStrategy, V as VectorStrategy, B as BackendCapabilities, A as AdapterBackend } from '../../index-CrFL_ENI.cjs';
|
|
4
|
+
import { S as SqliteTables } from '../../sqlite-BDkW39aa.cjs';
|
|
5
|
+
export { C as CreateSqliteTablesOptions, a as SqliteTableNames, c as createSqliteTables, e as edges, n as nodes, r as recordedClock, b as recordedEdges, d as recordedNodes, s as schemaVersions, t as tables, u as uniques } from '../../sqlite-BDkW39aa.cjs';
|
|
6
|
+
export { b as generateSqliteDDL, c as generateSqliteMigrationSQL } from '../../ddl-J6sDyABg.cjs';
|
|
7
|
+
import 'drizzle-orm/sqlite-core';
|
|
8
|
+
import '../../extension-types-BLEVH4SG.cjs';
|
|
8
9
|
import 'zod';
|
|
10
|
+
import '../../postgres-DMgIKQU-.cjs';
|
|
9
11
|
import 'drizzle-orm/pg-core';
|
|
10
|
-
import 'drizzle-orm/sqlite-core';
|
|
11
|
-
import '../../postgres-YrYmPlaU.cjs';
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Options for creating a SQLite backend.
|
|
@@ -51,6 +51,6 @@ type SqliteBackendOptions = Readonly<{
|
|
|
51
51
|
*/
|
|
52
52
|
capabilities?: Partial<BackendCapabilities>;
|
|
53
53
|
}>;
|
|
54
|
-
declare function createSqliteBackend(db: AnySqliteDatabase, options?: SqliteBackendOptions):
|
|
54
|
+
declare function createSqliteBackend(db: AnySqliteDatabase, options?: SqliteBackendOptions): AdapterBackend<AnySqliteDatabase>;
|
|
55
55
|
|
|
56
|
-
export { type SqliteBackendOptions, SqliteTables, createSqliteBackend };
|
|
56
|
+
export { AnySqliteDatabase, type SqliteBackendOptions, SqliteTables, createSqliteBackend };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { S as SqliteExecutionProfileHints,
|
|
2
|
-
export {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
export {
|
|
6
|
-
|
|
7
|
-
import '
|
|
1
|
+
import { S as SqliteExecutionProfileHints, A as AnySqliteDatabase } from '../../sqlite-execution-DwbE2a9y.js';
|
|
2
|
+
export { a as SqliteTransactionMode } from '../../sqlite-execution-DwbE2a9y.js';
|
|
3
|
+
import { F as FulltextStrategy, V as VectorStrategy, B as BackendCapabilities, A as AdapterBackend } from '../../index-Bq7vSPHy.js';
|
|
4
|
+
import { S as SqliteTables } from '../../sqlite-CYfhvESj.js';
|
|
5
|
+
export { C as CreateSqliteTablesOptions, a as SqliteTableNames, c as createSqliteTables, e as edges, n as nodes, r as recordedClock, b as recordedEdges, d as recordedNodes, s as schemaVersions, t as tables, u as uniques } from '../../sqlite-CYfhvESj.js';
|
|
6
|
+
export { b as generateSqliteDDL, c as generateSqliteMigrationSQL } from '../../ddl-Dx3Z0_WC.js';
|
|
7
|
+
import 'drizzle-orm/sqlite-core';
|
|
8
|
+
import '../../extension-types-BLEVH4SG.js';
|
|
8
9
|
import 'zod';
|
|
10
|
+
import '../../postgres-Cl1ZAN1G.js';
|
|
9
11
|
import 'drizzle-orm/pg-core';
|
|
10
|
-
import 'drizzle-orm/sqlite-core';
|
|
11
|
-
import '../../postgres-IaBA4RgE.js';
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Options for creating a SQLite backend.
|
|
@@ -51,6 +51,6 @@ type SqliteBackendOptions = Readonly<{
|
|
|
51
51
|
*/
|
|
52
52
|
capabilities?: Partial<BackendCapabilities>;
|
|
53
53
|
}>;
|
|
54
|
-
declare function createSqliteBackend(db: AnySqliteDatabase, options?: SqliteBackendOptions):
|
|
54
|
+
declare function createSqliteBackend(db: AnySqliteDatabase, options?: SqliteBackendOptions): AdapterBackend<AnySqliteDatabase>;
|
|
55
55
|
|
|
56
|
-
export { type SqliteBackendOptions, SqliteTables, createSqliteBackend };
|
|
56
|
+
export { AnySqliteDatabase, type SqliteBackendOptions, SqliteTables, createSqliteBackend };
|
|
@@ -1,17 +1,21 @@
|
|
|
1
|
-
export { createSqliteBackend } from '../../chunk-
|
|
2
|
-
export { generateSqliteDDL, generateSqliteMigrationSQL } from '../../chunk-
|
|
3
|
-
export { createSqliteTables, edges, nodes, recordedClock, recordedEdges, recordedNodes, schemaVersions, tables, uniques } from '../../chunk-
|
|
4
|
-
import '../../chunk-
|
|
5
|
-
import '../../chunk-
|
|
1
|
+
export { createSqliteBackend } from '../../chunk-TE5ZA4VX.js';
|
|
2
|
+
export { generateSqliteDDL, generateSqliteMigrationSQL } from '../../chunk-G32AO634.js';
|
|
3
|
+
export { createSqliteTables, edges, nodes, recordedClock, recordedEdges, recordedNodes, schemaVersions, tables, uniques } from '../../chunk-MTNEGGM2.js';
|
|
4
|
+
import '../../chunk-AOL64O4Z.js';
|
|
5
|
+
import '../../chunk-Z2PPIVOO.js';
|
|
6
|
+
import '../../chunk-35S6P5ZU.js';
|
|
7
|
+
import '../../chunk-PZHC5GCD.js';
|
|
6
8
|
import '../../chunk-UR7W5YQK.js';
|
|
7
|
-
import '../../chunk-
|
|
8
|
-
import '../../chunk-
|
|
9
|
-
import '../../chunk-
|
|
10
|
-
import '../../chunk-
|
|
11
|
-
import '../../chunk-
|
|
12
|
-
import '../../chunk-
|
|
13
|
-
import '../../chunk-
|
|
14
|
-
import '../../chunk-
|
|
9
|
+
import '../../chunk-KFLXWVUJ.js';
|
|
10
|
+
import '../../chunk-BQITNFQJ.js';
|
|
11
|
+
import '../../chunk-K34OPSJK.js';
|
|
12
|
+
import '../../chunk-2EBMPJBO.js';
|
|
13
|
+
import '../../chunk-G3CSQLLT.js';
|
|
14
|
+
import '../../chunk-DDCIXXOO.js';
|
|
15
|
+
import '../../chunk-Y7M44XEK.js';
|
|
16
|
+
import '../../chunk-6XDBRDZE.js';
|
|
17
|
+
import '../../chunk-QMQLUA66.js';
|
|
18
|
+
import '../../chunk-DPNA466P.js';
|
|
15
19
|
import '../../chunk-G6Q5UM7U.js';
|
|
16
20
|
//# sourceMappingURL=index.js.map
|
|
17
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,30 +1,34 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
require('../../chunk-
|
|
7
|
-
var
|
|
8
|
-
require('../../chunk-
|
|
9
|
-
require('../../chunk-
|
|
3
|
+
var chunkYLINFV7Z_cjs = require('../../chunk-YLINFV7Z.cjs');
|
|
4
|
+
var chunkXFY73JWD_cjs = require('../../chunk-XFY73JWD.cjs');
|
|
5
|
+
var chunkNPWACFQJ_cjs = require('../../chunk-NPWACFQJ.cjs');
|
|
6
|
+
require('../../chunk-FMNUSGZ4.cjs');
|
|
7
|
+
var chunkEOJFGECD_cjs = require('../../chunk-EOJFGECD.cjs');
|
|
8
|
+
require('../../chunk-E6TXEISH.cjs');
|
|
9
|
+
require('../../chunk-DOVMTPKE.cjs');
|
|
10
|
+
require('../../chunk-ZDH3DX3C.cjs');
|
|
11
|
+
require('../../chunk-GNPGGLAE.cjs');
|
|
10
12
|
require('../../chunk-ACSVZPK7.cjs');
|
|
11
|
-
require('../../chunk-
|
|
12
|
-
require('../../chunk-
|
|
13
|
-
require('../../chunk-
|
|
14
|
-
require('../../chunk-
|
|
15
|
-
require('../../chunk-
|
|
16
|
-
require('../../chunk-
|
|
17
|
-
require('../../chunk-
|
|
18
|
-
require('../../chunk-
|
|
13
|
+
require('../../chunk-O5H62ZWJ.cjs');
|
|
14
|
+
require('../../chunk-GUUWKPTK.cjs');
|
|
15
|
+
require('../../chunk-ZY4GXIVN.cjs');
|
|
16
|
+
require('../../chunk-NAUA4PW5.cjs');
|
|
17
|
+
require('../../chunk-UH2USOMG.cjs');
|
|
18
|
+
require('../../chunk-Z5QHVL5U.cjs');
|
|
19
|
+
require('../../chunk-ZKZAIX42.cjs');
|
|
20
|
+
require('../../chunk-X6RDQ5NB.cjs');
|
|
21
|
+
require('../../chunk-764JHTLT.cjs');
|
|
22
|
+
require('../../chunk-SAFZ6JTI.cjs');
|
|
19
23
|
require('../../chunk-TDXIBCGY.cjs');
|
|
20
24
|
var libsql = require('drizzle-orm/libsql');
|
|
21
25
|
|
|
22
26
|
async function createLibsqlBackend(client, options = {}) {
|
|
23
|
-
const tables2 = options.tables ??
|
|
27
|
+
const tables2 = options.tables ?? chunkEOJFGECD_cjs.tables;
|
|
24
28
|
const db = libsql.drizzle(client);
|
|
25
|
-
const ddlStatements =
|
|
29
|
+
const ddlStatements = chunkXFY73JWD_cjs.generateSqliteDDL(tables2);
|
|
26
30
|
await client.executeMultiple(ddlStatements.join(";\n"));
|
|
27
|
-
const backend =
|
|
31
|
+
const backend = chunkYLINFV7Z_cjs.createSqliteBackend(db, {
|
|
28
32
|
executionProfile: {
|
|
29
33
|
isSync: false,
|
|
30
34
|
transactionMode: client.protocol === "file" ? "sql" : "drizzle"
|
|
@@ -32,7 +36,7 @@ async function createLibsqlBackend(client, options = {}) {
|
|
|
32
36
|
tables: tables2,
|
|
33
37
|
// libSQL ships native vector search in core — no extension to load —
|
|
34
38
|
// so the strategy is wired unconditionally.
|
|
35
|
-
vector:
|
|
39
|
+
vector: chunkNPWACFQJ_cjs.libsqlVectorStrategy
|
|
36
40
|
});
|
|
37
41
|
return { backend, db };
|
|
38
42
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/backend/sqlite/libsql.ts"],"names":["tables","drizzle","generateSqliteDDL","createSqliteBackend","libsqlVectorStrategy"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../src/backend/sqlite/libsql.ts"],"names":["tables","drizzle","generateSqliteDDL","createSqliteBackend","libsqlVectorStrategy"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAuGA,eAAsB,mBAAA,CACpB,MAAA,EACA,OAAA,GAAgC,EAAC,EACH;AAC9B,EAAA,MAAMA,OAAAA,GAAS,QAAQ,MAAA,IAAUA,wBAAA;AACjC,EAAA,MAAM,EAAA,GAAKC,eAAQ,MAAM,CAAA;AAEzB,EAAA,MAAM,aAAA,GAAgBC,oCAAkBF,OAAM,CAAA;AAC9C,EAAA,MAAM,MAAA,CAAO,eAAA,CAAgB,aAAA,CAAc,IAAA,CAAK,KAAK,CAAC,CAAA;AAEtD,EAAA,MAAM,OAAA,GAAUG,sCAAoB,EAAA,EAAI;AAAA,IACtC,gBAAA,EAAkB;AAAA,MAChB,MAAA,EAAQ,KAAA;AAAA,MACR,eAAA,EAAiB,MAAA,CAAO,QAAA,KAAa,MAAA,GAAS,KAAA,GAAQ;AAAA,KACxD;AAAA,IACA,MAAA,EAAAH,OAAAA;AAAA;AAAA;AAAA,IAGA,MAAA,EAAQI;AAAA,GACT,CAAA;AAED,EAAA,OAAO,EAAE,SAAS,EAAA,EAAG;AACvB","file":"libsql.cjs","sourcesContent":["/**\n * libsql backend for TypeGraph.\n *\n * This module wraps `@libsql/client` with the correct execution profile\n * for use with TypeGraph. It is compatible with any `@libsql/client`\n * instance (local file, remote Turso, embedded replicas).\n *\n * @example In-memory database\n * ```typescript\n * import { createClient } from \"@libsql/client\";\n * import { createLibsqlBackend } from \"@nicia-ai/typegraph/adapters/drizzle/sqlite/libsql\";\n *\n * const client = createClient({ url: \"file::memory:\" });\n * const { backend } = await createLibsqlBackend(client);\n * const store = createStore(graph, backend);\n * ```\n *\n * @example Remote Turso database\n * ```typescript\n * import { createClient } from \"@libsql/client\";\n * import { createLibsqlBackend } from \"@nicia-ai/typegraph/adapters/drizzle/sqlite/libsql\";\n *\n * const client = createClient({ url: \"libsql://my-db.turso.io\", authToken: \"...\" });\n * const { backend } = await createLibsqlBackend(client);\n * const store = createStore(graph, backend);\n * ```\n */\nimport type { Client } from \"@libsql/client\";\nimport { drizzle, type LibSQLDatabase } from \"drizzle-orm/libsql\";\n\nimport { libsqlVectorStrategy } from \"../../query/dialect/vector/libsql-strategy\";\nimport { generateSqliteDDL } from \"../drizzle/ddl\";\nimport { type AnySqliteDatabase } from \"../drizzle/execution\";\nexport type { AnySqliteDatabase } from \"../drizzle/execution\";\nimport {\n createSqliteBackend,\n type SqliteTables,\n tables as defaultTables,\n} from \"../drizzle/sqlite\";\nimport type { AdapterBackend } from \"../types\";\n\n// ============================================================\n// Types\n// ============================================================\n\n/**\n * Options for creating a libsql backend.\n */\nexport type LibsqlBackendOptions = Readonly<{\n /**\n * Custom table definitions.\n * Defaults to standard TypeGraph table names.\n */\n tables?: SqliteTables;\n}>;\n\n/**\n * Result of creating a libsql backend.\n */\nexport type LibsqlBackendResult = Readonly<{\n /**\n * The GraphBackend instance for use with createStore.\n */\n backend: AdapterBackend<AnySqliteDatabase>;\n\n /**\n * The underlying Drizzle database instance.\n * Useful for direct SQL access or sharing the connection.\n */\n db: LibSQLDatabase;\n}>;\n\n// ============================================================\n// Factory Function\n// ============================================================\n\n/**\n * Creates a TypeGraph backend backed by `@libsql/client`.\n *\n * Handles DDL execution and configures the correct execution profile.\n * Local clients (`client.protocol === \"file\"`, covering `file:` paths and\n * `:memory:` databases) run transactions as raw BEGIN/COMMIT statements on\n * the client's single stable connection (`transactionMode: \"sql\"`):\n * `client.transaction()` permanently hands that connection to the\n * transaction and lazily opens a fresh one afterwards, which for an\n * in-memory database is a fresh, empty database. Remote clients (`http` /\n * `ws`) run each transaction on its own stream via Drizzle's\n * `db.transaction()` (`transactionMode: \"drizzle\"`). The caller retains\n * ownership of the client and is responsible for closing it.\n *\n * @param client - An `@libsql/client` Client instance\n * @param options - Configuration options\n * @returns Backend and Drizzle database instances\n *\n * @example\n * ```typescript\n * import { createClient } from \"@libsql/client\";\n * import { createLibsqlBackend } from \"@nicia-ai/typegraph/adapters/drizzle/sqlite/libsql\";\n *\n * const client = createClient({ url: \"file::memory:\" });\n * const { backend } = await createLibsqlBackend(client);\n * ```\n */\nexport async function createLibsqlBackend(\n client: Client,\n options: LibsqlBackendOptions = {},\n): Promise<LibsqlBackendResult> {\n const tables = options.tables ?? defaultTables;\n const db = drizzle(client);\n\n const ddlStatements = generateSqliteDDL(tables);\n await client.executeMultiple(ddlStatements.join(\";\\n\"));\n\n const backend = createSqliteBackend(db, {\n executionProfile: {\n isSync: false,\n transactionMode: client.protocol === \"file\" ? \"sql\" : \"drizzle\",\n },\n tables,\n // libSQL ships native vector search in core — no extension to load —\n // so the strategy is wired unconditionally.\n vector: libsqlVectorStrategy,\n });\n\n return { backend, db };\n}\n"]}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { Client } from '@libsql/client';
|
|
2
2
|
import { LibSQLDatabase } from 'drizzle-orm/libsql';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import '
|
|
6
|
-
import '../../extension-types-
|
|
3
|
+
import { A as AdapterBackend } from '../../index-CrFL_ENI.cjs';
|
|
4
|
+
import { A as AnySqliteDatabase } from '../../sqlite-execution-DwbE2a9y.cjs';
|
|
5
|
+
import { S as SqliteTables } from '../../sqlite-BDkW39aa.cjs';
|
|
6
|
+
import '../../extension-types-BLEVH4SG.cjs';
|
|
7
7
|
import 'zod';
|
|
8
|
-
import 'drizzle-orm/pg-core';
|
|
9
8
|
import 'drizzle-orm/sqlite-core';
|
|
10
9
|
|
|
11
10
|
/**
|
|
@@ -18,7 +17,7 @@ import 'drizzle-orm/sqlite-core';
|
|
|
18
17
|
* @example In-memory database
|
|
19
18
|
* ```typescript
|
|
20
19
|
* import { createClient } from "@libsql/client";
|
|
21
|
-
* import { createLibsqlBackend } from "@nicia-ai/typegraph/sqlite/libsql";
|
|
20
|
+
* import { createLibsqlBackend } from "@nicia-ai/typegraph/adapters/drizzle/sqlite/libsql";
|
|
22
21
|
*
|
|
23
22
|
* const client = createClient({ url: "file::memory:" });
|
|
24
23
|
* const { backend } = await createLibsqlBackend(client);
|
|
@@ -28,7 +27,7 @@ import 'drizzle-orm/sqlite-core';
|
|
|
28
27
|
* @example Remote Turso database
|
|
29
28
|
* ```typescript
|
|
30
29
|
* import { createClient } from "@libsql/client";
|
|
31
|
-
* import { createLibsqlBackend } from "@nicia-ai/typegraph/sqlite/libsql";
|
|
30
|
+
* import { createLibsqlBackend } from "@nicia-ai/typegraph/adapters/drizzle/sqlite/libsql";
|
|
32
31
|
*
|
|
33
32
|
* const client = createClient({ url: "libsql://my-db.turso.io", authToken: "..." });
|
|
34
33
|
* const { backend } = await createLibsqlBackend(client);
|
|
@@ -53,7 +52,7 @@ type LibsqlBackendResult = Readonly<{
|
|
|
53
52
|
/**
|
|
54
53
|
* The GraphBackend instance for use with createStore.
|
|
55
54
|
*/
|
|
56
|
-
backend:
|
|
55
|
+
backend: AdapterBackend<AnySqliteDatabase>;
|
|
57
56
|
/**
|
|
58
57
|
* The underlying Drizzle database instance.
|
|
59
58
|
* Useful for direct SQL access or sharing the connection.
|
|
@@ -81,7 +80,7 @@ type LibsqlBackendResult = Readonly<{
|
|
|
81
80
|
* @example
|
|
82
81
|
* ```typescript
|
|
83
82
|
* import { createClient } from "@libsql/client";
|
|
84
|
-
* import { createLibsqlBackend } from "@nicia-ai/typegraph/sqlite/libsql";
|
|
83
|
+
* import { createLibsqlBackend } from "@nicia-ai/typegraph/adapters/drizzle/sqlite/libsql";
|
|
85
84
|
*
|
|
86
85
|
* const client = createClient({ url: "file::memory:" });
|
|
87
86
|
* const { backend } = await createLibsqlBackend(client);
|
|
@@ -89,4 +88,4 @@ type LibsqlBackendResult = Readonly<{
|
|
|
89
88
|
*/
|
|
90
89
|
declare function createLibsqlBackend(client: Client, options?: LibsqlBackendOptions): Promise<LibsqlBackendResult>;
|
|
91
90
|
|
|
92
|
-
export { type LibsqlBackendOptions, type LibsqlBackendResult, createLibsqlBackend };
|
|
91
|
+
export { AnySqliteDatabase, type LibsqlBackendOptions, type LibsqlBackendResult, createLibsqlBackend };
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { Client } from '@libsql/client';
|
|
2
2
|
import { LibSQLDatabase } from 'drizzle-orm/libsql';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import '
|
|
6
|
-
import '../../extension-types-
|
|
3
|
+
import { A as AdapterBackend } from '../../index-Bq7vSPHy.js';
|
|
4
|
+
import { A as AnySqliteDatabase } from '../../sqlite-execution-DwbE2a9y.js';
|
|
5
|
+
import { S as SqliteTables } from '../../sqlite-CYfhvESj.js';
|
|
6
|
+
import '../../extension-types-BLEVH4SG.js';
|
|
7
7
|
import 'zod';
|
|
8
|
-
import 'drizzle-orm/pg-core';
|
|
9
8
|
import 'drizzle-orm/sqlite-core';
|
|
10
9
|
|
|
11
10
|
/**
|
|
@@ -18,7 +17,7 @@ import 'drizzle-orm/sqlite-core';
|
|
|
18
17
|
* @example In-memory database
|
|
19
18
|
* ```typescript
|
|
20
19
|
* import { createClient } from "@libsql/client";
|
|
21
|
-
* import { createLibsqlBackend } from "@nicia-ai/typegraph/sqlite/libsql";
|
|
20
|
+
* import { createLibsqlBackend } from "@nicia-ai/typegraph/adapters/drizzle/sqlite/libsql";
|
|
22
21
|
*
|
|
23
22
|
* const client = createClient({ url: "file::memory:" });
|
|
24
23
|
* const { backend } = await createLibsqlBackend(client);
|
|
@@ -28,7 +27,7 @@ import 'drizzle-orm/sqlite-core';
|
|
|
28
27
|
* @example Remote Turso database
|
|
29
28
|
* ```typescript
|
|
30
29
|
* import { createClient } from "@libsql/client";
|
|
31
|
-
* import { createLibsqlBackend } from "@nicia-ai/typegraph/sqlite/libsql";
|
|
30
|
+
* import { createLibsqlBackend } from "@nicia-ai/typegraph/adapters/drizzle/sqlite/libsql";
|
|
32
31
|
*
|
|
33
32
|
* const client = createClient({ url: "libsql://my-db.turso.io", authToken: "..." });
|
|
34
33
|
* const { backend } = await createLibsqlBackend(client);
|
|
@@ -53,7 +52,7 @@ type LibsqlBackendResult = Readonly<{
|
|
|
53
52
|
/**
|
|
54
53
|
* The GraphBackend instance for use with createStore.
|
|
55
54
|
*/
|
|
56
|
-
backend:
|
|
55
|
+
backend: AdapterBackend<AnySqliteDatabase>;
|
|
57
56
|
/**
|
|
58
57
|
* The underlying Drizzle database instance.
|
|
59
58
|
* Useful for direct SQL access or sharing the connection.
|
|
@@ -81,7 +80,7 @@ type LibsqlBackendResult = Readonly<{
|
|
|
81
80
|
* @example
|
|
82
81
|
* ```typescript
|
|
83
82
|
* import { createClient } from "@libsql/client";
|
|
84
|
-
* import { createLibsqlBackend } from "@nicia-ai/typegraph/sqlite/libsql";
|
|
83
|
+
* import { createLibsqlBackend } from "@nicia-ai/typegraph/adapters/drizzle/sqlite/libsql";
|
|
85
84
|
*
|
|
86
85
|
* const client = createClient({ url: "file::memory:" });
|
|
87
86
|
* const { backend } = await createLibsqlBackend(client);
|
|
@@ -89,4 +88,4 @@ type LibsqlBackendResult = Readonly<{
|
|
|
89
88
|
*/
|
|
90
89
|
declare function createLibsqlBackend(client: Client, options?: LibsqlBackendOptions): Promise<LibsqlBackendResult>;
|
|
91
90
|
|
|
92
|
-
export { type LibsqlBackendOptions, type LibsqlBackendResult, createLibsqlBackend };
|
|
91
|
+
export { AnySqliteDatabase, type LibsqlBackendOptions, type LibsqlBackendResult, createLibsqlBackend };
|
|
@@ -1,19 +1,23 @@
|
|
|
1
|
-
import { createSqliteBackend } from '../../chunk-
|
|
2
|
-
import { generateSqliteDDL } from '../../chunk-
|
|
3
|
-
import { libsqlVectorStrategy } from '../../chunk-
|
|
4
|
-
import '../../chunk-
|
|
5
|
-
import { tables } from '../../chunk-
|
|
6
|
-
import '../../chunk-
|
|
7
|
-
import '../../chunk-
|
|
1
|
+
import { createSqliteBackend } from '../../chunk-TE5ZA4VX.js';
|
|
2
|
+
import { generateSqliteDDL } from '../../chunk-G32AO634.js';
|
|
3
|
+
import { libsqlVectorStrategy } from '../../chunk-ERZ4QPQX.js';
|
|
4
|
+
import '../../chunk-EZH7FNUS.js';
|
|
5
|
+
import { tables } from '../../chunk-MTNEGGM2.js';
|
|
6
|
+
import '../../chunk-AOL64O4Z.js';
|
|
7
|
+
import '../../chunk-Z2PPIVOO.js';
|
|
8
|
+
import '../../chunk-35S6P5ZU.js';
|
|
9
|
+
import '../../chunk-PZHC5GCD.js';
|
|
8
10
|
import '../../chunk-UR7W5YQK.js';
|
|
9
|
-
import '../../chunk-
|
|
10
|
-
import '../../chunk-
|
|
11
|
-
import '../../chunk-
|
|
12
|
-
import '../../chunk-
|
|
13
|
-
import '../../chunk-
|
|
14
|
-
import '../../chunk-
|
|
15
|
-
import '../../chunk-
|
|
16
|
-
import '../../chunk-
|
|
11
|
+
import '../../chunk-KFLXWVUJ.js';
|
|
12
|
+
import '../../chunk-BQITNFQJ.js';
|
|
13
|
+
import '../../chunk-K34OPSJK.js';
|
|
14
|
+
import '../../chunk-2EBMPJBO.js';
|
|
15
|
+
import '../../chunk-G3CSQLLT.js';
|
|
16
|
+
import '../../chunk-DDCIXXOO.js';
|
|
17
|
+
import '../../chunk-Y7M44XEK.js';
|
|
18
|
+
import '../../chunk-6XDBRDZE.js';
|
|
19
|
+
import '../../chunk-QMQLUA66.js';
|
|
20
|
+
import '../../chunk-DPNA466P.js';
|
|
17
21
|
import '../../chunk-G6Q5UM7U.js';
|
|
18
22
|
import { drizzle } from 'drizzle-orm/libsql';
|
|
19
23
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/backend/sqlite/libsql.ts"],"names":["tables"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../src/backend/sqlite/libsql.ts"],"names":["tables"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAuGA,eAAsB,mBAAA,CACpB,MAAA,EACA,OAAA,GAAgC,EAAC,EACH;AAC9B,EAAA,MAAMA,OAAAA,GAAS,QAAQ,MAAA,IAAU,MAAA;AACjC,EAAA,MAAM,EAAA,GAAK,QAAQ,MAAM,CAAA;AAEzB,EAAA,MAAM,aAAA,GAAgB,kBAAkBA,OAAM,CAAA;AAC9C,EAAA,MAAM,MAAA,CAAO,eAAA,CAAgB,aAAA,CAAc,IAAA,CAAK,KAAK,CAAC,CAAA;AAEtD,EAAA,MAAM,OAAA,GAAU,oBAAoB,EAAA,EAAI;AAAA,IACtC,gBAAA,EAAkB;AAAA,MAChB,MAAA,EAAQ,KAAA;AAAA,MACR,eAAA,EAAiB,MAAA,CAAO,QAAA,KAAa,MAAA,GAAS,KAAA,GAAQ;AAAA,KACxD;AAAA,IACA,MAAA,EAAAA,OAAAA;AAAA;AAAA;AAAA,IAGA,MAAA,EAAQ;AAAA,GACT,CAAA;AAED,EAAA,OAAO,EAAE,SAAS,EAAA,EAAG;AACvB","file":"libsql.js","sourcesContent":["/**\n * libsql backend for TypeGraph.\n *\n * This module wraps `@libsql/client` with the correct execution profile\n * for use with TypeGraph. It is compatible with any `@libsql/client`\n * instance (local file, remote Turso, embedded replicas).\n *\n * @example In-memory database\n * ```typescript\n * import { createClient } from \"@libsql/client\";\n * import { createLibsqlBackend } from \"@nicia-ai/typegraph/adapters/drizzle/sqlite/libsql\";\n *\n * const client = createClient({ url: \"file::memory:\" });\n * const { backend } = await createLibsqlBackend(client);\n * const store = createStore(graph, backend);\n * ```\n *\n * @example Remote Turso database\n * ```typescript\n * import { createClient } from \"@libsql/client\";\n * import { createLibsqlBackend } from \"@nicia-ai/typegraph/adapters/drizzle/sqlite/libsql\";\n *\n * const client = createClient({ url: \"libsql://my-db.turso.io\", authToken: \"...\" });\n * const { backend } = await createLibsqlBackend(client);\n * const store = createStore(graph, backend);\n * ```\n */\nimport type { Client } from \"@libsql/client\";\nimport { drizzle, type LibSQLDatabase } from \"drizzle-orm/libsql\";\n\nimport { libsqlVectorStrategy } from \"../../query/dialect/vector/libsql-strategy\";\nimport { generateSqliteDDL } from \"../drizzle/ddl\";\nimport { type AnySqliteDatabase } from \"../drizzle/execution\";\nexport type { AnySqliteDatabase } from \"../drizzle/execution\";\nimport {\n createSqliteBackend,\n type SqliteTables,\n tables as defaultTables,\n} from \"../drizzle/sqlite\";\nimport type { AdapterBackend } from \"../types\";\n\n// ============================================================\n// Types\n// ============================================================\n\n/**\n * Options for creating a libsql backend.\n */\nexport type LibsqlBackendOptions = Readonly<{\n /**\n * Custom table definitions.\n * Defaults to standard TypeGraph table names.\n */\n tables?: SqliteTables;\n}>;\n\n/**\n * Result of creating a libsql backend.\n */\nexport type LibsqlBackendResult = Readonly<{\n /**\n * The GraphBackend instance for use with createStore.\n */\n backend: AdapterBackend<AnySqliteDatabase>;\n\n /**\n * The underlying Drizzle database instance.\n * Useful for direct SQL access or sharing the connection.\n */\n db: LibSQLDatabase;\n}>;\n\n// ============================================================\n// Factory Function\n// ============================================================\n\n/**\n * Creates a TypeGraph backend backed by `@libsql/client`.\n *\n * Handles DDL execution and configures the correct execution profile.\n * Local clients (`client.protocol === \"file\"`, covering `file:` paths and\n * `:memory:` databases) run transactions as raw BEGIN/COMMIT statements on\n * the client's single stable connection (`transactionMode: \"sql\"`):\n * `client.transaction()` permanently hands that connection to the\n * transaction and lazily opens a fresh one afterwards, which for an\n * in-memory database is a fresh, empty database. Remote clients (`http` /\n * `ws`) run each transaction on its own stream via Drizzle's\n * `db.transaction()` (`transactionMode: \"drizzle\"`). The caller retains\n * ownership of the client and is responsible for closing it.\n *\n * @param client - An `@libsql/client` Client instance\n * @param options - Configuration options\n * @returns Backend and Drizzle database instances\n *\n * @example\n * ```typescript\n * import { createClient } from \"@libsql/client\";\n * import { createLibsqlBackend } from \"@nicia-ai/typegraph/adapters/drizzle/sqlite/libsql\";\n *\n * const client = createClient({ url: \"file::memory:\" });\n * const { backend } = await createLibsqlBackend(client);\n * ```\n */\nexport async function createLibsqlBackend(\n client: Client,\n options: LibsqlBackendOptions = {},\n): Promise<LibsqlBackendResult> {\n const tables = options.tables ?? defaultTables;\n const db = drizzle(client);\n\n const ddlStatements = generateSqliteDDL(tables);\n await client.executeMultiple(ddlStatements.join(\";\\n\"));\n\n const backend = createSqliteBackend(db, {\n executionProfile: {\n isSync: false,\n transactionMode: client.protocol === \"file\" ? \"sql\" : \"drizzle\",\n },\n tables,\n // libSQL ships native vector search in core — no extension to load —\n // so the strategy is wired unconditionally.\n vector: libsqlVectorStrategy,\n });\n\n return { backend, db };\n}\n"]}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkNU23DUSJ_cjs = require('../../chunk-NU23DUSJ.cjs');
|
|
4
|
+
require('../../chunk-YLINFV7Z.cjs');
|
|
5
|
+
require('../../chunk-XFY73JWD.cjs');
|
|
6
|
+
var chunk2SL7OGPR_cjs = require('../../chunk-2SL7OGPR.cjs');
|
|
7
|
+
require('../../chunk-TRF4EBJT.cjs');
|
|
8
|
+
require('../../chunk-BKAKAVRW.cjs');
|
|
9
|
+
require('../../chunk-FMNUSGZ4.cjs');
|
|
10
|
+
var chunkEOJFGECD_cjs = require('../../chunk-EOJFGECD.cjs');
|
|
11
|
+
require('../../chunk-E6TXEISH.cjs');
|
|
12
|
+
require('../../chunk-DOVMTPKE.cjs');
|
|
13
|
+
require('../../chunk-KCLZHYPU.cjs');
|
|
14
|
+
require('../../chunk-NWYCOFEZ.cjs');
|
|
15
|
+
require('../../chunk-ZDH3DX3C.cjs');
|
|
16
|
+
var chunkGNPGGLAE_cjs = require('../../chunk-GNPGGLAE.cjs');
|
|
17
|
+
require('../../chunk-SVUKGWSN.cjs');
|
|
18
|
+
require('../../chunk-CQC6VBAF.cjs');
|
|
19
|
+
require('../../chunk-RW24SAHI.cjs');
|
|
20
|
+
require('../../chunk-X4PVHAZ6.cjs');
|
|
21
|
+
require('../../chunk-ACSVZPK7.cjs');
|
|
22
|
+
require('../../chunk-O5H62ZWJ.cjs');
|
|
23
|
+
require('../../chunk-NT6ILURI.cjs');
|
|
24
|
+
require('../../chunk-DDCYVIVV.cjs');
|
|
25
|
+
require('../../chunk-CWX77JB4.cjs');
|
|
26
|
+
require('../../chunk-GUUWKPTK.cjs');
|
|
27
|
+
require('../../chunk-7M3NACL3.cjs');
|
|
28
|
+
require('../../chunk-ZY4GXIVN.cjs');
|
|
29
|
+
require('../../chunk-NAUA4PW5.cjs');
|
|
30
|
+
require('../../chunk-UH2USOMG.cjs');
|
|
31
|
+
require('../../chunk-Z5QHVL5U.cjs');
|
|
32
|
+
require('../../chunk-ZKZAIX42.cjs');
|
|
33
|
+
require('../../chunk-X6RDQ5NB.cjs');
|
|
34
|
+
require('../../chunk-FJMPR3OH.cjs');
|
|
35
|
+
require('../../chunk-SJDMVITW.cjs');
|
|
36
|
+
require('../../chunk-764JHTLT.cjs');
|
|
37
|
+
require('../../chunk-HAHNRASW.cjs');
|
|
38
|
+
require('../../chunk-N2V3HJFV.cjs');
|
|
39
|
+
require('../../chunk-SVJ5GEXW.cjs');
|
|
40
|
+
require('../../chunk-NMQ6C6TS.cjs');
|
|
41
|
+
require('../../chunk-DI74SMXS.cjs');
|
|
42
|
+
require('../../chunk-XRU7V7FF.cjs');
|
|
43
|
+
require('../../chunk-SAFZ6JTI.cjs');
|
|
44
|
+
require('../../chunk-TDXIBCGY.cjs');
|
|
45
|
+
|
|
46
|
+
// src/backend/sqlite/local-store.ts
|
|
47
|
+
async function createLocalSqliteStore(graph, options = {}) {
|
|
48
|
+
const tables = options.store?.schema === void 0 ? void 0 : chunkEOJFGECD_cjs.createSqliteTables(options.store.schema.tables);
|
|
49
|
+
const { backend } = chunkNU23DUSJ_cjs.createLocalSqliteBackend({
|
|
50
|
+
...options.path === void 0 ? {} : { path: options.path },
|
|
51
|
+
...options.pragmas === void 0 ? {} : { pragmas: options.pragmas },
|
|
52
|
+
...options.capabilities === void 0 ? {} : { capabilities: options.capabilities },
|
|
53
|
+
...tables === void 0 ? {} : { tables }
|
|
54
|
+
});
|
|
55
|
+
try {
|
|
56
|
+
const [store] = await chunk2SL7OGPR_cjs.createStoreWithSchema(graph, backend, {
|
|
57
|
+
...options.store,
|
|
58
|
+
...options.schemaManagement
|
|
59
|
+
});
|
|
60
|
+
return store;
|
|
61
|
+
} catch (error) {
|
|
62
|
+
return chunkGNPGGLAE_cjs.closeAfterFailure(backend, error);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
Object.defineProperty(exports, "DEFAULT_LOCAL_SQLITE_PRAGMAS", {
|
|
67
|
+
enumerable: true,
|
|
68
|
+
get: function () { return chunkNU23DUSJ_cjs.DEFAULT_LOCAL_SQLITE_PRAGMAS; }
|
|
69
|
+
});
|
|
70
|
+
exports.createLocalSqliteStore = createLocalSqliteStore;
|
|
71
|
+
//# sourceMappingURL=local-store.cjs.map
|
|
72
|
+
//# sourceMappingURL=local-store.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/backend/sqlite/local-store.ts"],"names":["createSqliteTables","createLocalSqliteBackend","createStoreWithSchema","closeAfterFailure"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuEA,eAAsB,sBAAA,CACpB,KAAA,EACA,OAAA,GAAmC,EAAC,EACwB;AAC5D,EAAA,MAAM,MAAA,GACJ,OAAA,CAAQ,KAAA,EAAO,MAAA,KAAW,MAAA,GACxB,SACAA,oCAAA,CAAmB,OAAA,CAAQ,KAAA,CAAM,MAAA,CAAO,MAAM,CAAA;AAClD,EAAA,MAAM,EAAE,OAAA,EAAQ,GAAIC,0CAAA,CAAyB;AAAA,IAC3C,GAAI,QAAQ,IAAA,KAAS,MAAA,GAAY,EAAC,GAAI,EAAE,IAAA,EAAM,OAAA,CAAQ,IAAA,EAAK;AAAA,IAC3D,GAAI,QAAQ,OAAA,KAAY,MAAA,GAAY,EAAC,GAAI,EAAE,OAAA,EAAS,OAAA,CAAQ,OAAA,EAAQ;AAAA,IACpE,GAAI,QAAQ,YAAA,KAAiB,MAAA,GAC3B,EAAC,GACD,EAAE,YAAA,EAAc,OAAA,CAAQ,YAAA,EAAa;AAAA,IACvC,GAAI,MAAA,KAAW,MAAA,GAAY,EAAC,GAAI,EAAE,MAAA;AAAO,GAC1C,CAAA;AACD,EAAA,IAAI;AACF,IAAA,MAAM,CAAC,KAAK,CAAA,GAAI,MAAMC,uCAAA,CAAsB,OAAO,OAAA,EAAS;AAAA,MAC1D,GAAG,OAAA,CAAQ,KAAA;AAAA,MACX,GAAG,OAAA,CAAQ;AAAA,KACZ,CAAA;AACD,IAAA,OAAO,KAAA;AAAA,EACT,SAAS,KAAA,EAAO;AACd,IAAA,OAAOC,mCAAA,CAAkB,SAAS,KAAK,CAAA;AAAA,EACzC;AACF","file":"local-store.cjs","sourcesContent":["/**\n * Batteries-included local SQLite Store for strict TypeScript consumers.\n *\n * This entrypoint owns the connection and intentionally exposes the portable\n * TypeGraph Store surface rather than the adapter-native Drizzle handle.\n */\nimport { type GraphDef } from \"../../core/define-graph\";\nimport { type SchemaManagerOptions } from \"../../schema/manager\";\nimport {\n createStoreWithSchema,\n type HistoryStore,\n type RecordedReadStore,\n type Store,\n} from \"../../store/store\";\nimport {\n type HistoryStoreOptions,\n type LiveStoreOptions,\n type RecordedReadStoreOptions,\n type StoreOptions,\n type UnboundLiveStoreOptions,\n} from \"../../store/types\";\nimport { createSqliteTables } from \"../drizzle/schema/sqlite\";\nimport { type BackendCapabilities, closeAfterFailure } from \"../types\";\nimport { createLocalSqliteBackend } from \"./local\";\nimport { type LocalSqlitePragmaOptions } from \"./local-options\";\n\nexport {\n DEFAULT_LOCAL_SQLITE_PRAGMAS,\n type LocalSqliteJournalMode,\n type LocalSqlitePragmaOptions,\n type LocalSqliteSynchronousMode,\n} from \"./local-options\";\n\nexport type LocalSqliteStoreOptions<\n TStoreOptions extends StoreOptions = StoreOptions,\n> = Readonly<{\n /** SQLite file path. Defaults to an in-memory database. */\n path?: string;\n /** Connection pragmas applied when the owned database is opened. */\n pragmas?: LocalSqlitePragmaOptions | false;\n /** Optional backend capability overrides, primarily for controlled hosts. */\n capabilities?: Partial<BackendCapabilities>;\n /** Store behavior, including hooks, history, and custom table names. */\n store?: TStoreOptions;\n /** Schema initialization and migration policy. */\n schemaManagement?: SchemaManagerOptions;\n}>;\n\n/** Creates, provisions, and returns a full typed local SQLite Store. */\nexport function createLocalSqliteStore<G extends GraphDef>(\n graph: G,\n options?: LocalSqliteStoreOptions<UnboundLiveStoreOptions>,\n): Promise<Store<G>>;\nexport function createLocalSqliteStore<G extends GraphDef>(\n graph: G,\n options: LocalSqliteStoreOptions<HistoryStoreOptions> &\n Readonly<{ store: HistoryStoreOptions }>,\n): Promise<HistoryStore<G>>;\nexport function createLocalSqliteStore<G extends GraphDef>(\n graph: G,\n options: LocalSqliteStoreOptions<RecordedReadStoreOptions> &\n Readonly<{ store: RecordedReadStoreOptions }>,\n): Promise<RecordedReadStore<G>>;\nexport function createLocalSqliteStore<G extends GraphDef>(\n graph: G,\n options: LocalSqliteStoreOptions<LiveStoreOptions>,\n): Promise<Store<G> | RecordedReadStore<G>>;\nexport function createLocalSqliteStore<G extends GraphDef>(\n graph: G,\n options: LocalSqliteStoreOptions,\n): Promise<Store<G> | HistoryStore<G> | RecordedReadStore<G>>;\nexport async function createLocalSqliteStore<G extends GraphDef>(\n graph: G,\n options: LocalSqliteStoreOptions = {},\n): Promise<Store<G> | HistoryStore<G> | RecordedReadStore<G>> {\n const tables =\n options.store?.schema === undefined ?\n undefined\n : createSqliteTables(options.store.schema.tables);\n const { backend } = createLocalSqliteBackend({\n ...(options.path === undefined ? {} : { path: options.path }),\n ...(options.pragmas === undefined ? {} : { pragmas: options.pragmas }),\n ...(options.capabilities === undefined ?\n {}\n : { capabilities: options.capabilities }),\n ...(tables === undefined ? {} : { tables }),\n });\n try {\n const [store] = await createStoreWithSchema(graph, backend, {\n ...options.store,\n ...options.schemaManagement,\n });\n return store;\n } catch (error) {\n return closeAfterFailure(backend, error);\n }\n}\n"]}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { G as GraphDef } from '../../define-graph-CzEvA_8F.cjs';
|
|
2
|
+
import { S as SchemaManagerOptions } from '../../manager-nCEJiYBb.cjs';
|
|
3
|
+
import { S as StoreOptions, U as UnboundLiveStoreOptions, a as Store, H as HistoryStoreOptions, b as HistoryStore, R as RecordedReadStoreOptions, c as RecordedReadStore, L as LiveStoreOptions } from '../../store-view-BoHqdHjB.cjs';
|
|
4
|
+
import { B as BackendCapabilities } from '../../index-CrFL_ENI.cjs';
|
|
5
|
+
import { L as LocalSqlitePragmaOptions } from '../../local-options-CZ1BnIoF.cjs';
|
|
6
|
+
export { D as DEFAULT_LOCAL_SQLITE_PRAGMAS, a as LocalSqliteJournalMode, b as LocalSqliteSynchronousMode } from '../../local-options-CZ1BnIoF.cjs';
|
|
7
|
+
import '../../extension-types-BLEVH4SG.cjs';
|
|
8
|
+
import 'zod';
|
|
9
|
+
import '../../temporal-BC_NQV5Y.cjs';
|
|
10
|
+
import '../../materialize-indexes-ExQ6OrAh.cjs';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Batteries-included local SQLite Store for strict TypeScript consumers.
|
|
14
|
+
*
|
|
15
|
+
* This entrypoint owns the connection and intentionally exposes the portable
|
|
16
|
+
* TypeGraph Store surface rather than the adapter-native Drizzle handle.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
type LocalSqliteStoreOptions<TStoreOptions extends StoreOptions = StoreOptions> = Readonly<{
|
|
20
|
+
/** SQLite file path. Defaults to an in-memory database. */
|
|
21
|
+
path?: string;
|
|
22
|
+
/** Connection pragmas applied when the owned database is opened. */
|
|
23
|
+
pragmas?: LocalSqlitePragmaOptions | false;
|
|
24
|
+
/** Optional backend capability overrides, primarily for controlled hosts. */
|
|
25
|
+
capabilities?: Partial<BackendCapabilities>;
|
|
26
|
+
/** Store behavior, including hooks, history, and custom table names. */
|
|
27
|
+
store?: TStoreOptions;
|
|
28
|
+
/** Schema initialization and migration policy. */
|
|
29
|
+
schemaManagement?: SchemaManagerOptions;
|
|
30
|
+
}>;
|
|
31
|
+
/** Creates, provisions, and returns a full typed local SQLite Store. */
|
|
32
|
+
declare function createLocalSqliteStore<G extends GraphDef>(graph: G, options?: LocalSqliteStoreOptions<UnboundLiveStoreOptions>): Promise<Store<G>>;
|
|
33
|
+
declare function createLocalSqliteStore<G extends GraphDef>(graph: G, options: LocalSqliteStoreOptions<HistoryStoreOptions> & Readonly<{
|
|
34
|
+
store: HistoryStoreOptions;
|
|
35
|
+
}>): Promise<HistoryStore<G>>;
|
|
36
|
+
declare function createLocalSqliteStore<G extends GraphDef>(graph: G, options: LocalSqliteStoreOptions<RecordedReadStoreOptions> & Readonly<{
|
|
37
|
+
store: RecordedReadStoreOptions;
|
|
38
|
+
}>): Promise<RecordedReadStore<G>>;
|
|
39
|
+
declare function createLocalSqliteStore<G extends GraphDef>(graph: G, options: LocalSqliteStoreOptions<LiveStoreOptions>): Promise<Store<G> | RecordedReadStore<G>>;
|
|
40
|
+
declare function createLocalSqliteStore<G extends GraphDef>(graph: G, options: LocalSqliteStoreOptions): Promise<Store<G> | HistoryStore<G> | RecordedReadStore<G>>;
|
|
41
|
+
|
|
42
|
+
export { LocalSqlitePragmaOptions, type LocalSqliteStoreOptions, createLocalSqliteStore };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { G as GraphDef } from '../../define-graph-DRo9xpYN.js';
|
|
2
|
+
import { S as SchemaManagerOptions } from '../../manager-CASfhmzV.js';
|
|
3
|
+
import { S as StoreOptions, U as UnboundLiveStoreOptions, a as Store, H as HistoryStoreOptions, b as HistoryStore, R as RecordedReadStoreOptions, c as RecordedReadStore, L as LiveStoreOptions } from '../../store-view-Ctq-3OHy.js';
|
|
4
|
+
import { B as BackendCapabilities } from '../../index-Bq7vSPHy.js';
|
|
5
|
+
import { L as LocalSqlitePragmaOptions } from '../../local-options-CZ1BnIoF.js';
|
|
6
|
+
export { D as DEFAULT_LOCAL_SQLITE_PRAGMAS, a as LocalSqliteJournalMode, b as LocalSqliteSynchronousMode } from '../../local-options-CZ1BnIoF.js';
|
|
7
|
+
import '../../extension-types-BLEVH4SG.js';
|
|
8
|
+
import 'zod';
|
|
9
|
+
import '../../temporal-DqtOEo_B.js';
|
|
10
|
+
import '../../materialize-indexes-D4iei4Kp.js';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Batteries-included local SQLite Store for strict TypeScript consumers.
|
|
14
|
+
*
|
|
15
|
+
* This entrypoint owns the connection and intentionally exposes the portable
|
|
16
|
+
* TypeGraph Store surface rather than the adapter-native Drizzle handle.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
type LocalSqliteStoreOptions<TStoreOptions extends StoreOptions = StoreOptions> = Readonly<{
|
|
20
|
+
/** SQLite file path. Defaults to an in-memory database. */
|
|
21
|
+
path?: string;
|
|
22
|
+
/** Connection pragmas applied when the owned database is opened. */
|
|
23
|
+
pragmas?: LocalSqlitePragmaOptions | false;
|
|
24
|
+
/** Optional backend capability overrides, primarily for controlled hosts. */
|
|
25
|
+
capabilities?: Partial<BackendCapabilities>;
|
|
26
|
+
/** Store behavior, including hooks, history, and custom table names. */
|
|
27
|
+
store?: TStoreOptions;
|
|
28
|
+
/** Schema initialization and migration policy. */
|
|
29
|
+
schemaManagement?: SchemaManagerOptions;
|
|
30
|
+
}>;
|
|
31
|
+
/** Creates, provisions, and returns a full typed local SQLite Store. */
|
|
32
|
+
declare function createLocalSqliteStore<G extends GraphDef>(graph: G, options?: LocalSqliteStoreOptions<UnboundLiveStoreOptions>): Promise<Store<G>>;
|
|
33
|
+
declare function createLocalSqliteStore<G extends GraphDef>(graph: G, options: LocalSqliteStoreOptions<HistoryStoreOptions> & Readonly<{
|
|
34
|
+
store: HistoryStoreOptions;
|
|
35
|
+
}>): Promise<HistoryStore<G>>;
|
|
36
|
+
declare function createLocalSqliteStore<G extends GraphDef>(graph: G, options: LocalSqliteStoreOptions<RecordedReadStoreOptions> & Readonly<{
|
|
37
|
+
store: RecordedReadStoreOptions;
|
|
38
|
+
}>): Promise<RecordedReadStore<G>>;
|
|
39
|
+
declare function createLocalSqliteStore<G extends GraphDef>(graph: G, options: LocalSqliteStoreOptions<LiveStoreOptions>): Promise<Store<G> | RecordedReadStore<G>>;
|
|
40
|
+
declare function createLocalSqliteStore<G extends GraphDef>(graph: G, options: LocalSqliteStoreOptions): Promise<Store<G> | HistoryStore<G> | RecordedReadStore<G>>;
|
|
41
|
+
|
|
42
|
+
export { LocalSqlitePragmaOptions, type LocalSqliteStoreOptions, createLocalSqliteStore };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { createLocalSqliteBackend } from '../../chunk-XD6X7O5R.js';
|
|
2
|
+
export { DEFAULT_LOCAL_SQLITE_PRAGMAS } from '../../chunk-XD6X7O5R.js';
|
|
3
|
+
import '../../chunk-TE5ZA4VX.js';
|
|
4
|
+
import '../../chunk-G32AO634.js';
|
|
5
|
+
import { createStoreWithSchema } from '../../chunk-A2FGSWMQ.js';
|
|
6
|
+
import '../../chunk-DRACN6XG.js';
|
|
7
|
+
import '../../chunk-X6CNEA32.js';
|
|
8
|
+
import '../../chunk-EZH7FNUS.js';
|
|
9
|
+
import { createSqliteTables } from '../../chunk-MTNEGGM2.js';
|
|
10
|
+
import '../../chunk-AOL64O4Z.js';
|
|
11
|
+
import '../../chunk-Z2PPIVOO.js';
|
|
12
|
+
import '../../chunk-UPXDVI3T.js';
|
|
13
|
+
import '../../chunk-RQPRCEIO.js';
|
|
14
|
+
import '../../chunk-35S6P5ZU.js';
|
|
15
|
+
import { closeAfterFailure } from '../../chunk-PZHC5GCD.js';
|
|
16
|
+
import '../../chunk-J6IJARLG.js';
|
|
17
|
+
import '../../chunk-VBH7ZXSZ.js';
|
|
18
|
+
import '../../chunk-76HE7DJP.js';
|
|
19
|
+
import '../../chunk-ZE6NVENI.js';
|
|
20
|
+
import '../../chunk-UR7W5YQK.js';
|
|
21
|
+
import '../../chunk-KFLXWVUJ.js';
|
|
22
|
+
import '../../chunk-PH4IJ3V5.js';
|
|
23
|
+
import '../../chunk-I6FX7AAG.js';
|
|
24
|
+
import '../../chunk-U4JDJKPD.js';
|
|
25
|
+
import '../../chunk-BQITNFQJ.js';
|
|
26
|
+
import '../../chunk-VDYA2HMS.js';
|
|
27
|
+
import '../../chunk-K34OPSJK.js';
|
|
28
|
+
import '../../chunk-2EBMPJBO.js';
|
|
29
|
+
import '../../chunk-G3CSQLLT.js';
|
|
30
|
+
import '../../chunk-DDCIXXOO.js';
|
|
31
|
+
import '../../chunk-Y7M44XEK.js';
|
|
32
|
+
import '../../chunk-6XDBRDZE.js';
|
|
33
|
+
import '../../chunk-D7PG5D5K.js';
|
|
34
|
+
import '../../chunk-SNXVDZAJ.js';
|
|
35
|
+
import '../../chunk-QMQLUA66.js';
|
|
36
|
+
import '../../chunk-PC2UBAUB.js';
|
|
37
|
+
import '../../chunk-SCTZRFW5.js';
|
|
38
|
+
import '../../chunk-GYA4JRP5.js';
|
|
39
|
+
import '../../chunk-TAUGGLNQ.js';
|
|
40
|
+
import '../../chunk-ITE4IXAK.js';
|
|
41
|
+
import '../../chunk-XZA3Y4YH.js';
|
|
42
|
+
import '../../chunk-DPNA466P.js';
|
|
43
|
+
import '../../chunk-G6Q5UM7U.js';
|
|
44
|
+
|
|
45
|
+
// src/backend/sqlite/local-store.ts
|
|
46
|
+
async function createLocalSqliteStore(graph, options = {}) {
|
|
47
|
+
const tables = options.store?.schema === void 0 ? void 0 : createSqliteTables(options.store.schema.tables);
|
|
48
|
+
const { backend } = createLocalSqliteBackend({
|
|
49
|
+
...options.path === void 0 ? {} : { path: options.path },
|
|
50
|
+
...options.pragmas === void 0 ? {} : { pragmas: options.pragmas },
|
|
51
|
+
...options.capabilities === void 0 ? {} : { capabilities: options.capabilities },
|
|
52
|
+
...tables === void 0 ? {} : { tables }
|
|
53
|
+
});
|
|
54
|
+
try {
|
|
55
|
+
const [store] = await createStoreWithSchema(graph, backend, {
|
|
56
|
+
...options.store,
|
|
57
|
+
...options.schemaManagement
|
|
58
|
+
});
|
|
59
|
+
return store;
|
|
60
|
+
} catch (error) {
|
|
61
|
+
return closeAfterFailure(backend, error);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export { createLocalSqliteStore };
|
|
66
|
+
//# sourceMappingURL=local-store.js.map
|
|
67
|
+
//# sourceMappingURL=local-store.js.map
|