@nicia-ai/typegraph 0.43.0 → 0.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/backend/drizzle/indexes.cjs +9 -9
- package/dist/backend/drizzle/indexes.d.cts +1 -1
- package/dist/backend/drizzle/indexes.d.ts +1 -1
- package/dist/backend/drizzle/indexes.js +5 -5
- package/dist/backend/index.cjs +50 -50
- package/dist/backend/index.d.cts +3 -3
- package/dist/backend/index.d.ts +3 -3
- package/dist/backend/index.js +11 -11
- package/dist/backend/postgres/index.cjs +26 -26
- package/dist/backend/postgres/index.d.cts +6 -5
- package/dist/backend/postgres/index.d.ts +6 -5
- package/dist/backend/postgres/index.js +13 -13
- package/dist/backend/postgres/pglite-store.cjs +33 -33
- package/dist/backend/postgres/pglite-store.cjs.map +1 -1
- package/dist/backend/postgres/pglite-store.d.cts +7 -7
- package/dist/backend/postgres/pglite-store.d.ts +7 -7
- package/dist/backend/postgres/pglite-store.js +29 -29
- package/dist/backend/postgres/pglite-store.js.map +1 -1
- package/dist/backend/postgres/pglite.cjs +15 -15
- package/dist/backend/postgres/pglite.d.cts +3 -2
- package/dist/backend/postgres/pglite.d.ts +3 -2
- package/dist/backend/postgres/pglite.js +14 -14
- package/dist/backend/sqlite/index.cjs +23 -23
- package/dist/backend/sqlite/index.d.cts +7 -6
- package/dist/backend/sqlite/index.d.ts +7 -6
- package/dist/backend/sqlite/index.js +11 -11
- package/dist/backend/sqlite/libsql.cjs +17 -17
- package/dist/backend/sqlite/libsql.cjs.map +1 -1
- package/dist/backend/sqlite/libsql.d.cts +3 -2
- package/dist/backend/sqlite/libsql.d.ts +3 -2
- package/dist/backend/sqlite/libsql.js +13 -13
- package/dist/backend/sqlite/libsql.js.map +1 -1
- package/dist/backend/sqlite/local-store.cjs +34 -34
- package/dist/backend/sqlite/local-store.cjs.map +1 -1
- package/dist/backend/sqlite/local-store.d.cts +8 -7
- package/dist/backend/sqlite/local-store.d.ts +8 -7
- package/dist/backend/sqlite/local-store.js +30 -30
- package/dist/backend/sqlite/local-store.js.map +1 -1
- package/dist/backend/sqlite/local.cjs +16 -16
- package/dist/backend/sqlite/local.d.cts +3 -2
- package/dist/backend/sqlite/local.d.ts +3 -2
- package/dist/backend/sqlite/local.js +14 -14
- package/dist/{chunk-3RPQDGUE.cjs → chunk-2BIG7U6E.cjs} +5 -5
- package/dist/{chunk-3RPQDGUE.cjs.map → chunk-2BIG7U6E.cjs.map} +1 -1
- package/dist/{chunk-2OOY4OYT.js → chunk-2L54C2C2.js} +4 -4
- package/dist/{chunk-2OOY4OYT.js.map → chunk-2L54C2C2.js.map} +1 -1
- package/dist/{chunk-V2GZBPY2.cjs → chunk-2VLBGQBY.cjs} +310 -61
- package/dist/chunk-2VLBGQBY.cjs.map +1 -0
- package/dist/{chunk-RXOAXO3R.js → chunk-2WDD2NO3.js} +3 -3
- package/dist/{chunk-RXOAXO3R.js.map → chunk-2WDD2NO3.js.map} +1 -1
- package/dist/{chunk-2HKIID5K.js → chunk-2Y4IFKW7.js} +5 -5
- package/dist/{chunk-2HKIID5K.js.map → chunk-2Y4IFKW7.js.map} +1 -1
- package/dist/{chunk-ECU53PMN.cjs → chunk-3PRKZW6D.cjs} +5 -5
- package/dist/chunk-3PRKZW6D.cjs.map +1 -0
- package/dist/{chunk-2G6ZEGYO.js → chunk-46GDII45.js} +4 -4
- package/dist/{chunk-2G6ZEGYO.js.map → chunk-46GDII45.js.map} +1 -1
- package/dist/{chunk-OYJSYDIH.js → chunk-4MB3AQAQ.js} +13 -3
- package/dist/chunk-4MB3AQAQ.js.map +1 -0
- package/dist/chunk-4SZ6XPTG.cjs +12 -0
- package/dist/{chunk-VGMNGWBR.cjs.map → chunk-4SZ6XPTG.cjs.map} +1 -1
- package/dist/{chunk-FY4VY5EV.cjs → chunk-5MUSU4ZP.cjs} +20 -20
- package/dist/chunk-5MUSU4ZP.cjs.map +1 -0
- package/dist/{chunk-ZIRC2U6G.js → chunk-63KCKSSH.js} +78 -16
- package/dist/chunk-63KCKSSH.js.map +1 -0
- package/dist/{chunk-7Y6BV3TK.cjs → chunk-66UVLHQA.cjs} +100 -100
- package/dist/{chunk-7Y6BV3TK.cjs.map → chunk-66UVLHQA.cjs.map} +1 -1
- package/dist/{chunk-M4GYQF2H.js → chunk-6DCB664D.js} +7 -4
- package/dist/chunk-6DCB664D.js.map +1 -0
- package/dist/{chunk-OMQ2NBOR.cjs → chunk-6JZUSDY2.cjs} +27 -27
- package/dist/{chunk-OMQ2NBOR.cjs.map → chunk-6JZUSDY2.cjs.map} +1 -1
- package/dist/{chunk-Z3WIL6S3.js → chunk-7G32LIQM.js} +5 -5
- package/dist/{chunk-Z3WIL6S3.js.map → chunk-7G32LIQM.js.map} +1 -1
- package/dist/{chunk-KDRF3NR2.cjs → chunk-7V2FGGI2.cjs} +250 -198
- package/dist/chunk-7V2FGGI2.cjs.map +1 -0
- package/dist/{chunk-I73ATSAH.cjs → chunk-A2I2XO52.cjs} +4 -4
- package/dist/{chunk-I73ATSAH.cjs.map → chunk-A2I2XO52.cjs.map} +1 -1
- package/dist/{chunk-O2GZM7UK.cjs → chunk-A4PBRX4C.cjs} +7 -7
- package/dist/{chunk-O2GZM7UK.cjs.map → chunk-A4PBRX4C.cjs.map} +1 -1
- package/dist/{chunk-64LERBFM.cjs → chunk-ALFUGRYB.cjs} +75 -65
- package/dist/chunk-ALFUGRYB.cjs.map +1 -0
- package/dist/{chunk-NXIZL7ZZ.js → chunk-ATLN63JA.js} +6 -6
- package/dist/chunk-ATLN63JA.js.map +1 -0
- package/dist/{chunk-CUPJL6TS.js → chunk-B75XRV3O.js} +3 -3
- package/dist/{chunk-CUPJL6TS.js.map → chunk-B75XRV3O.js.map} +1 -1
- package/dist/{chunk-JNXZQBN3.js → chunk-BCP7LLOY.js} +687 -456
- package/dist/chunk-BCP7LLOY.js.map +1 -0
- package/dist/{chunk-RAWG2FEU.js → chunk-BEFM74L2.js} +264 -18
- package/dist/chunk-BEFM74L2.js.map +1 -0
- package/dist/{chunk-LQLVJWUH.js → chunk-BNUFUFAU.js} +7 -7
- package/dist/chunk-BNUFUFAU.js.map +1 -0
- package/dist/{chunk-KTBTSHU6.cjs → chunk-C4F7VJ5D.cjs} +13 -3
- package/dist/chunk-C4F7VJ5D.cjs.map +1 -0
- package/dist/{chunk-CVK4T34X.cjs → chunk-CPEL3YIR.cjs} +22 -22
- package/dist/{chunk-CVK4T34X.cjs.map → chunk-CPEL3YIR.cjs.map} +1 -1
- package/dist/{chunk-O3USVVWS.js → chunk-DK2S42XB.js} +3 -3
- package/dist/{chunk-O3USVVWS.js.map → chunk-DK2S42XB.js.map} +1 -1
- package/dist/{chunk-DMZEVJGL.cjs → chunk-EE7N5XXQ.cjs} +13 -13
- package/dist/{chunk-DMZEVJGL.cjs.map → chunk-EE7N5XXQ.cjs.map} +1 -1
- package/dist/{chunk-ZGOUVMVS.js → chunk-EFELJVLA.js} +5 -5
- package/dist/{chunk-ZGOUVMVS.js.map → chunk-EFELJVLA.js.map} +1 -1
- package/dist/chunk-EPTSMFH7.cjs +12 -0
- package/dist/{chunk-U3YRCZ5L.cjs.map → chunk-EPTSMFH7.cjs.map} +1 -1
- package/dist/{chunk-FSCJOTHF.cjs → chunk-EQ7JKLZO.cjs} +10 -10
- package/dist/{chunk-FSCJOTHF.cjs.map → chunk-EQ7JKLZO.cjs.map} +1 -1
- package/dist/{chunk-5Q3P6OIC.cjs → chunk-FGO5JFVJ.cjs} +12 -12
- package/dist/chunk-FGO5JFVJ.cjs.map +1 -0
- package/dist/{chunk-VC26BUNP.js → chunk-FMGEZBAQ.js} +5 -5
- package/dist/{chunk-VC26BUNP.js.map → chunk-FMGEZBAQ.js.map} +1 -1
- package/dist/{chunk-UZLEQFTV.js → chunk-FMMIX6N4.js} +4 -4
- package/dist/chunk-FMMIX6N4.js.map +1 -0
- package/dist/{chunk-5C75HQYQ.js → chunk-FRHHDHKH.js} +5 -5
- package/dist/{chunk-5C75HQYQ.js.map → chunk-FRHHDHKH.js.map} +1 -1
- package/dist/{chunk-CTWZPYJW.js → chunk-FSXTPBRN.js} +63 -12
- package/dist/chunk-FSXTPBRN.js.map +1 -0
- package/dist/{chunk-TRC646QQ.cjs → chunk-GFRGG2US.cjs} +7 -7
- package/dist/{chunk-TRC646QQ.cjs.map → chunk-GFRGG2US.cjs.map} +1 -1
- package/dist/{chunk-UJRWOV5B.js → chunk-GWEDD3DH.js} +5 -5
- package/dist/{chunk-UJRWOV5B.js.map → chunk-GWEDD3DH.js.map} +1 -1
- package/dist/{chunk-AQR6BHB3.cjs → chunk-HJH3RMXG.cjs} +10 -10
- package/dist/{chunk-AQR6BHB3.cjs.map → chunk-HJH3RMXG.cjs.map} +1 -1
- package/dist/{chunk-F7TDKSVB.cjs → chunk-HOHAJ2NR.cjs} +4 -4
- package/dist/{chunk-F7TDKSVB.cjs.map → chunk-HOHAJ2NR.cjs.map} +1 -1
- package/dist/{chunk-YPVQYM3L.js → chunk-HOIFFY4M.js} +100 -20
- package/dist/chunk-HOIFFY4M.js.map +1 -0
- package/dist/{chunk-LDCWO5B6.js → chunk-IIMQJYAM.js} +3 -3
- package/dist/{chunk-LDCWO5B6.js.map → chunk-IIMQJYAM.js.map} +1 -1
- package/dist/{chunk-OM6RIOA5.cjs → chunk-IIT5K7SK.cjs} +13 -13
- package/dist/{chunk-OM6RIOA5.cjs.map → chunk-IIT5K7SK.cjs.map} +1 -1
- package/dist/{chunk-EQOQOT55.js → chunk-IJTLXNGJ.js} +5 -5
- package/dist/{chunk-EQOQOT55.js.map → chunk-IJTLXNGJ.js.map} +1 -1
- package/dist/{chunk-4XRP2N6B.js → chunk-JRP3VGHS.js} +3 -3
- package/dist/{chunk-4XRP2N6B.js.map → chunk-JRP3VGHS.js.map} +1 -1
- package/dist/{chunk-42XYPKZU.js → chunk-K3BUWSFR.js} +41 -3
- package/dist/chunk-K3BUWSFR.js.map +1 -0
- package/dist/{chunk-GT7NEXSU.js → chunk-KCO5EFJU.js} +3 -3
- package/dist/{chunk-GT7NEXSU.js.map → chunk-KCO5EFJU.js.map} +1 -1
- package/dist/{chunk-ARN3ZODS.cjs → chunk-KKYELPZ2.cjs} +6 -6
- package/dist/{chunk-ARN3ZODS.cjs.map → chunk-KKYELPZ2.cjs.map} +1 -1
- package/dist/{chunk-33PAKPED.cjs → chunk-MCHP7RHZ.cjs} +41 -41
- package/dist/{chunk-33PAKPED.cjs.map → chunk-MCHP7RHZ.cjs.map} +1 -1
- package/dist/{chunk-CDYRPI5U.js → chunk-MIJKEVV7.js} +4 -4
- package/dist/{chunk-CDYRPI5U.js.map → chunk-MIJKEVV7.js.map} +1 -1
- package/dist/{chunk-BLBG2VZ5.cjs → chunk-NCX65HBY.cjs} +137 -108
- package/dist/chunk-NCX65HBY.cjs.map +1 -0
- package/dist/{chunk-6TJ6PKPS.cjs → chunk-NN3QSOVS.cjs} +27 -27
- package/dist/{chunk-6TJ6PKPS.cjs.map → chunk-NN3QSOVS.cjs.map} +1 -1
- package/dist/{chunk-F2KVJ6FF.cjs → chunk-OSZPLZIV.cjs} +179 -117
- package/dist/chunk-OSZPLZIV.cjs.map +1 -0
- package/dist/{chunk-UTTW2Q3M.cjs → chunk-OVUUTCPJ.cjs} +171 -133
- package/dist/chunk-OVUUTCPJ.cjs.map +1 -0
- package/dist/{chunk-FMPZPOUD.js → chunk-PAW2XUZN.js} +3 -3
- package/dist/{chunk-FMPZPOUD.js.map → chunk-PAW2XUZN.js.map} +1 -1
- package/dist/{chunk-5ZPRE4CV.cjs → chunk-PDGEXGS6.cjs} +204 -124
- package/dist/chunk-PDGEXGS6.cjs.map +1 -0
- package/dist/{chunk-CVNGKTHO.js → chunk-PHXITZE4.js} +4 -4
- package/dist/{chunk-CVNGKTHO.js.map → chunk-PHXITZE4.js.map} +1 -1
- package/dist/{chunk-ZPCKPLMX.cjs → chunk-QB6VMOJ2.cjs} +8 -8
- package/dist/{chunk-ZPCKPLMX.cjs.map → chunk-QB6VMOJ2.cjs.map} +1 -1
- package/dist/{chunk-5AERZSHC.cjs → chunk-QGKILWGZ.cjs} +4 -4
- package/dist/{chunk-5AERZSHC.cjs.map → chunk-QGKILWGZ.cjs.map} +1 -1
- package/dist/{chunk-ZOHCFYXE.js → chunk-QT6V3YRH.js} +3 -3
- package/dist/{chunk-ZOHCFYXE.js.map → chunk-QT6V3YRH.js.map} +1 -1
- package/dist/{chunk-XDMPDUKL.cjs → chunk-QYWINYEA.cjs} +9 -9
- package/dist/{chunk-XDMPDUKL.cjs.map → chunk-QYWINYEA.cjs.map} +1 -1
- package/dist/{chunk-3V6D5DEC.js → chunk-S4KQ5LV4.js} +3 -3
- package/dist/{chunk-3V6D5DEC.js.map → chunk-S4KQ5LV4.js.map} +1 -1
- package/dist/{chunk-L5AUCL5P.js → chunk-SBPC5IP3.js} +40 -12
- package/dist/chunk-SBPC5IP3.js.map +1 -0
- package/dist/{chunk-HHBKGPEI.js → chunk-SQRD2CYF.js} +264 -21
- package/dist/chunk-SQRD2CYF.js.map +1 -0
- package/dist/{chunk-O7XVCLXW.cjs → chunk-ST3LPB2V.cjs} +324 -77
- package/dist/chunk-ST3LPB2V.cjs.map +1 -0
- package/dist/{chunk-FFQGI67R.cjs → chunk-STQ3BSED.cjs} +44 -44
- package/dist/{chunk-FFQGI67R.cjs.map → chunk-STQ3BSED.cjs.map} +1 -1
- package/dist/{chunk-JOYPNY33.js → chunk-TCRIQMBU.js} +9 -9
- package/dist/{chunk-JOYPNY33.js.map → chunk-TCRIQMBU.js.map} +1 -1
- package/dist/{chunk-ZP2KPDNN.js → chunk-TFMVL4QH.js} +3 -3
- package/dist/{chunk-ZP2KPDNN.js.map → chunk-TFMVL4QH.js.map} +1 -1
- package/dist/{chunk-4WYFRACU.js → chunk-TVLKA4AY.js} +3 -3
- package/dist/{chunk-4WYFRACU.js.map → chunk-TVLKA4AY.js.map} +1 -1
- package/dist/{chunk-X2XOQZT3.cjs → chunk-U5W4LKZV.cjs} +13 -9
- package/dist/chunk-U5W4LKZV.cjs.map +1 -0
- package/dist/{chunk-L2BYRYHC.js → chunk-VITTKBWF.js} +43 -33
- package/dist/chunk-VITTKBWF.js.map +1 -0
- package/dist/{chunk-AO2WPYFZ.cjs → chunk-WBUFJ7BS.cjs} +4 -4
- package/dist/{chunk-AO2WPYFZ.cjs.map → chunk-WBUFJ7BS.cjs.map} +1 -1
- package/dist/{chunk-CI5NPLXX.js → chunk-XMYJY7NI.js} +3 -3
- package/dist/{chunk-CI5NPLXX.js.map → chunk-XMYJY7NI.js.map} +1 -1
- package/dist/{chunk-NDQLPKBX.cjs → chunk-XR4YZFKW.cjs} +1740 -1509
- package/dist/chunk-XR4YZFKW.cjs.map +1 -0
- package/dist/{chunk-5GV4JQNA.cjs → chunk-YNULOIR5.cjs} +43 -43
- package/dist/{chunk-5GV4JQNA.cjs.map → chunk-YNULOIR5.cjs.map} +1 -1
- package/dist/{chunk-ZBV4LQD2.cjs → chunk-ZTAJL4DT.cjs} +4 -4
- package/dist/{chunk-ZBV4LQD2.cjs.map → chunk-ZTAJL4DT.cjs.map} +1 -1
- package/dist/core/index.cjs +28 -28
- package/dist/core/index.d.cts +5 -5
- package/dist/core/index.d.ts +5 -5
- package/dist/core/index.js +8 -8
- package/dist/{ddl-Bc4Dl8fu.d.ts → ddl-D5369kOY.d.ts} +3 -3
- package/dist/{ddl-3unqC-kg.d.cts → ddl-eWg7hx6R.d.cts} +3 -3
- package/dist/{define-graph-Byslw2OO.d.cts → define-graph-DVF-oN1i.d.cts} +1 -1
- package/dist/{define-graph-DBFnc7u_.d.ts → define-graph-SvYXOl78.d.ts} +1 -1
- package/dist/graph-extension/index.cjs +20 -20
- package/dist/graph-extension/index.d.cts +4 -4
- package/dist/graph-extension/index.d.ts +4 -4
- package/dist/graph-extension/index.js +5 -5
- package/dist/graph-merge/index.cjs +104 -104
- package/dist/graph-merge/index.d.cts +9 -8
- package/dist/graph-merge/index.d.ts +9 -8
- package/dist/graph-merge/index.js +24 -24
- package/dist/{index-DHXw7QAl.d.cts → index-By89Sezh.d.ts} +37 -7
- package/dist/{index-DQzVJBHa.d.ts → index-DcQ3Sxs-.d.cts} +37 -7
- package/dist/index.cjs +210 -202
- package/dist/index.d.cts +13 -13
- package/dist/index.d.ts +13 -13
- package/dist/index.js +34 -34
- package/dist/indexes/index.cjs +13 -13
- package/dist/indexes/index.d.cts +4 -4
- package/dist/indexes/index.d.ts +4 -4
- package/dist/indexes/index.js +6 -6
- package/dist/interchange/index.cjs +49 -41
- package/dist/interchange/index.cjs.map +1 -1
- package/dist/interchange/index.d.cts +11 -11
- package/dist/interchange/index.d.ts +11 -11
- package/dist/interchange/index.js +23 -15
- package/dist/interchange/index.js.map +1 -1
- package/dist/{manager-Dl0-er1G.d.ts → manager-B0KjKE93.d.ts} +44 -6
- package/dist/{manager-U9_zopqr.d.cts → manager-Cn0NFIhN.d.cts} +44 -6
- package/dist/{materialize-indexes-BM3u0aXE.d.ts → materialize-indexes-BD4V3svD.d.ts} +1 -1
- package/dist/{materialize-indexes-DzMCetZe.d.cts → materialize-indexes-DVRhd5h4.d.cts} +1 -1
- package/dist/{postgres-DpJqtbSX.d.cts → postgres-DaEWvN4x.d.cts} +1 -1
- package/dist/{postgres-C5-WMKFA.d.ts → postgres-u0a0HN2D.d.ts} +1 -1
- package/dist/profiler/index.d.cts +10 -9
- package/dist/profiler/index.d.ts +10 -9
- package/dist/provenance/index.cjs +38 -38
- package/dist/provenance/index.cjs.map +1 -1
- package/dist/provenance/index.d.cts +7 -7
- package/dist/provenance/index.d.ts +7 -7
- package/dist/provenance/index.js +8 -8
- package/dist/provenance/index.js.map +1 -1
- package/dist/schema/index.cjs +41 -41
- package/dist/schema/index.d.cts +7 -7
- package/dist/schema/index.d.ts +7 -7
- package/dist/schema/index.js +14 -14
- package/dist/{searchable-B4mUXZT6.d.cts → searchable-BT7j9_IK.d.cts} +2 -2
- package/dist/{searchable-C7jmPNLT.d.ts → searchable-CnYEancP.d.ts} +2 -2
- package/dist/{sqlite-Ch5tSYQY.d.ts → sqlite-BrMoSsI7.d.cts} +1 -1
- package/dist/{sqlite-Da7jiYu9.d.cts → sqlite-CHhZUyO5.d.ts} +1 -1
- package/dist/{store-view-DdwBNjZQ.d.ts → store-view-Bvdku0Ht.d.ts} +181 -34
- package/dist/{store-view-D1F6KqsE.d.cts → store-view-w-md0nQ4.d.cts} +181 -34
- package/dist/{temporal-BtrTYTiB.d.ts → temporal--x9T8K4S.d.ts} +1 -1
- package/dist/{temporal-CMpigMCW.d.cts → temporal-BCORwUau.d.cts} +1 -1
- package/dist/{types-G4sVM-76.d.cts → types-6-WJmSD4.d.cts} +1 -1
- package/dist/{types-D2rU5Taq.d.ts → types-COODtTJU.d.ts} +1 -1
- package/dist/{types-Dh-EgT-w.d.cts → types-Cjvkj0jA.d.cts} +351 -12
- package/dist/{types-Dh-EgT-w.d.ts → types-Cjvkj0jA.d.ts} +351 -12
- package/dist/{where-B8Y21kig.d.ts → where-5xVawAwL.d.ts} +1 -1
- package/dist/{where-DbZ9XDOI.d.cts → where-CUQmCR6d.d.cts} +1 -1
- package/package.json +1 -1
- package/dist/chunk-42XYPKZU.js.map +0 -1
- package/dist/chunk-5Q3P6OIC.cjs.map +0 -1
- package/dist/chunk-5ZPRE4CV.cjs.map +0 -1
- package/dist/chunk-64LERBFM.cjs.map +0 -1
- package/dist/chunk-BLBG2VZ5.cjs.map +0 -1
- package/dist/chunk-CTWZPYJW.js.map +0 -1
- package/dist/chunk-ECU53PMN.cjs.map +0 -1
- package/dist/chunk-F2KVJ6FF.cjs.map +0 -1
- package/dist/chunk-FY4VY5EV.cjs.map +0 -1
- package/dist/chunk-HHBKGPEI.js.map +0 -1
- package/dist/chunk-JNXZQBN3.js.map +0 -1
- package/dist/chunk-KDRF3NR2.cjs.map +0 -1
- package/dist/chunk-KTBTSHU6.cjs.map +0 -1
- package/dist/chunk-L2BYRYHC.js.map +0 -1
- package/dist/chunk-L5AUCL5P.js.map +0 -1
- package/dist/chunk-LQLVJWUH.js.map +0 -1
- package/dist/chunk-M4GYQF2H.js.map +0 -1
- package/dist/chunk-NDQLPKBX.cjs.map +0 -1
- package/dist/chunk-NXIZL7ZZ.js.map +0 -1
- package/dist/chunk-O7XVCLXW.cjs.map +0 -1
- package/dist/chunk-OYJSYDIH.js.map +0 -1
- package/dist/chunk-RAWG2FEU.js.map +0 -1
- package/dist/chunk-U3YRCZ5L.cjs +0 -12
- package/dist/chunk-UTTW2Q3M.cjs.map +0 -1
- package/dist/chunk-UZLEQFTV.js.map +0 -1
- package/dist/chunk-V2GZBPY2.cjs.map +0 -1
- package/dist/chunk-VGMNGWBR.cjs +0 -12
- package/dist/chunk-X2XOQZT3.cjs.map +0 -1
- package/dist/chunk-YPVQYM3L.js.map +0 -1
- package/dist/chunk-ZIRC2U6G.js.map +0 -1
|
@@ -1,22 +1,42 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
3
|
+
var chunkHJH3RMXG_cjs = require('./chunk-HJH3RMXG.cjs');
|
|
4
|
+
var chunk6JZUSDY2_cjs = require('./chunk-6JZUSDY2.cjs');
|
|
5
|
+
var chunkNN3QSOVS_cjs = require('./chunk-NN3QSOVS.cjs');
|
|
6
6
|
var chunkZDH3DX3C_cjs = require('./chunk-ZDH3DX3C.cjs');
|
|
7
|
-
var
|
|
7
|
+
var chunk3PRKZW6D_cjs = require('./chunk-3PRKZW6D.cjs');
|
|
8
8
|
var chunkACSVZPK7_cjs = require('./chunk-ACSVZPK7.cjs');
|
|
9
|
-
var
|
|
9
|
+
var chunkWBUFJ7BS_cjs = require('./chunk-WBUFJ7BS.cjs');
|
|
10
10
|
var chunkZY4GXIVN_cjs = require('./chunk-ZY4GXIVN.cjs');
|
|
11
|
-
var
|
|
11
|
+
var chunkU5W4LKZV_cjs = require('./chunk-U5W4LKZV.cjs');
|
|
12
12
|
var chunk764JHTLT_cjs = require('./chunk-764JHTLT.cjs');
|
|
13
|
-
var
|
|
13
|
+
var chunkC4F7VJ5D_cjs = require('./chunk-C4F7VJ5D.cjs');
|
|
14
14
|
var drizzleOrm = require('drizzle-orm');
|
|
15
15
|
|
|
16
|
+
// src/backend/edge-endpoint-sets.ts
|
|
17
|
+
var FIND_EDGES_ENDPOINT_FIXED_PARAM_COUNT = 6;
|
|
18
|
+
function resolveEdgeEndpointIds(params) {
|
|
19
|
+
const { limitPerEndpoint } = params;
|
|
20
|
+
if (limitPerEndpoint !== void 0 && (!Number.isInteger(limitPerEndpoint) || limitPerEndpoint <= 0)) {
|
|
21
|
+
throw new chunkC4F7VJ5D_cjs.ConfigurationError(
|
|
22
|
+
`findEdgesByEndpointSet \`limitPerEndpoint\` must be a positive integer, received ${String(limitPerEndpoint)}.`,
|
|
23
|
+
{
|
|
24
|
+
code: "EDGE_ENDPOINT_SET_INVALID",
|
|
25
|
+
graphId: params.graphId,
|
|
26
|
+
kind: params.kind
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
suggestion: "Pass a positive integer to cap each endpoint's rows, or omit it for an unbounded read."
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
return [...new Set(params.endpointIds)];
|
|
34
|
+
}
|
|
35
|
+
|
|
16
36
|
// src/backend/live-node-candidates.ts
|
|
17
37
|
function buildLiveNodeCandidates(nodesTableName, graphId, nodeKind, now) {
|
|
18
|
-
const nodes =
|
|
19
|
-
return
|
|
38
|
+
const nodes = chunkU5W4LKZV_cjs.sql.identifier(nodesTableName);
|
|
39
|
+
return chunkU5W4LKZV_cjs.sql`
|
|
20
40
|
SELECT "id" AS node_id
|
|
21
41
|
FROM ${nodes}
|
|
22
42
|
WHERE "graph_id" = ${graphId}
|
|
@@ -57,10 +77,10 @@ function vectorSlotFromDropIndexParams(params) {
|
|
|
57
77
|
};
|
|
58
78
|
}
|
|
59
79
|
function mapVectorWriteError(error, params) {
|
|
60
|
-
const mismatch =
|
|
80
|
+
const mismatch = chunkWBUFJ7BS_cjs.parseDimensionMismatch(error);
|
|
61
81
|
if (mismatch === void 0) return error;
|
|
62
82
|
const attempted = mismatch.actual ?? "a different number of";
|
|
63
|
-
return new
|
|
83
|
+
return new chunkC4F7VJ5D_cjs.EmbeddingDimensionChangedError(
|
|
64
84
|
`Embedding "${params.nodeKind}.${params.fieldPath}" was written with ${attempted} dimensions, but its per-field storage expects ${mismatch.expected}. The field's embedding dimension changed; existing vectors must be recreated and re-embedded.`,
|
|
65
85
|
{
|
|
66
86
|
kind: params.nodeKind,
|
|
@@ -76,7 +96,7 @@ var SQLITE_CONTRIBUTION_MAT_TIMESTAMPS = {
|
|
|
76
96
|
encode: (value) => value
|
|
77
97
|
};
|
|
78
98
|
var POSTGRES_CONTRIBUTION_MAT_TIMESTAMPS = {
|
|
79
|
-
decode:
|
|
99
|
+
decode: chunkHJH3RMXG_cjs.formatPostgresTimestamp,
|
|
80
100
|
encode: (value) => new Date(value)
|
|
81
101
|
};
|
|
82
102
|
function mapContributionMaterializationRow(row, decode) {
|
|
@@ -135,6 +155,29 @@ function evaluateContributionState(row, signature) {
|
|
|
135
155
|
if (row.materializedAt === void 0) return "missing";
|
|
136
156
|
return "initialized";
|
|
137
157
|
}
|
|
158
|
+
function diagnoseContribution(row, signature, tableExists) {
|
|
159
|
+
if (!tableExists) {
|
|
160
|
+
if (row === void 0) return void 0;
|
|
161
|
+
if (row.materializedAt !== void 0) return "orphaned-marker";
|
|
162
|
+
return row.lastError === void 0 ? void 0 : "failed-materialization";
|
|
163
|
+
}
|
|
164
|
+
const state = evaluateContributionState(row, signature);
|
|
165
|
+
switch (state) {
|
|
166
|
+
case "initialized": {
|
|
167
|
+
return void 0;
|
|
168
|
+
}
|
|
169
|
+
case "stale": {
|
|
170
|
+
return "stale";
|
|
171
|
+
}
|
|
172
|
+
case "missing":
|
|
173
|
+
case "failed": {
|
|
174
|
+
return "missing-marker";
|
|
175
|
+
}
|
|
176
|
+
default: {
|
|
177
|
+
return state;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
138
181
|
function identityOf(graphId, contribution) {
|
|
139
182
|
return {
|
|
140
183
|
graphId,
|
|
@@ -190,7 +233,7 @@ function gateFulltextMethods(source, assert) {
|
|
|
190
233
|
return gated;
|
|
191
234
|
}
|
|
192
235
|
function gateFulltext(tx, assert) {
|
|
193
|
-
return
|
|
236
|
+
return chunk3PRKZW6D_cjs.createBackendOverlay(
|
|
194
237
|
tx,
|
|
195
238
|
gateFulltextMethods(tx, assert)
|
|
196
239
|
);
|
|
@@ -207,6 +250,7 @@ function contributionKey(graphId, contribution) {
|
|
|
207
250
|
function createContributionMaterializer(deps) {
|
|
208
251
|
const { dialect, fulltextStrategy, fulltextTableName } = deps;
|
|
209
252
|
const initializedSignatures = /* @__PURE__ */ new Map();
|
|
253
|
+
const uncacheableKeys = /* @__PURE__ */ new Set();
|
|
210
254
|
const computedSignatures = /* @__PURE__ */ new Map();
|
|
211
255
|
async function resolveContributionSignature(key, contribution) {
|
|
212
256
|
const cached = computedSignatures.get(key);
|
|
@@ -237,7 +281,12 @@ function createContributionMaterializer(deps) {
|
|
|
237
281
|
}
|
|
238
282
|
}
|
|
239
283
|
function runtimeContributions() {
|
|
240
|
-
return
|
|
284
|
+
return chunk6JZUSDY2_cjs.runtimeStrategyContributions(fulltextStrategy, fulltextTableName);
|
|
285
|
+
}
|
|
286
|
+
function cacheInitializedSignature(key, signature) {
|
|
287
|
+
if (!uncacheableKeys.has(key)) {
|
|
288
|
+
initializedSignatures.set(key, signature);
|
|
289
|
+
}
|
|
241
290
|
}
|
|
242
291
|
async function materializeOne(graphId, contribution, signature, existing, options) {
|
|
243
292
|
const force = options?.force === true;
|
|
@@ -259,13 +308,13 @@ function createContributionMaterializer(deps) {
|
|
|
259
308
|
await deps.recordMarker({
|
|
260
309
|
...identity,
|
|
261
310
|
signature,
|
|
262
|
-
attemptedAt:
|
|
311
|
+
attemptedAt: chunkHJH3RMXG_cjs.nowIso(),
|
|
263
312
|
materializedAt: void 0,
|
|
264
313
|
error: error.message
|
|
265
314
|
});
|
|
266
315
|
throw error;
|
|
267
316
|
}
|
|
268
|
-
const attemptedAt =
|
|
317
|
+
const attemptedAt = chunkHJH3RMXG_cjs.nowIso();
|
|
269
318
|
try {
|
|
270
319
|
for (const statement of contribution.createDdl) {
|
|
271
320
|
await deps.execDdl(statement);
|
|
@@ -301,7 +350,7 @@ function createContributionMaterializer(deps) {
|
|
|
301
350
|
rows: indexMarkerRows(graphId, await deps.getMarkers(graphId))
|
|
302
351
|
};
|
|
303
352
|
} catch (error) {
|
|
304
|
-
if (!
|
|
353
|
+
if (!chunkWBUFJ7BS_cjs.isMissingTableError(error)) throw error;
|
|
305
354
|
return { kind: "missing-table", error };
|
|
306
355
|
}
|
|
307
356
|
}
|
|
@@ -318,7 +367,7 @@ function createContributionMaterializer(deps) {
|
|
|
318
367
|
})
|
|
319
368
|
);
|
|
320
369
|
const pending = force ? entries : entries.filter(
|
|
321
|
-
(entry) => initializedSignatures.get(entry.key) !== entry.signature
|
|
370
|
+
(entry) => uncacheableKeys.has(entry.key) || initializedSignatures.get(entry.key) !== entry.signature
|
|
322
371
|
);
|
|
323
372
|
if (pending.length === 0) return;
|
|
324
373
|
const initialRead = force ? void 0 : await readMarkerRows(graphId);
|
|
@@ -329,7 +378,7 @@ function createContributionMaterializer(deps) {
|
|
|
329
378
|
) === "initialized"
|
|
330
379
|
)) {
|
|
331
380
|
for (const entry of pending) {
|
|
332
|
-
|
|
381
|
+
cacheInitializedSignature(entry.key, entry.signature);
|
|
333
382
|
}
|
|
334
383
|
return;
|
|
335
384
|
}
|
|
@@ -350,7 +399,7 @@ function createContributionMaterializer(deps) {
|
|
|
350
399
|
}
|
|
351
400
|
);
|
|
352
401
|
if (outcome === "materialized") {
|
|
353
|
-
|
|
402
|
+
cacheInitializedSignature(entry.key, entry.signature);
|
|
354
403
|
}
|
|
355
404
|
}
|
|
356
405
|
}
|
|
@@ -366,14 +415,14 @@ function createContributionMaterializer(deps) {
|
|
|
366
415
|
})
|
|
367
416
|
);
|
|
368
417
|
const pending = entries.filter(
|
|
369
|
-
(entry) => initializedSignatures.get(entry.key) !== entry.signature
|
|
418
|
+
(entry) => uncacheableKeys.has(entry.key) || initializedSignatures.get(entry.key) !== entry.signature
|
|
370
419
|
);
|
|
371
420
|
if (pending.length === 0) return;
|
|
372
421
|
const read = await readMarkerRows(graphId);
|
|
373
422
|
if (read.kind === "missing-table") {
|
|
374
423
|
const first = pending[0];
|
|
375
424
|
if (first === void 0) return;
|
|
376
|
-
throw new
|
|
425
|
+
throw new chunkC4F7VJ5D_cjs.StoreNotInitializedError(graphId, "missing", {
|
|
377
426
|
cause: read.error,
|
|
378
427
|
details: { logicalName: first.contribution.logicalName }
|
|
379
428
|
});
|
|
@@ -382,11 +431,11 @@ function createContributionMaterializer(deps) {
|
|
|
382
431
|
const { contribution, key, signature } = entry;
|
|
383
432
|
const state = evaluateContributionState(read.rows.get(key), signature);
|
|
384
433
|
if (state !== "initialized") {
|
|
385
|
-
throw new
|
|
434
|
+
throw new chunkC4F7VJ5D_cjs.StoreNotInitializedError(graphId, state, {
|
|
386
435
|
details: { logicalName: contribution.logicalName }
|
|
387
436
|
});
|
|
388
437
|
}
|
|
389
|
-
|
|
438
|
+
cacheInitializedSignature(key, signature);
|
|
390
439
|
}
|
|
391
440
|
}
|
|
392
441
|
async function ensureRuntimeContributions(graphId) {
|
|
@@ -422,15 +471,85 @@ function createContributionMaterializer(deps) {
|
|
|
422
471
|
await assertContributions(graphId, contributions);
|
|
423
472
|
}
|
|
424
473
|
}
|
|
425
|
-
async function
|
|
474
|
+
async function verifyContributions(graphId, vectorSlots) {
|
|
475
|
+
const targetsByGraph = /* @__PURE__ */ new Map();
|
|
476
|
+
function addTarget(id, target) {
|
|
477
|
+
const existing = targetsByGraph.get(id);
|
|
478
|
+
if (existing === void 0) targetsByGraph.set(id, [target]);
|
|
479
|
+
else existing.push(target);
|
|
480
|
+
}
|
|
481
|
+
for (const contribution of runtimeContributions()) {
|
|
482
|
+
addTarget(graphId, { contribution });
|
|
483
|
+
}
|
|
484
|
+
const { vectorStrategy } = deps;
|
|
485
|
+
if (vectorStrategy !== void 0) {
|
|
486
|
+
for (const slot of vectorSlots) {
|
|
487
|
+
for (const contribution of vectorStrategy.ownedTables(slot)) {
|
|
488
|
+
addTarget(slot.graphId, {
|
|
489
|
+
contribution,
|
|
490
|
+
kind: slot.nodeKind,
|
|
491
|
+
fieldPath: slot.fieldPath
|
|
492
|
+
});
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
const probes = /* @__PURE__ */ new Map();
|
|
497
|
+
function tableExists(tableName) {
|
|
498
|
+
const pending = probes.get(tableName);
|
|
499
|
+
if (pending !== void 0) return pending;
|
|
500
|
+
const probe = deps.tableExists(tableName);
|
|
501
|
+
probes.set(tableName, probe);
|
|
502
|
+
return probe;
|
|
503
|
+
}
|
|
504
|
+
const diagnostics = [];
|
|
505
|
+
for (const [id, targets] of targetsByGraph) {
|
|
506
|
+
const read = await readMarkerRows(id);
|
|
507
|
+
const rows = read.kind === "rows" ? read.rows : /* @__PURE__ */ new Map();
|
|
508
|
+
for (const { contribution, kind, fieldPath } of targets) {
|
|
509
|
+
const key = contributionKey(id, contribution);
|
|
510
|
+
const row = rows.get(key);
|
|
511
|
+
const state = diagnoseContribution(
|
|
512
|
+
row,
|
|
513
|
+
await resolveContributionSignature(key, contribution),
|
|
514
|
+
await tableExists(contribution.tableName)
|
|
515
|
+
);
|
|
516
|
+
if (state === void 0) continue;
|
|
517
|
+
diagnostics.push({
|
|
518
|
+
owner: contribution.owner,
|
|
519
|
+
logicalName: contribution.logicalName,
|
|
520
|
+
physicalName: contribution.tableName,
|
|
521
|
+
...kind === void 0 ? {} : { kind },
|
|
522
|
+
...fieldPath === void 0 ? {} : { fieldPath },
|
|
523
|
+
state,
|
|
524
|
+
// The recorded reason, carried through verbatim. `state` folds
|
|
525
|
+
// several marker verdicts together because they share a repair;
|
|
526
|
+
// this is what keeps the fold from also discarding the one thing
|
|
527
|
+
// the catalog can never tell the operator.
|
|
528
|
+
...row?.lastError === void 0 ? {} : { lastError: row.lastError }
|
|
529
|
+
});
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
return diagnostics;
|
|
533
|
+
}
|
|
534
|
+
function evictVectorSlot(slot) {
|
|
426
535
|
if (deps.vectorStrategy === void 0) return;
|
|
427
536
|
for (const contribution of deps.vectorStrategy.ownedTables(slot)) {
|
|
428
|
-
await deps.deleteMarker(identityOf(slot.graphId, contribution));
|
|
429
537
|
const key = contributionKey(slot.graphId, contribution);
|
|
538
|
+
uncacheableKeys.add(key);
|
|
430
539
|
initializedSignatures.delete(key);
|
|
431
540
|
computedSignatures.delete(key);
|
|
432
541
|
}
|
|
433
542
|
}
|
|
543
|
+
async function dropVectorSlot(slot) {
|
|
544
|
+
if (deps.vectorStrategy === void 0) return;
|
|
545
|
+
try {
|
|
546
|
+
for (const contribution of deps.vectorStrategy.ownedTables(slot)) {
|
|
547
|
+
await deps.deleteMarker(identityOf(slot.graphId, contribution));
|
|
548
|
+
}
|
|
549
|
+
} finally {
|
|
550
|
+
evictVectorSlot(slot);
|
|
551
|
+
}
|
|
552
|
+
}
|
|
434
553
|
return {
|
|
435
554
|
ensureRuntimeContributions,
|
|
436
555
|
assertInitialized,
|
|
@@ -438,7 +557,9 @@ function createContributionMaterializer(deps) {
|
|
|
438
557
|
ensureVectorSlots,
|
|
439
558
|
assertVectorSlot,
|
|
440
559
|
assertVectorSlots,
|
|
441
|
-
dropVectorSlot
|
|
560
|
+
dropVectorSlot,
|
|
561
|
+
evictVectorSlot,
|
|
562
|
+
verifyContributions
|
|
442
563
|
};
|
|
443
564
|
}
|
|
444
565
|
var SQLITE_INDEX_MAT_TIMESTAMPS = {
|
|
@@ -446,7 +567,7 @@ var SQLITE_INDEX_MAT_TIMESTAMPS = {
|
|
|
446
567
|
encode: (value) => value
|
|
447
568
|
};
|
|
448
569
|
var POSTGRES_INDEX_MAT_TIMESTAMPS = {
|
|
449
|
-
decode:
|
|
570
|
+
decode: chunkHJH3RMXG_cjs.formatPostgresTimestamp,
|
|
450
571
|
encode: (value) => new Date(value)
|
|
451
572
|
};
|
|
452
573
|
function mapMaterializationRow(row, decode) {
|
|
@@ -504,7 +625,7 @@ var SQLITE_KIND_REMOVAL_TIMESTAMPS = {
|
|
|
504
625
|
encode: (value) => value
|
|
505
626
|
};
|
|
506
627
|
var POSTGRES_KIND_REMOVAL_TIMESTAMPS = {
|
|
507
|
-
decode:
|
|
628
|
+
decode: chunkHJH3RMXG_cjs.formatPostgresTimestamp,
|
|
508
629
|
encode: (value) => new Date(value)
|
|
509
630
|
};
|
|
510
631
|
function mapKindRemovalRow(row, decode) {
|
|
@@ -671,12 +792,12 @@ function present(value) {
|
|
|
671
792
|
function mapHybridSearchRow(row, toNodeRow) {
|
|
672
793
|
return {
|
|
673
794
|
node: toNodeRow(row),
|
|
674
|
-
fusedScore:
|
|
795
|
+
fusedScore: chunkHJH3RMXG_cjs.coerceNumericScore(row["fused_score"]),
|
|
675
796
|
...present(row["vector_rank"]) ? { vectorRank: Number(row["vector_rank"]) } : {},
|
|
676
|
-
...present(row["vector_score"]) ? { vectorScore:
|
|
797
|
+
...present(row["vector_score"]) ? { vectorScore: chunkHJH3RMXG_cjs.coerceNumericScore(row["vector_score"]) } : {},
|
|
677
798
|
...present(row["fulltext_rank"]) ? { fulltextRank: Number(row["fulltext_rank"]) } : {},
|
|
678
799
|
...present(row["fulltext_score"]) ? {
|
|
679
|
-
fulltextScore:
|
|
800
|
+
fulltextScore: chunkHJH3RMXG_cjs.coerceNumericScore(
|
|
680
801
|
row["fulltext_score"]
|
|
681
802
|
)
|
|
682
803
|
} : {},
|
|
@@ -790,6 +911,19 @@ function buildCountNodesByKind(tables, params) {
|
|
|
790
911
|
WHERE ${whereClause}
|
|
791
912
|
`;
|
|
792
913
|
}
|
|
914
|
+
function buildIdSetCondition(column, ids) {
|
|
915
|
+
return drizzleOrm.sql`${column} IN (${drizzleOrm.sql.join(
|
|
916
|
+
ids.map((id) => drizzleOrm.sql`${id}`),
|
|
917
|
+
drizzleOrm.sql`, `
|
|
918
|
+
)})`;
|
|
919
|
+
}
|
|
920
|
+
function buildEdgeOrdering(tables, orderBy) {
|
|
921
|
+
const { edges } = tables;
|
|
922
|
+
return orderBy === "id" ? { qualified: drizzleOrm.sql`${edges.id} ASC`, bare: drizzleOrm.sql.raw(`"id" ASC`) } : {
|
|
923
|
+
qualified: drizzleOrm.sql`${edges.createdAt} DESC, ${edges.id} DESC`,
|
|
924
|
+
bare: drizzleOrm.sql.raw(`"created_at" DESC, "id" DESC`)
|
|
925
|
+
};
|
|
926
|
+
}
|
|
793
927
|
function buildFindEdgesByKind(tables, params) {
|
|
794
928
|
const { edges } = tables;
|
|
795
929
|
const conditions = [
|
|
@@ -813,7 +947,10 @@ function buildFindEdgesByKind(tables, params) {
|
|
|
813
947
|
conditions.push(drizzleOrm.sql`${edges.id} > ${params.after}`);
|
|
814
948
|
}
|
|
815
949
|
const whereClause = drizzleOrm.sql.join(conditions, drizzleOrm.sql` AND `);
|
|
816
|
-
const
|
|
950
|
+
const { qualified: orderByClause } = buildEdgeOrdering(
|
|
951
|
+
tables,
|
|
952
|
+
params.orderBy
|
|
953
|
+
);
|
|
817
954
|
if (params.limit !== void 0 && params.offset !== void 0) {
|
|
818
955
|
return drizzleOrm.sql`
|
|
819
956
|
SELECT * FROM ${edges}
|
|
@@ -836,6 +973,42 @@ function buildFindEdgesByKind(tables, params) {
|
|
|
836
973
|
ORDER BY ${orderByClause}
|
|
837
974
|
`;
|
|
838
975
|
}
|
|
976
|
+
function buildFindEdgesByEndpointSet(tables, params, endpointIds) {
|
|
977
|
+
const { edges } = tables;
|
|
978
|
+
const fromSide = params.side === "from";
|
|
979
|
+
const kindColumn = fromSide ? edges.fromKind : edges.toKind;
|
|
980
|
+
const idColumn = fromSide ? edges.fromId : edges.toId;
|
|
981
|
+
const whereClause = drizzleOrm.sql.join(
|
|
982
|
+
[
|
|
983
|
+
drizzleOrm.sql`${edges.graphId} = ${params.graphId}`,
|
|
984
|
+
drizzleOrm.sql`${edges.kind} = ${params.kind}`,
|
|
985
|
+
...buildTemporalConditions(edges, params),
|
|
986
|
+
drizzleOrm.sql`${kindColumn} = ${params.endpointKind}`,
|
|
987
|
+
buildIdSetCondition(idColumn, endpointIds)
|
|
988
|
+
],
|
|
989
|
+
drizzleOrm.sql` AND `
|
|
990
|
+
);
|
|
991
|
+
const { qualified: orderByClause, bare: derivedOrderByClause } = buildEdgeOrdering(tables, void 0);
|
|
992
|
+
if (params.limitPerEndpoint === void 0) {
|
|
993
|
+
return drizzleOrm.sql`
|
|
994
|
+
SELECT * FROM ${edges}
|
|
995
|
+
WHERE ${whereClause}
|
|
996
|
+
ORDER BY ${orderByClause}
|
|
997
|
+
`;
|
|
998
|
+
}
|
|
999
|
+
const ranked = drizzleOrm.sql`
|
|
1000
|
+
SELECT *, ROW_NUMBER() OVER (
|
|
1001
|
+
PARTITION BY ${idColumn} ORDER BY ${orderByClause}
|
|
1002
|
+
) AS endpoint_rank
|
|
1003
|
+
FROM ${edges}
|
|
1004
|
+
WHERE ${whereClause}
|
|
1005
|
+
`;
|
|
1006
|
+
return drizzleOrm.sql`
|
|
1007
|
+
SELECT * FROM (${ranked}) AS ranked_edges
|
|
1008
|
+
WHERE endpoint_rank <= ${params.limitPerEndpoint}
|
|
1009
|
+
ORDER BY ${derivedOrderByClause}
|
|
1010
|
+
`;
|
|
1011
|
+
}
|
|
839
1012
|
function buildCountEdgesByKind(tables, params) {
|
|
840
1013
|
const { edges } = tables;
|
|
841
1014
|
const conditions = [
|
|
@@ -1082,11 +1255,11 @@ function buildFulltextSearch(tableName, params, strategy, dialect, candidates) {
|
|
|
1082
1255
|
assertValidSearchParams(params);
|
|
1083
1256
|
const mode = resolveMode(params.mode);
|
|
1084
1257
|
const table = quotedTableName(tableName);
|
|
1085
|
-
const matchCondition =
|
|
1258
|
+
const matchCondition = chunkNN3QSOVS_cjs.toDrizzleSql(
|
|
1086
1259
|
strategy.matchCondition(tableName, params.query, mode, params.language),
|
|
1087
1260
|
dialect
|
|
1088
1261
|
);
|
|
1089
|
-
const rankExpression =
|
|
1262
|
+
const rankExpression = chunkNN3QSOVS_cjs.toDrizzleSql(
|
|
1090
1263
|
strategy.rankExpression(tableName, params.query, mode, params.language),
|
|
1091
1264
|
dialect
|
|
1092
1265
|
);
|
|
@@ -1099,10 +1272,10 @@ function buildFulltextSearch(tableName, params, strategy, dialect, candidates) {
|
|
|
1099
1272
|
conditions.push(drizzleOrm.sql`${rankExpression} >= ${params.minScore}`);
|
|
1100
1273
|
}
|
|
1101
1274
|
if (candidates !== void 0) {
|
|
1102
|
-
const candidateSql =
|
|
1275
|
+
const candidateSql = chunkU5W4LKZV_cjs.isSqlFragment(candidates) ? chunkNN3QSOVS_cjs.toDrizzleSql(candidates, dialect) : candidates;
|
|
1103
1276
|
conditions.push(drizzleOrm.sql`"node_id" IN (${candidateSql})`);
|
|
1104
1277
|
}
|
|
1105
|
-
const snippetExpr = params.includeSnippets === true && strategy.supportsSnippets ?
|
|
1278
|
+
const snippetExpr = params.includeSnippets === true && strategy.supportsSnippets ? chunkNN3QSOVS_cjs.toDrizzleSql(
|
|
1106
1279
|
strategy.snippetExpression(
|
|
1107
1280
|
tableName,
|
|
1108
1281
|
params.query,
|
|
@@ -1573,6 +1746,7 @@ var COMMON_TABLE_OPERATION_BUILDERS = {
|
|
|
1573
1746
|
buildFindNodesByKind,
|
|
1574
1747
|
buildCountNodesByKind,
|
|
1575
1748
|
buildFindEdgesByKind,
|
|
1749
|
+
buildFindEdgesByEndpointSet,
|
|
1576
1750
|
buildCountEdgesByKind,
|
|
1577
1751
|
buildDeleteUnique,
|
|
1578
1752
|
buildHardDeleteUniquesByNode,
|
|
@@ -1586,16 +1760,17 @@ function createCommonOperationStrategy(tables, dialect, fulltextStrategy) {
|
|
|
1586
1760
|
COMMON_TABLE_OPERATION_BUILDERS
|
|
1587
1761
|
);
|
|
1588
1762
|
const fulltextTable = tables.fulltextTableName;
|
|
1763
|
+
const contributionMaterializations = tables.contributionMaterializations;
|
|
1589
1764
|
const fulltextBuilders = {
|
|
1590
|
-
buildUpsertFulltext: (params, timestamp) => fulltextStrategy.buildUpsert(fulltextTable, params, timestamp).map((statement) =>
|
|
1591
|
-
buildDeleteFulltext: (params) => fulltextStrategy.buildDelete(fulltextTable, params).map((statement) =>
|
|
1765
|
+
buildUpsertFulltext: (params, timestamp) => fulltextStrategy.buildUpsert(fulltextTable, params, timestamp).map((statement) => chunkNN3QSOVS_cjs.toDrizzleSql(statement, dialect)),
|
|
1766
|
+
buildDeleteFulltext: (params) => fulltextStrategy.buildDelete(fulltextTable, params).map((statement) => chunkNN3QSOVS_cjs.toDrizzleSql(statement, dialect)),
|
|
1592
1767
|
buildDeleteFulltextByNode: (graphId, nodeKind, nodeId) => fulltextStrategy.buildDelete(fulltextTable, {
|
|
1593
1768
|
graphId,
|
|
1594
1769
|
nodeKind,
|
|
1595
1770
|
nodeId
|
|
1596
|
-
}).map((statement) =>
|
|
1597
|
-
buildUpsertFulltextBatch: (params, timestamp) => fulltextStrategy.buildBatchUpsert(fulltextTable, params, timestamp).map((statement) =>
|
|
1598
|
-
buildDeleteFulltextBatch: (params) => fulltextStrategy.buildBatchDelete(fulltextTable, params).map((statement) =>
|
|
1771
|
+
}).map((statement) => chunkNN3QSOVS_cjs.toDrizzleSql(statement, dialect)),
|
|
1772
|
+
buildUpsertFulltextBatch: (params, timestamp) => fulltextStrategy.buildBatchUpsert(fulltextTable, params, timestamp).map((statement) => chunkNN3QSOVS_cjs.toDrizzleSql(statement, dialect)),
|
|
1773
|
+
buildDeleteFulltextBatch: (params) => fulltextStrategy.buildBatchDelete(fulltextTable, params).map((statement) => chunkNN3QSOVS_cjs.toDrizzleSql(statement, dialect)),
|
|
1599
1774
|
buildFulltextSearch: (params) => buildFulltextSearch(
|
|
1600
1775
|
fulltextTable,
|
|
1601
1776
|
params,
|
|
@@ -1607,7 +1782,7 @@ function createCommonOperationStrategy(tables, dialect, fulltextStrategy) {
|
|
|
1607
1782
|
tables.nodes,
|
|
1608
1783
|
params.graphId,
|
|
1609
1784
|
params.nodeKind,
|
|
1610
|
-
|
|
1785
|
+
chunkHJH3RMXG_cjs.nowIso()
|
|
1611
1786
|
)
|
|
1612
1787
|
),
|
|
1613
1788
|
buildHybridSearch: (params, vectorSql, vectorScoreDescending) => {
|
|
@@ -1615,7 +1790,7 @@ function createCommonOperationStrategy(tables, dialect, fulltextStrategy) {
|
|
|
1615
1790
|
tables.nodes,
|
|
1616
1791
|
params.graphId,
|
|
1617
1792
|
params.nodeKind,
|
|
1618
|
-
|
|
1793
|
+
chunkHJH3RMXG_cjs.nowIso()
|
|
1619
1794
|
);
|
|
1620
1795
|
const fulltextSql = buildFulltextSearch(
|
|
1621
1796
|
fulltextTable,
|
|
@@ -1636,7 +1811,7 @@ function createCommonOperationStrategy(tables, dialect, fulltextStrategy) {
|
|
|
1636
1811
|
hybridCandidatesRef()
|
|
1637
1812
|
);
|
|
1638
1813
|
return buildHybridSearchStatement({
|
|
1639
|
-
candidatesSql:
|
|
1814
|
+
candidatesSql: chunkU5W4LKZV_cjs.isSqlFragment(candidates) ? chunkNN3QSOVS_cjs.toDrizzleSql(candidates, dialect) : candidates,
|
|
1640
1815
|
vectorSql,
|
|
1641
1816
|
vectorScoreDescending,
|
|
1642
1817
|
fulltextSql,
|
|
@@ -1652,9 +1827,19 @@ function createCommonOperationStrategy(tables, dialect, fulltextStrategy) {
|
|
|
1652
1827
|
});
|
|
1653
1828
|
}
|
|
1654
1829
|
};
|
|
1830
|
+
function buildDeleteContributionMaterialization(identity) {
|
|
1831
|
+
return drizzleOrm.sql`
|
|
1832
|
+
DELETE FROM ${contributionMaterializations}
|
|
1833
|
+
WHERE graph_id = ${identity.graphId}
|
|
1834
|
+
AND logical_name = ${identity.logicalName}
|
|
1835
|
+
AND owner = ${identity.owner}
|
|
1836
|
+
AND table_name = ${identity.tableName}
|
|
1837
|
+
`;
|
|
1838
|
+
}
|
|
1655
1839
|
return {
|
|
1656
1840
|
...tableOperations,
|
|
1657
1841
|
...fulltextBuilders,
|
|
1842
|
+
buildDeleteContributionMaterialization,
|
|
1658
1843
|
buildInsertUnique(params) {
|
|
1659
1844
|
return buildInsertUnique(tables, dialect, params);
|
|
1660
1845
|
},
|
|
@@ -1730,32 +1915,70 @@ var DRIZZLE_DIALECT_LABELS = {
|
|
|
1730
1915
|
function assertAdoptedDialect(externalTx, brand, backend) {
|
|
1731
1916
|
if (drizzleOrm.is(externalTx, brand)) return;
|
|
1732
1917
|
const label = DRIZZLE_DIALECT_LABELS[backend];
|
|
1733
|
-
throw new
|
|
1918
|
+
throw new chunkC4F7VJ5D_cjs.ConfigurationError(
|
|
1734
1919
|
`adoptTransaction received a handle that is not a ${label} Drizzle transaction. Pass the \`tx\` from a ${label} \`db.transaction(...)\` opened on this backend's connection.`,
|
|
1735
1920
|
{ backend, capability: "adoptTransaction" }
|
|
1736
1921
|
);
|
|
1737
1922
|
}
|
|
1738
1923
|
function verifyExpectedActiveVersion(graphId, expected, actualActiveVersion) {
|
|
1739
1924
|
const expectedVersion = expected.kind === "active" ? expected.version : 0;
|
|
1925
|
+
assertActiveSchemaVersion(graphId, expectedVersion, actualActiveVersion);
|
|
1926
|
+
}
|
|
1927
|
+
function assertActiveSchemaVersion(graphId, expectedVersion, actualActiveVersion) {
|
|
1740
1928
|
if (actualActiveVersion !== expectedVersion) {
|
|
1741
|
-
throw new
|
|
1929
|
+
throw new chunkC4F7VJ5D_cjs.StaleVersionError({
|
|
1742
1930
|
graphId,
|
|
1743
1931
|
expected: expectedVersion,
|
|
1744
1932
|
actual: actualActiveVersion
|
|
1745
1933
|
});
|
|
1746
1934
|
}
|
|
1747
1935
|
}
|
|
1936
|
+
async function commitSchemaVersionIfKindsEmpty(backend, params, probes) {
|
|
1937
|
+
const [existing, active] = await Promise.all([
|
|
1938
|
+
backend.getSchemaVersion(params.graphId, params.version),
|
|
1939
|
+
backend.getActiveSchema(params.graphId)
|
|
1940
|
+
]);
|
|
1941
|
+
if (existing !== void 0 && (existing.is_active || existing.schema_hash !== params.schemaHash)) {
|
|
1942
|
+
return {
|
|
1943
|
+
status: "committed",
|
|
1944
|
+
row: await backend.commitSchemaVersion(params)
|
|
1945
|
+
};
|
|
1946
|
+
}
|
|
1947
|
+
verifyExpectedActiveVersion(
|
|
1948
|
+
params.graphId,
|
|
1949
|
+
params.expected,
|
|
1950
|
+
active?.version ?? 0
|
|
1951
|
+
);
|
|
1952
|
+
const populated = [];
|
|
1953
|
+
for (const probe of probes) {
|
|
1954
|
+
const count = probe.entity === "node" ? await backend.countNodesByKind({
|
|
1955
|
+
graphId: params.graphId,
|
|
1956
|
+
kind: probe.kind
|
|
1957
|
+
}) : await backend.countEdgesByKind({
|
|
1958
|
+
graphId: params.graphId,
|
|
1959
|
+
kind: probe.kind
|
|
1960
|
+
});
|
|
1961
|
+
if (count > 0) populated.push({ ...probe, count });
|
|
1962
|
+
}
|
|
1963
|
+
if (populated.length > 0) {
|
|
1964
|
+
return { status: "populated", kinds: populated };
|
|
1965
|
+
}
|
|
1966
|
+
return {
|
|
1967
|
+
status: "committed",
|
|
1968
|
+
row: await backend.commitSchemaVersion(params)
|
|
1969
|
+
};
|
|
1970
|
+
}
|
|
1748
1971
|
function createCommonOperationBackend(options) {
|
|
1749
1972
|
const { batchConfig, execution, operationStrategy, rowMappers } = options;
|
|
1750
|
-
const nowIso2 = options.nowIso ??
|
|
1751
|
-
const
|
|
1973
|
+
const nowIso2 = options.nowIso ?? chunkHJH3RMXG_cjs.nowIso;
|
|
1974
|
+
const tableExists = createCachedTableExistence(
|
|
1752
1975
|
(tableName) => execution.execGet(
|
|
1753
1976
|
operationStrategy.buildTableExists(tableName)
|
|
1754
1977
|
),
|
|
1755
1978
|
options.tableExistenceCache
|
|
1756
1979
|
);
|
|
1757
1980
|
async function runIgnorableClearStatement(statement) {
|
|
1758
|
-
if (statement.ignoreMissingTable === true && statement.requiredTableName !== void 0 && !await
|
|
1981
|
+
if (statement.ignoreMissingTable === true && statement.requiredTableName !== void 0 && !await tableExists(statement.requiredTableName)) {
|
|
1759
1982
|
return;
|
|
1760
1983
|
}
|
|
1761
1984
|
await execution.execRun(statement.query);
|
|
@@ -1767,6 +1990,10 @@ function createCommonOperationBackend(options) {
|
|
|
1767
1990
|
return row === void 0 ? 0 : rowMappers.toSchemaVersionRow(row).version;
|
|
1768
1991
|
}
|
|
1769
1992
|
return {
|
|
1993
|
+
tableExists,
|
|
1994
|
+
async executeSchemaDdl(ddl) {
|
|
1995
|
+
await execution.execRun(chunkU5W4LKZV_cjs.asCompiledStatementSql(chunkU5W4LKZV_cjs.sql.raw(ddl)));
|
|
1996
|
+
},
|
|
1770
1997
|
async executeStatement(query) {
|
|
1771
1998
|
await execution.execRun(query);
|
|
1772
1999
|
},
|
|
@@ -1778,7 +2005,7 @@ function createCommonOperationBackend(options) {
|
|
|
1778
2005
|
const query = operationStrategy.buildInsertNode(params, timestamp);
|
|
1779
2006
|
const row = await execution.execGet(query);
|
|
1780
2007
|
if (!row)
|
|
1781
|
-
throw new
|
|
2008
|
+
throw new chunkC4F7VJ5D_cjs.DatabaseOperationError(
|
|
1782
2009
|
"Insert node failed: no row returned",
|
|
1783
2010
|
{ operation: "insert", entity: "node" }
|
|
1784
2011
|
);
|
|
@@ -1838,7 +2065,7 @@ function createCommonOperationBackend(options) {
|
|
|
1838
2065
|
const query = operationStrategy.buildUpdateNode(params, timestamp);
|
|
1839
2066
|
const row = await execution.execGet(query);
|
|
1840
2067
|
if (!row)
|
|
1841
|
-
throw new
|
|
2068
|
+
throw new chunkC4F7VJ5D_cjs.DatabaseOperationError(
|
|
1842
2069
|
"Update node failed: no row returned",
|
|
1843
2070
|
{ operation: "update", entity: "node" }
|
|
1844
2071
|
);
|
|
@@ -1886,7 +2113,7 @@ function createCommonOperationBackend(options) {
|
|
|
1886
2113
|
const query = operationStrategy.buildInsertEdge(params, timestamp);
|
|
1887
2114
|
const row = await execution.execGet(query);
|
|
1888
2115
|
if (!row)
|
|
1889
|
-
throw new
|
|
2116
|
+
throw new chunkC4F7VJ5D_cjs.DatabaseOperationError(
|
|
1890
2117
|
"Insert edge failed: no row returned",
|
|
1891
2118
|
{ operation: "insert", entity: "edge" }
|
|
1892
2119
|
);
|
|
@@ -1946,7 +2173,7 @@ function createCommonOperationBackend(options) {
|
|
|
1946
2173
|
const query = operationStrategy.buildUpdateEdge(params, timestamp);
|
|
1947
2174
|
const row = await execution.execGet(query);
|
|
1948
2175
|
if (!row)
|
|
1949
|
-
throw new
|
|
2176
|
+
throw new chunkC4F7VJ5D_cjs.DatabaseOperationError(
|
|
1950
2177
|
"Update edge failed: no row returned",
|
|
1951
2178
|
{ operation: "update", entity: "edge" }
|
|
1952
2179
|
);
|
|
@@ -2019,6 +2246,22 @@ function createCommonOperationBackend(options) {
|
|
|
2019
2246
|
const rows = await execution.execAll(query);
|
|
2020
2247
|
return rows.map((row) => rowMappers.toEdgeRow(row));
|
|
2021
2248
|
},
|
|
2249
|
+
async findEdgesByEndpointSet(params) {
|
|
2250
|
+
const ids = resolveEdgeEndpointIds(params);
|
|
2251
|
+
const edgeRows = [];
|
|
2252
|
+
for (const idChunk of chunkZDH3DX3C_cjs.chunk(
|
|
2253
|
+
ids,
|
|
2254
|
+
batchConfig.findEdgesEndpointChunkSize
|
|
2255
|
+
)) {
|
|
2256
|
+
const query = operationStrategy.buildFindEdgesByEndpointSet(
|
|
2257
|
+
params,
|
|
2258
|
+
idChunk
|
|
2259
|
+
);
|
|
2260
|
+
const rows = await execution.execAll(query);
|
|
2261
|
+
for (const row of rows) edgeRows.push(rowMappers.toEdgeRow(row));
|
|
2262
|
+
}
|
|
2263
|
+
return edgeRows;
|
|
2264
|
+
},
|
|
2022
2265
|
async countEdgesByKind(params) {
|
|
2023
2266
|
const query = operationStrategy.buildCountEdgesByKind(params);
|
|
2024
2267
|
const row = await execution.execGet(query);
|
|
@@ -2028,7 +2271,7 @@ function createCommonOperationBackend(options) {
|
|
|
2028
2271
|
const query = operationStrategy.buildInsertUnique(params);
|
|
2029
2272
|
const result = await execution.execGet(query);
|
|
2030
2273
|
if (result && result.node_id !== params.nodeId) {
|
|
2031
|
-
throw new
|
|
2274
|
+
throw new chunkC4F7VJ5D_cjs.UniquenessError({
|
|
2032
2275
|
constraintName: params.constraintName,
|
|
2033
2276
|
kind: params.nodeKind,
|
|
2034
2277
|
existingId: result.node_id,
|
|
@@ -2048,7 +2291,7 @@ function createCommonOperationBackend(options) {
|
|
|
2048
2291
|
continue;
|
|
2049
2292
|
}
|
|
2050
2293
|
if (existing.nodeId !== entry.nodeId) {
|
|
2051
|
-
throw new
|
|
2294
|
+
throw new chunkC4F7VJ5D_cjs.UniquenessError({
|
|
2052
2295
|
constraintName: entry.constraintName,
|
|
2053
2296
|
kind: entry.nodeKind,
|
|
2054
2297
|
existingId: existing.nodeId,
|
|
@@ -2073,7 +2316,7 @@ function createCommonOperationBackend(options) {
|
|
|
2073
2316
|
for (const entry of chunk2) {
|
|
2074
2317
|
const owner = ownerByTarget.get(targetKey(entry));
|
|
2075
2318
|
if (owner !== void 0 && owner !== entry.nodeId) {
|
|
2076
|
-
throw new
|
|
2319
|
+
throw new chunkC4F7VJ5D_cjs.UniquenessError({
|
|
2077
2320
|
constraintName: entry.constraintName,
|
|
2078
2321
|
kind: entry.nodeKind,
|
|
2079
2322
|
existingId: owner,
|
|
@@ -2128,7 +2371,7 @@ function createCommonOperationBackend(options) {
|
|
|
2128
2371
|
if (existingRaw !== void 0) {
|
|
2129
2372
|
const existing = rowMappers.toSchemaVersionRow(existingRaw);
|
|
2130
2373
|
if (existing.schema_hash !== params.schemaHash) {
|
|
2131
|
-
throw new
|
|
2374
|
+
throw new chunkC4F7VJ5D_cjs.SchemaContentConflictError({
|
|
2132
2375
|
graphId: params.graphId,
|
|
2133
2376
|
version: params.version,
|
|
2134
2377
|
existingHash: existing.schema_hash,
|
|
@@ -2176,7 +2419,7 @@ function createCommonOperationBackend(options) {
|
|
|
2176
2419
|
);
|
|
2177
2420
|
const insertedRaw = await execution.execGet(insertQuery);
|
|
2178
2421
|
if (!insertedRaw) {
|
|
2179
|
-
throw new
|
|
2422
|
+
throw new chunkC4F7VJ5D_cjs.DatabaseOperationError(
|
|
2180
2423
|
"Insert schema failed: no row returned",
|
|
2181
2424
|
{ operation: "insert", entity: "schema" }
|
|
2182
2425
|
);
|
|
@@ -2194,7 +2437,7 @@ function createCommonOperationBackend(options) {
|
|
|
2194
2437
|
operationStrategy.buildGetSchemaVersion(params.graphId, params.version)
|
|
2195
2438
|
);
|
|
2196
2439
|
if (!targetRaw) {
|
|
2197
|
-
throw new
|
|
2440
|
+
throw new chunkC4F7VJ5D_cjs.MigrationError(
|
|
2198
2441
|
`Cannot activate version ${params.version}: version does not exist for graph "${params.graphId}".`,
|
|
2199
2442
|
{
|
|
2200
2443
|
graphId: params.graphId,
|
|
@@ -2227,7 +2470,7 @@ function quoteSqlIdentifier(identifier) {
|
|
|
2227
2470
|
}
|
|
2228
2471
|
function requireRawExecution(backend) {
|
|
2229
2472
|
if (backend.executeRaw === void 0) {
|
|
2230
|
-
throw new
|
|
2473
|
+
throw new chunkC4F7VJ5D_cjs.TrustedImportError(
|
|
2231
2474
|
"This backend cannot execute the raw statements required by trusted import.",
|
|
2232
2475
|
"backend_unsupported"
|
|
2233
2476
|
);
|
|
@@ -2236,7 +2479,7 @@ function requireRawExecution(backend) {
|
|
|
2236
2479
|
}
|
|
2237
2480
|
function requireStatementExecution(backend) {
|
|
2238
2481
|
if (backend.executeStatement === void 0) {
|
|
2239
|
-
throw new
|
|
2482
|
+
throw new chunkC4F7VJ5D_cjs.TrustedImportError(
|
|
2240
2483
|
"This backend cannot execute the index lifecycle required by trusted import.",
|
|
2241
2484
|
"backend_unsupported"
|
|
2242
2485
|
);
|
|
@@ -2258,7 +2501,7 @@ async function assertTrustedImportDatabaseEmpty(backend, tableNames) {
|
|
|
2258
2501
|
[]
|
|
2259
2502
|
);
|
|
2260
2503
|
if (!rowIndicatesExistingData(rows[0])) return;
|
|
2261
|
-
throw new
|
|
2504
|
+
throw new chunkC4F7VJ5D_cjs.TrustedImportError(
|
|
2262
2505
|
"Trusted import requires globally empty TypeGraph node and edge tables.",
|
|
2263
2506
|
"database_not_empty",
|
|
2264
2507
|
{ tables: [tableNames.nodes, tableNames.edges] },
|
|
@@ -2270,8 +2513,8 @@ async function assertTrustedImportDatabaseEmpty(backend, tableNames) {
|
|
|
2270
2513
|
async function lockPostgresTrustedImportTables(backend, tableNames) {
|
|
2271
2514
|
const executeStatement = requireStatementExecution(backend);
|
|
2272
2515
|
await executeStatement(
|
|
2273
|
-
|
|
2274
|
-
|
|
2516
|
+
chunkU5W4LKZV_cjs.asCompiledStatementSql(
|
|
2517
|
+
chunkU5W4LKZV_cjs.sql.raw(
|
|
2275
2518
|
`LOCK TABLE ${quoteSqlIdentifier(tableNames.nodes)}, ${quoteSqlIdentifier(tableNames.edges)} IN ACCESS EXCLUSIVE MODE`
|
|
2276
2519
|
)
|
|
2277
2520
|
)
|
|
@@ -2291,8 +2534,8 @@ async function suspendSqliteSecondaryIndexes(backend, tableNames) {
|
|
|
2291
2534
|
);
|
|
2292
2535
|
for (const definition of definitions) {
|
|
2293
2536
|
await executeStatement(
|
|
2294
|
-
|
|
2295
|
-
|
|
2537
|
+
chunkU5W4LKZV_cjs.asCompiledStatementSql(
|
|
2538
|
+
chunkU5W4LKZV_cjs.sql.raw(`DROP INDEX ${quoteSqlIdentifier(definition.index_name)}`)
|
|
2296
2539
|
)
|
|
2297
2540
|
);
|
|
2298
2541
|
}
|
|
@@ -2322,8 +2565,8 @@ async function suspendPostgresSecondaryIndexes(backend, tableNames) {
|
|
|
2322
2565
|
);
|
|
2323
2566
|
for (const definition of definitions) {
|
|
2324
2567
|
await executeStatement(
|
|
2325
|
-
|
|
2326
|
-
|
|
2568
|
+
chunkU5W4LKZV_cjs.asCompiledStatementSql(
|
|
2569
|
+
chunkU5W4LKZV_cjs.sql.raw(`DROP INDEX ${quoteSqlIdentifier(definition.index_name)}`)
|
|
2327
2570
|
)
|
|
2328
2571
|
);
|
|
2329
2572
|
}
|
|
@@ -2333,20 +2576,20 @@ async function restoreSecondaryIndexes(backend, definitions) {
|
|
|
2333
2576
|
const executeStatement = requireStatementExecution(backend);
|
|
2334
2577
|
for (const definition of definitions) {
|
|
2335
2578
|
await executeStatement(
|
|
2336
|
-
|
|
2579
|
+
chunkU5W4LKZV_cjs.asCompiledStatementSql(chunkU5W4LKZV_cjs.sql.raw(definition.index_definition))
|
|
2337
2580
|
);
|
|
2338
2581
|
}
|
|
2339
2582
|
}
|
|
2340
2583
|
async function analyzeImportedTables(backend, tableNames) {
|
|
2341
2584
|
const executeStatement = requireStatementExecution(backend);
|
|
2342
2585
|
await executeStatement(
|
|
2343
|
-
|
|
2344
|
-
|
|
2586
|
+
chunkU5W4LKZV_cjs.asCompiledStatementSql(
|
|
2587
|
+
chunkU5W4LKZV_cjs.sql.raw(`ANALYZE ${quoteSqlIdentifier(tableNames.nodes)}`)
|
|
2345
2588
|
)
|
|
2346
2589
|
);
|
|
2347
2590
|
await executeStatement(
|
|
2348
|
-
|
|
2349
|
-
|
|
2591
|
+
chunkU5W4LKZV_cjs.asCompiledStatementSql(
|
|
2592
|
+
chunkU5W4LKZV_cjs.sql.raw(`ANALYZE ${quoteSqlIdentifier(tableNames.edges)}`)
|
|
2350
2593
|
)
|
|
2351
2594
|
);
|
|
2352
2595
|
}
|
|
@@ -2361,7 +2604,7 @@ function postgresArray(values) {
|
|
|
2361
2604
|
function createSqliteTrustedImportSession(executionAdapter, tableNames) {
|
|
2362
2605
|
const executePreparedRunBatch = executionAdapter.executePreparedRunBatch;
|
|
2363
2606
|
if (executePreparedRunBatch === void 0) {
|
|
2364
|
-
throw new
|
|
2607
|
+
throw new chunkC4F7VJ5D_cjs.TrustedImportError(
|
|
2365
2608
|
"Trusted import requires a synchronous SQLite driver with prepared statement support.",
|
|
2366
2609
|
"backend_unsupported"
|
|
2367
2610
|
);
|
|
@@ -2490,6 +2733,7 @@ function getOrCreateLru(cache, key, cacheMax, create) {
|
|
|
2490
2733
|
}
|
|
2491
2734
|
|
|
2492
2735
|
exports.EMBEDDING_UPSERT_PARAM_COUNT = EMBEDDING_UPSERT_PARAM_COUNT;
|
|
2736
|
+
exports.FIND_EDGES_ENDPOINT_FIXED_PARAM_COUNT = FIND_EDGES_ENDPOINT_FIXED_PARAM_COUNT;
|
|
2493
2737
|
exports.POSTGRES_CONTRIBUTION_MAT_TIMESTAMPS = POSTGRES_CONTRIBUTION_MAT_TIMESTAMPS;
|
|
2494
2738
|
exports.POSTGRES_INDEX_MAT_TIMESTAMPS = POSTGRES_INDEX_MAT_TIMESTAMPS;
|
|
2495
2739
|
exports.POSTGRES_KIND_REMOVAL_TIMESTAMPS = POSTGRES_KIND_REMOVAL_TIMESTAMPS;
|
|
@@ -2497,6 +2741,7 @@ exports.SQLITE_CONTRIBUTION_MAT_TIMESTAMPS = SQLITE_CONTRIBUTION_MAT_TIMESTAMPS;
|
|
|
2497
2741
|
exports.SQLITE_INDEX_MAT_TIMESTAMPS = SQLITE_INDEX_MAT_TIMESTAMPS;
|
|
2498
2742
|
exports.SQLITE_KIND_REMOVAL_TIMESTAMPS = SQLITE_KIND_REMOVAL_TIMESTAMPS;
|
|
2499
2743
|
exports.analyzeImportedTables = analyzeImportedTables;
|
|
2744
|
+
exports.assertActiveSchemaVersion = assertActiveSchemaVersion;
|
|
2500
2745
|
exports.assertAdoptedDialect = assertAdoptedDialect;
|
|
2501
2746
|
exports.assertTrustedImportDatabaseEmpty = assertTrustedImportDatabaseEmpty;
|
|
2502
2747
|
exports.buildContributionInsertValues = buildContributionInsertValues;
|
|
@@ -2506,6 +2751,7 @@ exports.buildKindRemovalOnConflictSet = buildKindRemovalOnConflictSet;
|
|
|
2506
2751
|
exports.buildLiveNodeCandidates = buildLiveNodeCandidates;
|
|
2507
2752
|
exports.buildMaterializationInsertValues = buildMaterializationInsertValues;
|
|
2508
2753
|
exports.buildMaterializationOnConflictSet = buildMaterializationOnConflictSet;
|
|
2754
|
+
exports.commitSchemaVersionIfKindsEmpty = commitSchemaVersionIfKindsEmpty;
|
|
2509
2755
|
exports.createCachedTableExistence = createCachedTableExistence;
|
|
2510
2756
|
exports.createCommonOperationBackend = createCommonOperationBackend;
|
|
2511
2757
|
exports.createContributionMaterializer = createContributionMaterializer;
|
|
@@ -2525,8 +2771,9 @@ exports.mapVectorWriteError = mapVectorWriteError;
|
|
|
2525
2771
|
exports.restoreSecondaryIndexes = restoreSecondaryIndexes;
|
|
2526
2772
|
exports.suspendPostgresSecondaryIndexes = suspendPostgresSecondaryIndexes;
|
|
2527
2773
|
exports.suspendSqliteSecondaryIndexes = suspendSqliteSecondaryIndexes;
|
|
2774
|
+
exports.tableExistsFromRow = tableExistsFromRow;
|
|
2528
2775
|
exports.vectorSlotFromCreateIndexParams = vectorSlotFromCreateIndexParams;
|
|
2529
2776
|
exports.vectorSlotFromDropIndexParams = vectorSlotFromDropIndexParams;
|
|
2530
2777
|
exports.vectorSlotFromParams = vectorSlotFromParams;
|
|
2531
|
-
//# sourceMappingURL=chunk-
|
|
2532
|
-
//# sourceMappingURL=chunk-
|
|
2778
|
+
//# sourceMappingURL=chunk-ST3LPB2V.cjs.map
|
|
2779
|
+
//# sourceMappingURL=chunk-ST3LPB2V.cjs.map
|