@nicia-ai/typegraph 0.40.0 → 0.42.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 -2
- package/dist/backend/drizzle/indexes.d.ts +1 -2
- package/dist/backend/drizzle/indexes.js +5 -5
- package/dist/backend/index.cjs +50 -50
- package/dist/backend/index.d.cts +3 -4
- package/dist/backend/index.d.ts +3 -4
- package/dist/backend/index.js +11 -11
- package/dist/backend/postgres/index.cjs +26 -26
- package/dist/backend/postgres/index.d.cts +5 -6
- package/dist/backend/postgres/index.d.ts +5 -6
- package/dist/backend/postgres/index.js +13 -13
- package/dist/backend/postgres/pglite-store.cjs +34 -34
- package/dist/backend/postgres/pglite-store.d.cts +7 -8
- package/dist/backend/postgres/pglite-store.d.ts +7 -8
- package/dist/backend/postgres/pglite-store.js +30 -30
- package/dist/backend/postgres/pglite.cjs +15 -15
- package/dist/backend/postgres/pglite.d.cts +2 -3
- package/dist/backend/postgres/pglite.d.ts +2 -3
- package/dist/backend/postgres/pglite.js +14 -14
- package/dist/backend/sqlite/index.cjs +23 -23
- package/dist/backend/sqlite/index.d.cts +5 -6
- package/dist/backend/sqlite/index.d.ts +5 -6
- package/dist/backend/sqlite/index.js +11 -11
- package/dist/backend/sqlite/libsql.cjs +17 -17
- package/dist/backend/sqlite/libsql.d.cts +2 -3
- package/dist/backend/sqlite/libsql.d.ts +2 -3
- package/dist/backend/sqlite/libsql.js +13 -13
- package/dist/backend/sqlite/local-store.cjs +35 -35
- package/dist/backend/sqlite/local-store.d.cts +7 -8
- package/dist/backend/sqlite/local-store.d.ts +7 -8
- package/dist/backend/sqlite/local-store.js +31 -31
- package/dist/backend/sqlite/local.cjs +16 -16
- package/dist/backend/sqlite/local.d.cts +2 -3
- package/dist/backend/sqlite/local.d.ts +2 -3
- package/dist/backend/sqlite/local.js +14 -14
- package/dist/{chunk-H6I36MGT.cjs → chunk-277UZV7X.cjs} +1191 -1090
- package/dist/chunk-277UZV7X.cjs.map +1 -0
- package/dist/{chunk-2I3DNNBU.js → chunk-2G6ZEGYO.js} +4 -4
- package/dist/{chunk-2I3DNNBU.js.map → chunk-2G6ZEGYO.js.map} +1 -1
- package/dist/{chunk-76HE7DJP.js → chunk-2HKIID5K.js} +5 -5
- package/dist/{chunk-76HE7DJP.js.map → chunk-2HKIID5K.js.map} +1 -1
- package/dist/{chunk-QOHTVDHU.js → chunk-2OOY4OYT.js} +4 -4
- package/dist/{chunk-QOHTVDHU.js.map → chunk-2OOY4OYT.js.map} +1 -1
- package/dist/{chunk-UCHW2MGP.cjs → chunk-2SO5I5AI.cjs} +196 -196
- package/dist/{chunk-UCHW2MGP.cjs.map → chunk-2SO5I5AI.cjs.map} +1 -1
- package/dist/{chunk-LFFVD5ZR.cjs → chunk-33PAKPED.cjs} +41 -41
- package/dist/{chunk-LFFVD5ZR.cjs.map → chunk-33PAKPED.cjs.map} +1 -1
- package/dist/chunk-3RPQDGUE.cjs +83 -0
- package/dist/chunk-3RPQDGUE.cjs.map +1 -0
- package/dist/{chunk-PH4IJ3V5.js → chunk-3V6D5DEC.js} +3 -3
- package/dist/{chunk-PH4IJ3V5.js.map → chunk-3V6D5DEC.js.map} +1 -1
- package/dist/{chunk-Y5UC3IXF.js → chunk-42XYPKZU.js} +3 -3
- package/dist/{chunk-Y5UC3IXF.js.map → chunk-42XYPKZU.js.map} +1 -1
- package/dist/{chunk-XZA3Y4YH.js → chunk-4WYFRACU.js} +3 -3
- package/dist/{chunk-XZA3Y4YH.js.map → chunk-4WYFRACU.js.map} +1 -1
- package/dist/{chunk-AQVDAKXH.js → chunk-4XRP2N6B.js} +3 -3
- package/dist/{chunk-AQVDAKXH.js.map → chunk-4XRP2N6B.js.map} +1 -1
- package/dist/{chunk-PWXGB77L.cjs → chunk-5AERZSHC.cjs} +4 -4
- package/dist/{chunk-PWXGB77L.cjs.map → chunk-5AERZSHC.cjs.map} +1 -1
- package/dist/{chunk-K6CD6W5J.js → chunk-5C75HQYQ.js} +5 -5
- package/dist/{chunk-K6CD6W5J.js.map → chunk-5C75HQYQ.js.map} +1 -1
- package/dist/{chunk-2J5NMMVR.cjs → chunk-5GV4JQNA.cjs} +43 -43
- package/dist/{chunk-2J5NMMVR.cjs.map → chunk-5GV4JQNA.cjs.map} +1 -1
- package/dist/{chunk-KHNKYSGP.cjs → chunk-5P6IPIT6.cjs} +41 -41
- package/dist/{chunk-KHNKYSGP.cjs.map → chunk-5P6IPIT6.cjs.map} +1 -1
- package/dist/{chunk-53BSOG3O.js → chunk-6NB73BXV.js} +11 -11
- package/dist/{chunk-53BSOG3O.js.map → chunk-6NB73BXV.js.map} +1 -1
- package/dist/{chunk-SE422RES.cjs → chunk-6TJ6PKPS.cjs} +27 -27
- package/dist/{chunk-SE422RES.cjs.map → chunk-6TJ6PKPS.cjs.map} +1 -1
- package/dist/{chunk-QXKVUJLI.cjs → chunk-7TOT7RKY.cjs} +120 -120
- package/dist/{chunk-QXKVUJLI.cjs.map → chunk-7TOT7RKY.cjs.map} +1 -1
- package/dist/{chunk-7WLEQIHA.cjs → chunk-7Y6BV3TK.cjs} +100 -100
- package/dist/{chunk-7WLEQIHA.cjs.map → chunk-7Y6BV3TK.cjs.map} +1 -1
- package/dist/{chunk-HP6LWBLB.cjs → chunk-AO2WPYFZ.cjs} +4 -4
- package/dist/{chunk-HP6LWBLB.cjs.map → chunk-AO2WPYFZ.cjs.map} +1 -1
- package/dist/{chunk-7UTUKH4E.cjs → chunk-AQR6BHB3.cjs} +10 -10
- package/dist/{chunk-7UTUKH4E.cjs.map → chunk-AQR6BHB3.cjs.map} +1 -1
- package/dist/{chunk-X4PVHAZ6.cjs → chunk-ARN3ZODS.cjs} +6 -6
- package/dist/{chunk-X4PVHAZ6.cjs.map → chunk-ARN3ZODS.cjs.map} +1 -1
- package/dist/{chunk-EFZ4S22A.js → chunk-BGXKXGDI.js} +12 -12
- package/dist/{chunk-EFZ4S22A.js.map → chunk-BGXKXGDI.js.map} +1 -1
- package/dist/{chunk-YYLMXERH.js → chunk-CDYRPI5U.js} +4 -4
- package/dist/{chunk-YYLMXERH.js.map → chunk-CDYRPI5U.js.map} +1 -1
- package/dist/{chunk-3LKL3S6X.js → chunk-CI5NPLXX.js} +3 -3
- package/dist/{chunk-3LKL3S6X.js.map → chunk-CI5NPLXX.js.map} +1 -1
- package/dist/{chunk-UUIBACKJ.js → chunk-CUPJL6TS.js} +3 -3
- package/dist/{chunk-UUIBACKJ.js.map → chunk-CUPJL6TS.js.map} +1 -1
- package/dist/{chunk-JZYMOHHM.cjs → chunk-CVK4T34X.cjs} +22 -22
- package/dist/{chunk-JZYMOHHM.cjs.map → chunk-CVK4T34X.cjs.map} +1 -1
- package/dist/{chunk-L3DDZUZP.js → chunk-CVNGKTHO.js} +4 -4
- package/dist/{chunk-L3DDZUZP.js.map → chunk-CVNGKTHO.js.map} +1 -1
- package/dist/{chunk-RW24SAHI.cjs → chunk-DMZEVJGL.cjs} +13 -13
- package/dist/{chunk-RW24SAHI.cjs.map → chunk-DMZEVJGL.cjs.map} +1 -1
- package/dist/{chunk-3BL3JFHL.js → chunk-DP7KC6CL.js} +126 -25
- package/dist/{chunk-3BL3JFHL.js.map → chunk-DP7KC6CL.js.map} +1 -1
- package/dist/{chunk-QYDUCWD2.cjs → chunk-ECU53PMN.cjs} +4 -4
- package/dist/{chunk-QYDUCWD2.cjs.map → chunk-ECU53PMN.cjs.map} +1 -1
- package/dist/{chunk-SCTZRFW5.js → chunk-EQOQOT55.js} +5 -5
- package/dist/{chunk-SCTZRFW5.js.map → chunk-EQOQOT55.js.map} +1 -1
- package/dist/{chunk-JHK6NPFV.js → chunk-EVFL2ZY5.js} +9 -9
- package/dist/{chunk-JHK6NPFV.js.map → chunk-EVFL2ZY5.js.map} +1 -1
- package/dist/{chunk-SAMJLDGG.cjs → chunk-F2KVJ6FF.cjs} +112 -112
- package/dist/{chunk-SAMJLDGG.cjs.map → chunk-F2KVJ6FF.cjs.map} +1 -1
- package/dist/{chunk-NMQ6C6TS.cjs → chunk-F7TDKSVB.cjs} +4 -4
- package/dist/{chunk-NMQ6C6TS.cjs.map → chunk-F7TDKSVB.cjs.map} +1 -1
- package/dist/{chunk-HQRZEYYB.cjs → chunk-FFQGI67R.cjs} +44 -44
- package/dist/{chunk-HQRZEYYB.cjs.map → chunk-FFQGI67R.cjs.map} +1 -1
- package/dist/{chunk-YIRLBUNN.js → chunk-FMPZPOUD.js} +3 -3
- package/dist/{chunk-YIRLBUNN.js.map → chunk-FMPZPOUD.js.map} +1 -1
- package/dist/{chunk-LL5D5T5W.cjs → chunk-FSCJOTHF.cjs} +10 -10
- package/dist/{chunk-LL5D5T5W.cjs.map → chunk-FSCJOTHF.cjs.map} +1 -1
- package/dist/{chunk-2X73QTIC.cjs → chunk-FY4VY5EV.cjs} +20 -20
- package/dist/{chunk-2X73QTIC.cjs.map → chunk-FY4VY5EV.cjs.map} +1 -1
- package/dist/{chunk-3SHAUJRB.js → chunk-GT7NEXSU.js} +3 -3
- package/dist/{chunk-3SHAUJRB.js.map → chunk-GT7NEXSU.js.map} +1 -1
- package/dist/{chunk-W66YCXWT.js → chunk-HHBKGPEI.js} +11 -10
- package/dist/chunk-HHBKGPEI.js.map +1 -0
- package/dist/{chunk-CKFBZ4LV.cjs → chunk-I73ATSAH.cjs} +4 -4
- package/dist/{chunk-CKFBZ4LV.cjs.map → chunk-I73ATSAH.cjs.map} +1 -1
- package/dist/{chunk-ELA3V6UN.js → chunk-JOYPNY33.js} +9 -9
- package/dist/{chunk-ELA3V6UN.js.map → chunk-JOYPNY33.js.map} +1 -1
- package/dist/{chunk-YIX3BEBR.cjs → chunk-K2HHCWZO.cjs} +108 -108
- package/dist/{chunk-YIX3BEBR.cjs.map → chunk-K2HHCWZO.cjs.map} +1 -1
- package/dist/{chunk-SAFZ6JTI.cjs → chunk-KTBTSHU6.cjs} +19 -2
- package/dist/chunk-KTBTSHU6.cjs.map +1 -0
- package/dist/chunk-LDCWO5B6.js +81 -0
- package/dist/chunk-LDCWO5B6.js.map +1 -0
- package/dist/{chunk-I5CRUPKO.js → chunk-LQLVJWUH.js} +7 -7
- package/dist/{chunk-I5CRUPKO.js.map → chunk-LQLVJWUH.js.map} +1 -1
- package/dist/{chunk-ZE7E46IZ.js → chunk-LTVBD56M.js} +6 -6
- package/dist/{chunk-ZE7E46IZ.js.map → chunk-LTVBD56M.js.map} +1 -1
- package/dist/{chunk-6N7QBIWN.js → chunk-M4GYQF2H.js} +3 -3
- package/dist/{chunk-6N7QBIWN.js.map → chunk-M4GYQF2H.js.map} +1 -1
- package/dist/{chunk-XRU7V7FF.cjs → chunk-O2GZM7UK.cjs} +7 -7
- package/dist/{chunk-XRU7V7FF.cjs.map → chunk-O2GZM7UK.cjs.map} +1 -1
- package/dist/{chunk-ZE6NVENI.js → chunk-O3USVVWS.js} +3 -3
- package/dist/{chunk-ZE6NVENI.js.map → chunk-O3USVVWS.js.map} +1 -1
- package/dist/{chunk-UDS5DZNY.cjs → chunk-O7XVCLXW.cjs} +68 -67
- package/dist/chunk-O7XVCLXW.cjs.map +1 -0
- package/dist/{chunk-KLR77R5A.cjs → chunk-OM6RIOA5.cjs} +13 -13
- package/dist/{chunk-KLR77R5A.cjs.map → chunk-OM6RIOA5.cjs.map} +1 -1
- package/dist/{chunk-LLHMAHG4.cjs → chunk-OMQ2NBOR.cjs} +27 -27
- package/dist/{chunk-LLHMAHG4.cjs.map → chunk-OMQ2NBOR.cjs.map} +1 -1
- package/dist/{chunk-DPNA466P.js → chunk-OYJSYDIH.js} +19 -3
- package/dist/chunk-OYJSYDIH.js.map +1 -0
- package/dist/{chunk-CU3LPYNB.js → chunk-RAWG2FEU.js} +138 -22
- package/dist/chunk-RAWG2FEU.js.map +1 -0
- package/dist/{chunk-M2RPZS7J.cjs → chunk-RTUCOEIO.cjs} +12 -12
- package/dist/{chunk-M2RPZS7J.cjs.map → chunk-RTUCOEIO.cjs.map} +1 -1
- package/dist/{chunk-TAUGGLNQ.js → chunk-RXOAXO3R.js} +3 -3
- package/dist/{chunk-TAUGGLNQ.js.map → chunk-RXOAXO3R.js.map} +1 -1
- package/dist/{chunk-LLE25NRD.cjs → chunk-TRC646QQ.cjs} +7 -7
- package/dist/{chunk-LLE25NRD.cjs.map → chunk-TRC646QQ.cjs.map} +1 -1
- package/dist/chunk-U3YRCZ5L.cjs +12 -0
- package/dist/{chunk-IMQKXL4E.cjs.map → chunk-U3YRCZ5L.cjs.map} +1 -1
- package/dist/{chunk-ZVME6OSV.js → chunk-UJRWOV5B.js} +5 -5
- package/dist/{chunk-ZVME6OSV.js.map → chunk-UJRWOV5B.js.map} +1 -1
- package/dist/{chunk-HAQVISUF.cjs → chunk-UTTW2Q3M.cjs} +133 -133
- package/dist/{chunk-HAQVISUF.cjs.map → chunk-UTTW2Q3M.cjs.map} +1 -1
- package/dist/{chunk-L5ET7FYQ.js → chunk-UZLEQFTV.js} +3 -3
- package/dist/{chunk-L5ET7FYQ.js.map → chunk-UZLEQFTV.js.map} +1 -1
- package/dist/{chunk-K4FB2RMO.cjs → chunk-V2GZBPY2.cjs} +184 -65
- package/dist/chunk-V2GZBPY2.cjs.map +1 -0
- package/dist/{chunk-BUZWMDNL.js → chunk-VC26BUNP.js} +5 -5
- package/dist/{chunk-BUZWMDNL.js.map → chunk-VC26BUNP.js.map} +1 -1
- package/dist/chunk-VGMNGWBR.cjs +12 -0
- package/dist/{chunk-5YBDB7UG.cjs.map → chunk-VGMNGWBR.cjs.map} +1 -1
- package/dist/{chunk-XMEYZYGE.js → chunk-WYQILW5V.js} +8 -8
- package/dist/{chunk-XMEYZYGE.js.map → chunk-WYQILW5V.js.map} +1 -1
- package/dist/{chunk-YX3H63VV.cjs → chunk-X2XOQZT3.cjs} +9 -9
- package/dist/{chunk-YX3H63VV.cjs.map → chunk-X2XOQZT3.cjs.map} +1 -1
- package/dist/{chunk-N2V3HJFV.cjs → chunk-XDMPDUKL.cjs} +9 -9
- package/dist/{chunk-N2V3HJFV.cjs.map → chunk-XDMPDUKL.cjs.map} +1 -1
- package/dist/{chunk-5J4VNCUD.js → chunk-Z3WIL6S3.js} +5 -5
- package/dist/{chunk-5J4VNCUD.js.map → chunk-Z3WIL6S3.js.map} +1 -1
- package/dist/{chunk-MNURF4RF.cjs → chunk-ZBV4LQD2.cjs} +4 -4
- package/dist/{chunk-MNURF4RF.cjs.map → chunk-ZBV4LQD2.cjs.map} +1 -1
- package/dist/{chunk-YGX4PMG6.js → chunk-ZGOUVMVS.js} +5 -5
- package/dist/{chunk-YGX4PMG6.js.map → chunk-ZGOUVMVS.js.map} +1 -1
- package/dist/{chunk-QZYGZVUI.js → chunk-ZIRC2U6G.js} +11 -11
- package/dist/{chunk-QZYGZVUI.js.map → chunk-ZIRC2U6G.js.map} +1 -1
- package/dist/{chunk-6QP4QXBR.js → chunk-ZOHCFYXE.js} +3 -3
- package/dist/{chunk-6QP4QXBR.js.map → chunk-ZOHCFYXE.js.map} +1 -1
- package/dist/{chunk-VWEFXG73.js → chunk-ZP2KPDNN.js} +3 -3
- package/dist/{chunk-VWEFXG73.js.map → chunk-ZP2KPDNN.js.map} +1 -1
- package/dist/{chunk-NT6ILURI.cjs → chunk-ZPCKPLMX.cjs} +8 -8
- package/dist/{chunk-NT6ILURI.cjs.map → chunk-ZPCKPLMX.cjs.map} +1 -1
- package/dist/core/index.cjs +28 -28
- package/dist/core/index.d.cts +5 -6
- package/dist/core/index.d.ts +5 -6
- package/dist/core/index.js +8 -8
- package/dist/{ddl-KnCdF_le.d.cts → ddl-3unqC-kg.d.cts} +3 -3
- package/dist/{ddl-BLEzHw6j.d.ts → ddl-Bc4Dl8fu.d.ts} +3 -3
- package/dist/{define-graph-DQnj3fNH.d.ts → define-graph-Byslw2OO.d.cts} +1 -2
- package/dist/{define-graph-Cv3CFwKm.d.cts → define-graph-DBFnc7u_.d.ts} +1 -2
- 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 +105 -105
- package/dist/graph-merge/index.d.cts +8 -9
- package/dist/graph-merge/index.d.ts +8 -9
- package/dist/graph-merge/index.js +25 -25
- package/dist/{index-BD_3TCgh.d.ts → index-DHXw7QAl.d.cts} +19 -4
- package/dist/{index-BihFPsPu.d.cts → index-DQzVJBHa.d.ts} +19 -4
- package/dist/index.cjs +209 -200
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -15
- package/dist/index.d.ts +13 -15
- package/dist/index.js +35 -34
- package/dist/index.js.map +1 -1
- package/dist/indexes/index.cjs +13 -13
- package/dist/indexes/index.d.cts +4 -5
- package/dist/indexes/index.d.ts +4 -5
- package/dist/indexes/index.js +6 -6
- package/dist/interchange/index.cjs +40 -40
- package/dist/interchange/index.d.cts +9 -10
- package/dist/interchange/index.d.ts +9 -10
- package/dist/interchange/index.js +14 -14
- package/dist/{manager-DjE6Mhag.d.ts → manager-Dl0-er1G.d.ts} +45 -156
- package/dist/{manager-mqee5MVB.d.cts → manager-U9_zopqr.d.cts} +45 -156
- package/dist/materialize-indexes-BM3u0aXE.d.ts +258 -0
- package/dist/materialize-indexes-DzMCetZe.d.cts +258 -0
- package/dist/{postgres-Bm4DyFQU.d.cts → postgres-C5-WMKFA.d.ts} +1 -1
- package/dist/{postgres-DtaVALOZ.d.ts → postgres-DpJqtbSX.d.cts} +1 -1
- package/dist/profiler/index.d.cts +9 -10
- package/dist/profiler/index.d.ts +9 -10
- package/dist/provenance/index.cjs +39 -39
- package/dist/provenance/index.d.cts +7 -8
- package/dist/provenance/index.d.ts +7 -8
- package/dist/provenance/index.js +9 -9
- package/dist/schema/index.cjs +55 -112
- package/dist/schema/index.cjs.map +1 -1
- package/dist/schema/index.d.cts +57 -58
- package/dist/schema/index.d.ts +57 -58
- package/dist/schema/index.js +15 -92
- package/dist/schema/index.js.map +1 -1
- package/dist/{searchable-BxlJQVFw.d.cts → searchable-B4mUXZT6.d.cts} +2 -2
- package/dist/{searchable-ChJ29MCd.d.ts → searchable-C7jmPNLT.d.ts} +2 -2
- package/dist/{sqlite-m9Izphk_.d.ts → sqlite-Ch5tSYQY.d.ts} +1 -1
- package/dist/{sqlite-DT6tTHOG.d.cts → sqlite-Da7jiYu9.d.cts} +1 -1
- package/dist/{store-view-CagdeyNn.d.ts → store-view-6C2vTWqf.d.ts} +68 -16
- package/dist/{store-view-C-buB8Q8.d.cts → store-view-CNcOG8bQ.d.cts} +68 -16
- package/dist/{temporal-CyFsSPe8.d.ts → temporal-BtrTYTiB.d.ts} +1 -1
- package/dist/{temporal-Dn_JADWY.d.cts → temporal-CMpigMCW.d.cts} +1 -1
- package/dist/{types-CYdXzZef.d.ts → types-D2rU5Taq.d.ts} +1 -2
- package/dist/{types-D8szWDUo.d.ts → types-Dh-EgT-w.d.cts} +569 -2
- package/dist/{types-C5pZeKTl.d.cts → types-Dh-EgT-w.d.ts} +569 -2
- package/dist/{types-CqSfMRW3.d.cts → types-G4sVM-76.d.cts} +1 -2
- package/dist/{where-sQL4u5h-.d.ts → where-B8Y21kig.d.ts} +1 -2
- package/dist/{where-C3-HRgUq.d.cts → where-DbZ9XDOI.d.cts} +1 -2
- package/package.json +1 -1
- package/dist/chunk-5YBDB7UG.cjs +0 -12
- package/dist/chunk-CU3LPYNB.js.map +0 -1
- package/dist/chunk-DPNA466P.js.map +0 -1
- package/dist/chunk-H6I36MGT.cjs.map +0 -1
- package/dist/chunk-IMQKXL4E.cjs +0 -12
- package/dist/chunk-K4FB2RMO.cjs.map +0 -1
- package/dist/chunk-SAFZ6JTI.cjs.map +0 -1
- package/dist/chunk-UDS5DZNY.cjs.map +0 -1
- package/dist/chunk-W66YCXWT.js.map +0 -1
- package/dist/extension-types-BLEVH4SG.d.cts +0 -571
- package/dist/extension-types-BLEVH4SG.d.ts +0 -571
- package/dist/materialize-indexes-D4iei4Kp.d.ts +0 -90
- package/dist/materialize-indexes-ExQ6OrAh.d.cts +0 -90
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
3
|
+
var chunkO7XVCLXW_cjs = require('./chunk-O7XVCLXW.cjs');
|
|
4
|
+
var chunk33PAKPED_cjs = require('./chunk-33PAKPED.cjs');
|
|
5
|
+
var chunkAQR6BHB3_cjs = require('./chunk-AQR6BHB3.cjs');
|
|
6
|
+
var chunkOMQ2NBOR_cjs = require('./chunk-OMQ2NBOR.cjs');
|
|
7
|
+
var chunk6TJ6PKPS_cjs = require('./chunk-6TJ6PKPS.cjs');
|
|
8
8
|
var chunkZDH3DX3C_cjs = require('./chunk-ZDH3DX3C.cjs');
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
9
|
+
var chunkECU53PMN_cjs = require('./chunk-ECU53PMN.cjs');
|
|
10
|
+
var chunkAO2WPYFZ_cjs = require('./chunk-AO2WPYFZ.cjs');
|
|
11
|
+
var chunkUTTW2Q3M_cjs = require('./chunk-UTTW2Q3M.cjs');
|
|
12
|
+
var chunkX2XOQZT3_cjs = require('./chunk-X2XOQZT3.cjs');
|
|
13
13
|
var chunk764JHTLT_cjs = require('./chunk-764JHTLT.cjs');
|
|
14
|
-
var
|
|
14
|
+
var chunkKTBTSHU6_cjs = require('./chunk-KTBTSHU6.cjs');
|
|
15
15
|
var drizzleOrm = require('drizzle-orm');
|
|
16
16
|
var pgCore = require('drizzle-orm/pg-core');
|
|
17
17
|
|
|
@@ -46,7 +46,7 @@ var DEFAULT_POSTGRES_STATEMENT_CACHE_MAX = 256;
|
|
|
46
46
|
var STATEMENT_NAME_CACHE = /* @__PURE__ */ new Map();
|
|
47
47
|
var nextStatementId = 0;
|
|
48
48
|
function statementNameFor(sqlText, cacheMax) {
|
|
49
|
-
return
|
|
49
|
+
return chunkO7XVCLXW_cjs.getOrCreateLru(STATEMENT_NAME_CACHE, sqlText, cacheMax, () => {
|
|
50
50
|
const name = `tg_${nextStatementId}`;
|
|
51
51
|
nextStatementId += 1;
|
|
52
52
|
return name;
|
|
@@ -158,7 +158,7 @@ function createPostgresExecutionAdapter(db, options = {}) {
|
|
|
158
158
|
options.useTransactionClient ?? false
|
|
159
159
|
);
|
|
160
160
|
function compile(query) {
|
|
161
|
-
return
|
|
161
|
+
return chunk6TJ6PKPS_cjs.compileQueryWithDialect(db, query, "PostgreSQL");
|
|
162
162
|
}
|
|
163
163
|
if (pgClient === void 0) {
|
|
164
164
|
return {
|
|
@@ -166,7 +166,7 @@ function createPostgresExecutionAdapter(db, options = {}) {
|
|
|
166
166
|
async execute(query) {
|
|
167
167
|
return executeDrizzleQuery(
|
|
168
168
|
db,
|
|
169
|
-
|
|
169
|
+
chunkX2XOQZT3_cjs.isSqlFragment(query) ? chunk6TJ6PKPS_cjs.toDrizzleSql(query, "postgres") : query
|
|
170
170
|
);
|
|
171
171
|
}
|
|
172
172
|
};
|
|
@@ -183,7 +183,7 @@ function createPostgresExecutionAdapter(db, options = {}) {
|
|
|
183
183
|
compile,
|
|
184
184
|
async execute(query) {
|
|
185
185
|
const compiled = compile(query);
|
|
186
|
-
if (
|
|
186
|
+
if (chunkX2XOQZT3_cjs.isSqlFragment(query) && chunkX2XOQZT3_cjs.shouldForceCustomPlan(query)) {
|
|
187
187
|
const result = await pgQueryClient.queryUnnamed(
|
|
188
188
|
compiled.sql,
|
|
189
189
|
compiled.params
|
|
@@ -207,7 +207,7 @@ function createStatementQueue() {
|
|
|
207
207
|
let closed = false;
|
|
208
208
|
return {
|
|
209
209
|
enqueue(task) {
|
|
210
|
-
if (closed) return Promise.reject(new
|
|
210
|
+
if (closed) return Promise.reject(new chunkKTBTSHU6_cjs.TransactionClosedError());
|
|
211
211
|
const result = tail.then(() => task());
|
|
212
212
|
tail = result.then(ignoreOutcome, ignoreOutcome);
|
|
213
213
|
return result;
|
|
@@ -255,57 +255,57 @@ var NODE_INSERT_PARAM_COUNT = 9;
|
|
|
255
255
|
var EDGE_INSERT_PARAM_COUNT = 12;
|
|
256
256
|
var POSTGRES_NODE_INSERT_BATCH_SIZE = Math.max(
|
|
257
257
|
1,
|
|
258
|
-
Math.floor(
|
|
258
|
+
Math.floor(chunkECU53PMN_cjs.POSTGRES_MAX_BIND_PARAMETERS / NODE_INSERT_PARAM_COUNT)
|
|
259
259
|
);
|
|
260
260
|
var POSTGRES_EDGE_INSERT_BATCH_SIZE = Math.max(
|
|
261
261
|
1,
|
|
262
|
-
Math.floor(
|
|
262
|
+
Math.floor(chunkECU53PMN_cjs.POSTGRES_MAX_BIND_PARAMETERS / EDGE_INSERT_PARAM_COUNT)
|
|
263
263
|
);
|
|
264
264
|
var POSTGRES_GET_NODES_ID_CHUNK_SIZE = Math.max(
|
|
265
265
|
1,
|
|
266
|
-
|
|
266
|
+
chunkECU53PMN_cjs.POSTGRES_MAX_BIND_PARAMETERS - 2
|
|
267
267
|
);
|
|
268
268
|
var POSTGRES_GET_EDGES_ID_CHUNK_SIZE = Math.max(
|
|
269
269
|
1,
|
|
270
|
-
|
|
270
|
+
chunkECU53PMN_cjs.POSTGRES_MAX_BIND_PARAMETERS - 1
|
|
271
271
|
);
|
|
272
272
|
var FULLTEXT_UPSERT_PARAM_COUNT = 6;
|
|
273
273
|
var FULLTEXT_DELETE_FIXED_PARAM_COUNT = 2;
|
|
274
274
|
var POSTGRES_FULLTEXT_UPSERT_BATCH_SIZE = Math.max(
|
|
275
275
|
1,
|
|
276
|
-
Math.floor(
|
|
276
|
+
Math.floor(chunkECU53PMN_cjs.POSTGRES_MAX_BIND_PARAMETERS / FULLTEXT_UPSERT_PARAM_COUNT)
|
|
277
277
|
);
|
|
278
278
|
var POSTGRES_FULLTEXT_DELETE_CHUNK_SIZE = Math.max(
|
|
279
279
|
1,
|
|
280
|
-
|
|
280
|
+
chunkECU53PMN_cjs.POSTGRES_MAX_BIND_PARAMETERS - FULLTEXT_DELETE_FIXED_PARAM_COUNT
|
|
281
281
|
);
|
|
282
282
|
var CHECK_UNIQUE_BATCH_FIXED_PARAM_COUNT = 3;
|
|
283
283
|
var POSTGRES_CHECK_UNIQUE_BATCH_CHUNK_SIZE = Math.max(
|
|
284
284
|
1,
|
|
285
|
-
|
|
285
|
+
chunkECU53PMN_cjs.POSTGRES_MAX_BIND_PARAMETERS - CHECK_UNIQUE_BATCH_FIXED_PARAM_COUNT
|
|
286
286
|
);
|
|
287
287
|
var UNIQUE_INSERT_PARAM_COUNT = 6;
|
|
288
288
|
var POSTGRES_UNIQUE_INSERT_BATCH_SIZE = Math.max(
|
|
289
289
|
1,
|
|
290
|
-
Math.floor(
|
|
290
|
+
Math.floor(chunkECU53PMN_cjs.POSTGRES_MAX_BIND_PARAMETERS / UNIQUE_INSERT_PARAM_COUNT)
|
|
291
291
|
);
|
|
292
|
-
var toNodeRow =
|
|
293
|
-
var toEdgeRow =
|
|
294
|
-
var toUniqueRow =
|
|
295
|
-
var toSchemaVersionRow =
|
|
296
|
-
|
|
292
|
+
var toNodeRow = chunkAQR6BHB3_cjs.createNodeRowMapper(chunkAQR6BHB3_cjs.POSTGRES_ROW_MAPPER_CONFIG);
|
|
293
|
+
var toEdgeRow = chunkAQR6BHB3_cjs.createEdgeRowMapper(chunkAQR6BHB3_cjs.POSTGRES_ROW_MAPPER_CONFIG);
|
|
294
|
+
var toUniqueRow = chunkAQR6BHB3_cjs.createUniqueRowMapper(chunkAQR6BHB3_cjs.POSTGRES_ROW_MAPPER_CONFIG);
|
|
295
|
+
var toSchemaVersionRow = chunkAQR6BHB3_cjs.createSchemaVersionRowMapper(
|
|
296
|
+
chunkAQR6BHB3_cjs.POSTGRES_ROW_MAPPER_CONFIG
|
|
297
297
|
);
|
|
298
298
|
function buildPostgresCapabilities(fulltextStrategy, vectorStrategy) {
|
|
299
299
|
return {
|
|
300
|
-
...
|
|
301
|
-
...vectorStrategy === void 0 ? {} : { vector:
|
|
302
|
-
fulltext:
|
|
300
|
+
...chunkECU53PMN_cjs.POSTGRES_CAPABILITIES,
|
|
301
|
+
...vectorStrategy === void 0 ? {} : { vector: chunkUTTW2Q3M_cjs.buildVectorCapabilities(vectorStrategy) },
|
|
302
|
+
fulltext: chunkUTTW2Q3M_cjs.buildFulltextCapabilities(fulltextStrategy)
|
|
303
303
|
};
|
|
304
304
|
}
|
|
305
305
|
function createPostgresBackend(db, options = {}) {
|
|
306
|
-
const tables2 = options.tables ??
|
|
307
|
-
const fulltextStrategy = options.fulltext ??
|
|
308
|
-
const vectorStrategy = options.vector === false ? void 0 : options.vector ??
|
|
306
|
+
const tables2 = options.tables ?? chunkOMQ2NBOR_cjs.tables;
|
|
307
|
+
const fulltextStrategy = options.fulltext ?? chunkUTTW2Q3M_cjs.tsvectorStrategy;
|
|
308
|
+
const vectorStrategy = options.vector === false ? void 0 : options.vector ?? chunk33PAKPED_cjs.pgvectorStrategy;
|
|
309
309
|
const iterativeScanProbe = createIterativeScanProbe();
|
|
310
310
|
const baseCapabilities = buildPostgresCapabilities(
|
|
311
311
|
fulltextStrategy,
|
|
@@ -318,7 +318,7 @@ function createPostgresBackend(db, options = {}) {
|
|
|
318
318
|
supported: false
|
|
319
319
|
}
|
|
320
320
|
} : {};
|
|
321
|
-
const capabilities =
|
|
321
|
+
const capabilities = chunkECU53PMN_cjs.normalizeGraphAnalyticsCapabilities({
|
|
322
322
|
...baseCapabilities,
|
|
323
323
|
...httpOnlyOverrides,
|
|
324
324
|
...options.capabilities
|
|
@@ -344,8 +344,8 @@ function createPostgresBackend(db, options = {}) {
|
|
|
344
344
|
drizzleOrm.getTableName(tables2.uniques),
|
|
345
345
|
tableNames.fulltext
|
|
346
346
|
].map(
|
|
347
|
-
(name) =>
|
|
348
|
-
|
|
347
|
+
(name) => chunk6TJ6PKPS_cjs.toDrizzleSql(
|
|
348
|
+
chunkX2XOQZT3_cjs.sql`ANALYZE (SKIP_LOCKED) ${chunkX2XOQZT3_cjs.sql.identifier(name)}`,
|
|
349
349
|
"postgres"
|
|
350
350
|
)
|
|
351
351
|
);
|
|
@@ -354,11 +354,11 @@ function createPostgresBackend(db, options = {}) {
|
|
|
354
354
|
tableNames.recordedEdges,
|
|
355
355
|
tableNames.recordedClock
|
|
356
356
|
];
|
|
357
|
-
const operationStrategy =
|
|
357
|
+
const operationStrategy = chunkO7XVCLXW_cjs.createPostgresOperationStrategy(
|
|
358
358
|
tables2,
|
|
359
359
|
fulltextStrategy
|
|
360
360
|
);
|
|
361
|
-
const recordedTableExists =
|
|
361
|
+
const recordedTableExists = chunkO7XVCLXW_cjs.createCachedTableExistence(
|
|
362
362
|
async (tableName) => {
|
|
363
363
|
const rows = await executionAdapter.execute(
|
|
364
364
|
operationStrategy.buildTableExists(tableName)
|
|
@@ -369,7 +369,7 @@ function createPostgresBackend(db, options = {}) {
|
|
|
369
369
|
);
|
|
370
370
|
const matTable = tables2.contributionMaterializations;
|
|
371
371
|
async function ensureContributionMaterializationsTableImpl() {
|
|
372
|
-
await db.execute(drizzleOrm.sql.raw(
|
|
372
|
+
await db.execute(drizzleOrm.sql.raw(chunkOMQ2NBOR_cjs.generatePgCreateTableSQL(matTable)));
|
|
373
373
|
}
|
|
374
374
|
async function getContributionMaterializationRow(identity) {
|
|
375
375
|
const rows = await db.select().from(matTable).where(
|
|
@@ -382,25 +382,25 @@ function createPostgresBackend(db, options = {}) {
|
|
|
382
382
|
);
|
|
383
383
|
const row = rows[0];
|
|
384
384
|
if (row === void 0) return void 0;
|
|
385
|
-
return
|
|
385
|
+
return chunkO7XVCLXW_cjs.mapContributionMaterializationRow(
|
|
386
386
|
row,
|
|
387
|
-
|
|
387
|
+
chunkO7XVCLXW_cjs.POSTGRES_CONTRIBUTION_MAT_TIMESTAMPS.decode
|
|
388
388
|
);
|
|
389
389
|
}
|
|
390
390
|
async function getContributionMaterializationRows(graphId) {
|
|
391
391
|
const rows = await db.select().from(matTable).where(drizzleOrm.eq(matTable.graphId, graphId));
|
|
392
392
|
return rows.map(
|
|
393
|
-
(row) =>
|
|
393
|
+
(row) => chunkO7XVCLXW_cjs.mapContributionMaterializationRow(
|
|
394
394
|
row,
|
|
395
|
-
|
|
395
|
+
chunkO7XVCLXW_cjs.POSTGRES_CONTRIBUTION_MAT_TIMESTAMPS.decode
|
|
396
396
|
)
|
|
397
397
|
);
|
|
398
398
|
}
|
|
399
399
|
async function recordContributionMaterializationRow(params) {
|
|
400
400
|
await db.insert(matTable).values(
|
|
401
|
-
|
|
401
|
+
chunkO7XVCLXW_cjs.buildContributionInsertValues(
|
|
402
402
|
params,
|
|
403
|
-
|
|
403
|
+
chunkO7XVCLXW_cjs.POSTGRES_CONTRIBUTION_MAT_TIMESTAMPS.encode
|
|
404
404
|
)
|
|
405
405
|
).onConflictDoUpdate({
|
|
406
406
|
target: [
|
|
@@ -409,7 +409,7 @@ function createPostgresBackend(db, options = {}) {
|
|
|
409
409
|
matTable.owner,
|
|
410
410
|
matTable.tableName
|
|
411
411
|
],
|
|
412
|
-
set:
|
|
412
|
+
set: chunkO7XVCLXW_cjs.buildContributionOnConflictSet(
|
|
413
413
|
matTable.materializedAt,
|
|
414
414
|
params.materializedAt
|
|
415
415
|
)
|
|
@@ -425,7 +425,7 @@ function createPostgresBackend(db, options = {}) {
|
|
|
425
425
|
)
|
|
426
426
|
);
|
|
427
427
|
}
|
|
428
|
-
const contributionMaterializer =
|
|
428
|
+
const contributionMaterializer = chunkO7XVCLXW_cjs.createContributionMaterializer({
|
|
429
429
|
dialect: "postgres",
|
|
430
430
|
fulltextStrategy,
|
|
431
431
|
fulltextTableName: tables2.fulltextTableName,
|
|
@@ -452,7 +452,7 @@ function createPostgresBackend(db, options = {}) {
|
|
|
452
452
|
});
|
|
453
453
|
function runSchemaWriteTransaction(graphId, fn) {
|
|
454
454
|
if (!capabilities.transactions) {
|
|
455
|
-
throw new
|
|
455
|
+
throw new chunkKTBTSHU6_cjs.ConfigurationError(
|
|
456
456
|
"commitSchemaVersion and setActiveVersion require atomic transactions, but this Postgres backend does not provide them. The drizzle-orm/neon-http driver communicates over HTTP and cannot hold a session across statements; use drizzle-orm/neon-serverless (websocket) for transactional writes.",
|
|
457
457
|
{
|
|
458
458
|
backend: "postgres",
|
|
@@ -494,7 +494,7 @@ function createPostgresBackend(db, options = {}) {
|
|
|
494
494
|
iterativeScanProbe
|
|
495
495
|
});
|
|
496
496
|
return {
|
|
497
|
-
backend:
|
|
497
|
+
backend: chunkO7XVCLXW_cjs.gateFulltext(
|
|
498
498
|
backend2,
|
|
499
499
|
contributionMaterializer.assertInitialized
|
|
500
500
|
),
|
|
@@ -512,40 +512,40 @@ function createPostgresBackend(db, options = {}) {
|
|
|
512
512
|
);
|
|
513
513
|
const executeCompiled = trustedExecutionAdapter.executeCompiled;
|
|
514
514
|
if (executeCompiled === void 0) {
|
|
515
|
-
throw new
|
|
515
|
+
throw new chunkKTBTSHU6_cjs.ConfigurationError(
|
|
516
516
|
"Trusted import could not bind raw execution to the PostgreSQL transaction.",
|
|
517
517
|
{ capability: "trustedImport", dialect: "postgres" }
|
|
518
518
|
);
|
|
519
519
|
}
|
|
520
|
-
const trustedTx =
|
|
520
|
+
const trustedTx = chunkECU53PMN_cjs.createBackendOverlay(tx, {
|
|
521
521
|
executeRaw(sqlText, params) {
|
|
522
522
|
return executeCompiled({ params, sql: sqlText });
|
|
523
523
|
}
|
|
524
524
|
});
|
|
525
|
-
await
|
|
526
|
-
await
|
|
527
|
-
const indexDefinitions = await
|
|
525
|
+
await chunkO7XVCLXW_cjs.lockPostgresTrustedImportTables(trustedTx, tableNames);
|
|
526
|
+
await chunkO7XVCLXW_cjs.assertTrustedImportDatabaseEmpty(trustedTx, tableNames);
|
|
527
|
+
const indexDefinitions = await chunkO7XVCLXW_cjs.suspendPostgresSecondaryIndexes(
|
|
528
528
|
trustedTx,
|
|
529
529
|
tableNames
|
|
530
530
|
);
|
|
531
531
|
const result = await fn(
|
|
532
|
-
|
|
532
|
+
chunkO7XVCLXW_cjs.createPostgresTrustedImportSession(trustedTx, tableNames)
|
|
533
533
|
);
|
|
534
|
-
await
|
|
535
|
-
await
|
|
534
|
+
await chunkO7XVCLXW_cjs.restoreSecondaryIndexes(trustedTx, indexDefinitions);
|
|
535
|
+
await chunkO7XVCLXW_cjs.analyzeImportedTables(trustedTx, tableNames);
|
|
536
536
|
return result;
|
|
537
537
|
});
|
|
538
538
|
}
|
|
539
539
|
} : {},
|
|
540
540
|
async bootstrapTables() {
|
|
541
|
-
const statements =
|
|
541
|
+
const statements = chunkOMQ2NBOR_cjs.generatePostgresDDL(tables2, fulltextStrategy);
|
|
542
542
|
for (const statement of statements) {
|
|
543
543
|
await db.execute(drizzleOrm.sql.raw(statement));
|
|
544
544
|
}
|
|
545
545
|
},
|
|
546
546
|
async ensureRevisionOriginsTable() {
|
|
547
547
|
await db.execute(
|
|
548
|
-
drizzleOrm.sql.raw(
|
|
548
|
+
drizzleOrm.sql.raw(chunkOMQ2NBOR_cjs.generatePgCreateTableSQL(tables2.revisionOrigins))
|
|
549
549
|
);
|
|
550
550
|
},
|
|
551
551
|
// Every fulltext-touching method asserts the durable marker instead
|
|
@@ -553,7 +553,7 @@ function createPostgresBackend(db, options = {}) {
|
|
|
553
553
|
// uninitialized database throws `StoreNotInitializedError` loudly
|
|
554
554
|
// rather than self-healing on a read/write path (#135). Shared
|
|
555
555
|
// verbatim with the tx-scoped gate via `gateFulltextMethods`.
|
|
556
|
-
...
|
|
556
|
+
...chunkO7XVCLXW_cjs.gateFulltextMethods(
|
|
557
557
|
operations,
|
|
558
558
|
contributionMaterializer.assertInitialized
|
|
559
559
|
),
|
|
@@ -562,7 +562,7 @@ function createPostgresBackend(db, options = {}) {
|
|
|
562
562
|
},
|
|
563
563
|
async ensureIndexMaterializationsTable() {
|
|
564
564
|
await db.execute(
|
|
565
|
-
drizzleOrm.sql.raw(
|
|
565
|
+
drizzleOrm.sql.raw(chunkOMQ2NBOR_cjs.generatePgCreateTableSQL(tables2.indexMaterializations))
|
|
566
566
|
);
|
|
567
567
|
const tableName = drizzleOrm.getTableName(tables2.indexMaterializations);
|
|
568
568
|
await db.execute(
|
|
@@ -614,26 +614,26 @@ function createPostgresBackend(db, options = {}) {
|
|
|
614
614
|
const rows = await db.select().from(t).where(drizzleOrm.eq(t.indexName, indexName));
|
|
615
615
|
const row = rows[0];
|
|
616
616
|
if (row === void 0) return void 0;
|
|
617
|
-
return
|
|
617
|
+
return chunkO7XVCLXW_cjs.mapMaterializationRow(row, chunkO7XVCLXW_cjs.POSTGRES_INDEX_MAT_TIMESTAMPS.decode);
|
|
618
618
|
},
|
|
619
619
|
async getIndexMaterializations(statusKeys) {
|
|
620
620
|
if (statusKeys.length === 0) return [];
|
|
621
621
|
const t = tables2.indexMaterializations;
|
|
622
622
|
const rows = await db.select().from(t).where(drizzleOrm.inArray(t.indexName, [...statusKeys]));
|
|
623
623
|
return rows.map(
|
|
624
|
-
(row) =>
|
|
624
|
+
(row) => chunkO7XVCLXW_cjs.mapMaterializationRow(row, chunkO7XVCLXW_cjs.POSTGRES_INDEX_MAT_TIMESTAMPS.decode)
|
|
625
625
|
);
|
|
626
626
|
},
|
|
627
627
|
async recordIndexMaterialization(params) {
|
|
628
628
|
const t = tables2.indexMaterializations;
|
|
629
629
|
await db.insert(t).values(
|
|
630
|
-
|
|
630
|
+
chunkO7XVCLXW_cjs.buildMaterializationInsertValues(
|
|
631
631
|
params,
|
|
632
|
-
|
|
632
|
+
chunkO7XVCLXW_cjs.POSTGRES_INDEX_MAT_TIMESTAMPS.encode
|
|
633
633
|
)
|
|
634
634
|
).onConflictDoUpdate({
|
|
635
635
|
target: t.indexName,
|
|
636
|
-
set:
|
|
636
|
+
set: chunkO7XVCLXW_cjs.buildMaterializationOnConflictSet(params.materializedAt)
|
|
637
637
|
});
|
|
638
638
|
},
|
|
639
639
|
async ensureContributionMaterializationsTable() {
|
|
@@ -649,37 +649,37 @@ function createPostgresBackend(db, options = {}) {
|
|
|
649
649
|
await contributionMaterializer.assertInitialized(graphId);
|
|
650
650
|
},
|
|
651
651
|
async ensureKindRemovalsTable() {
|
|
652
|
-
await db.execute(drizzleOrm.sql.raw(
|
|
652
|
+
await db.execute(drizzleOrm.sql.raw(chunkOMQ2NBOR_cjs.generatePgCreateTableSQL(tables2.kindRemovals)));
|
|
653
653
|
},
|
|
654
654
|
async getPendingKindRemovals(graphId) {
|
|
655
655
|
const t = tables2.kindRemovals;
|
|
656
656
|
const rows = await db.select().from(t).where(drizzleOrm.and(drizzleOrm.eq(t.graphId, graphId), drizzleOrm.isNull(t.removedAt)));
|
|
657
657
|
return rows.map(
|
|
658
|
-
(row) =>
|
|
658
|
+
(row) => chunkO7XVCLXW_cjs.mapKindRemovalRow(row, chunkO7XVCLXW_cjs.POSTGRES_KIND_REMOVAL_TIMESTAMPS.decode)
|
|
659
659
|
);
|
|
660
660
|
},
|
|
661
661
|
async getAllKindRemovals(graphId) {
|
|
662
662
|
const t = tables2.kindRemovals;
|
|
663
663
|
const rows = await db.select().from(t).where(drizzleOrm.eq(t.graphId, graphId));
|
|
664
664
|
return rows.map(
|
|
665
|
-
(row) =>
|
|
665
|
+
(row) => chunkO7XVCLXW_cjs.mapKindRemovalRow(row, chunkO7XVCLXW_cjs.POSTGRES_KIND_REMOVAL_TIMESTAMPS.decode)
|
|
666
666
|
);
|
|
667
667
|
},
|
|
668
668
|
async recordKindRemoval(params) {
|
|
669
669
|
const t = tables2.kindRemovals;
|
|
670
670
|
await db.insert(t).values(
|
|
671
|
-
|
|
671
|
+
chunkO7XVCLXW_cjs.buildKindRemovalInsertValues(
|
|
672
672
|
params,
|
|
673
|
-
|
|
673
|
+
chunkO7XVCLXW_cjs.POSTGRES_KIND_REMOVAL_TIMESTAMPS.encode
|
|
674
674
|
)
|
|
675
675
|
).onConflictDoUpdate({
|
|
676
676
|
target: [t.graphId, t.kindName, t.entity, t.schemaVersion],
|
|
677
|
-
set:
|
|
677
|
+
set: chunkO7XVCLXW_cjs.buildKindRemovalOnConflictSet(t.removedAt, params.removedAt)
|
|
678
678
|
});
|
|
679
679
|
},
|
|
680
680
|
async ensureReconciliationMarkersTable() {
|
|
681
681
|
await db.execute(
|
|
682
|
-
drizzleOrm.sql.raw(
|
|
682
|
+
drizzleOrm.sql.raw(chunkOMQ2NBOR_cjs.generatePgCreateTableSQL(tables2.reconciliationMarkers))
|
|
683
683
|
);
|
|
684
684
|
},
|
|
685
685
|
async ensureRuntimeContributions(graphId) {
|
|
@@ -739,8 +739,8 @@ function createPostgresBackend(db, options = {}) {
|
|
|
739
739
|
const presentRecordedTables = tablePresence.filter((entry) => entry.exists).map((entry) => entry.tableName);
|
|
740
740
|
for (const tableName of presentRecordedTables) {
|
|
741
741
|
await db.execute(
|
|
742
|
-
|
|
743
|
-
|
|
742
|
+
chunk6TJ6PKPS_cjs.toDrizzleSql(
|
|
743
|
+
chunkX2XOQZT3_cjs.sql`ANALYZE (SKIP_LOCKED) ${chunkX2XOQZT3_cjs.sql.identifier(tableName)}`,
|
|
744
744
|
"postgres"
|
|
745
745
|
)
|
|
746
746
|
);
|
|
@@ -762,9 +762,9 @@ function createPostgresBackend(db, options = {}) {
|
|
|
762
762
|
return backend.transactionWithNative((tx) => fn(tx), options2);
|
|
763
763
|
},
|
|
764
764
|
async transactionWithNative(fn, options2) {
|
|
765
|
-
const temporaryWrites = options2?.temporaryWrites ===
|
|
765
|
+
const temporaryWrites = options2?.temporaryWrites === chunkECU53PMN_cjs.INTERNAL_TEMPORARY_WRITES;
|
|
766
766
|
if (temporaryWrites && options2.accessMode !== "read_only") {
|
|
767
|
-
throw new
|
|
767
|
+
throw new chunkKTBTSHU6_cjs.ConfigurationError(
|
|
768
768
|
"Temporary-write transactions must be semantically read-only.",
|
|
769
769
|
{ dialect: "postgres" }
|
|
770
770
|
);
|
|
@@ -788,7 +788,7 @@ function createPostgresBackend(db, options = {}) {
|
|
|
788
788
|
},
|
|
789
789
|
adoptTransaction(externalTx) {
|
|
790
790
|
if (!capabilities.transactions) {
|
|
791
|
-
throw new
|
|
791
|
+
throw new chunkKTBTSHU6_cjs.ConfigurationError(
|
|
792
792
|
"Cross-store atomicity is unavailable on this Postgres backend: its driver does not support transactions (drizzle-orm/neon-http, Cloudflare D1). Adopting an external transaction here would let the caller's relational write commit with no way to roll back the graph write. Use a node-postgres or neon-serverless (Pool/WebSocket) connection for cross-store transactions.",
|
|
793
793
|
{
|
|
794
794
|
backend: "postgres",
|
|
@@ -797,7 +797,7 @@ function createPostgresBackend(db, options = {}) {
|
|
|
797
797
|
}
|
|
798
798
|
);
|
|
799
799
|
}
|
|
800
|
-
|
|
800
|
+
chunkO7XVCLXW_cjs.assertAdoptedDialect(
|
|
801
801
|
externalTx,
|
|
802
802
|
pgCore.PgTransaction,
|
|
803
803
|
"postgres"
|
|
@@ -905,7 +905,7 @@ function createPostgresOperationBackend(options) {
|
|
|
905
905
|
async function runVectorSearchGucGroup(overrides, query) {
|
|
906
906
|
const runExclusive = executionAdapter.runExclusive;
|
|
907
907
|
if (runExclusive === void 0) {
|
|
908
|
-
throw new
|
|
908
|
+
throw new chunkKTBTSHU6_cjs.CompilerInvariantError(
|
|
909
909
|
"A transaction-scoped Postgres backend must expose runExclusive; its execution adapter was not wrapped by createSerialExecutionAdapter."
|
|
910
910
|
);
|
|
911
911
|
}
|
|
@@ -957,7 +957,7 @@ function createPostgresOperationBackend(options) {
|
|
|
957
957
|
embeddingUpsertBatchSize: Math.max(
|
|
958
958
|
1,
|
|
959
959
|
Math.floor(
|
|
960
|
-
(capabilities.maxBindParameters ??
|
|
960
|
+
(capabilities.maxBindParameters ?? chunkECU53PMN_cjs.POSTGRES_MAX_BIND_PARAMETERS) / chunkO7XVCLXW_cjs.EMBEDDING_UPSERT_PARAM_COUNT
|
|
961
961
|
)
|
|
962
962
|
),
|
|
963
963
|
getEdgesChunkSize: POSTGRES_GET_EDGES_ID_CHUNK_SIZE,
|
|
@@ -965,14 +965,14 @@ function createPostgresOperationBackend(options) {
|
|
|
965
965
|
nodeInsertBatchSize: POSTGRES_NODE_INSERT_BATCH_SIZE,
|
|
966
966
|
uniqueInsertBatchSize: POSTGRES_UNIQUE_INSERT_BATCH_SIZE
|
|
967
967
|
};
|
|
968
|
-
const commonBackend =
|
|
968
|
+
const commonBackend = chunkO7XVCLXW_cjs.createCommonOperationBackend({
|
|
969
969
|
batchConfig,
|
|
970
970
|
execution: {
|
|
971
971
|
execAll,
|
|
972
972
|
execGet,
|
|
973
973
|
execRun
|
|
974
974
|
},
|
|
975
|
-
nowIso:
|
|
975
|
+
nowIso: chunkAQR6BHB3_cjs.nowIso,
|
|
976
976
|
operationStrategy,
|
|
977
977
|
rowMappers: {
|
|
978
978
|
toEdgeRow,
|
|
@@ -990,26 +990,26 @@ function createPostgresOperationBackend(options) {
|
|
|
990
990
|
};
|
|
991
991
|
const vectorEmbeddingMethods = vectorStrategy === void 0 ? {} : {
|
|
992
992
|
async upsertEmbedding(params) {
|
|
993
|
-
const slot =
|
|
993
|
+
const slot = chunkO7XVCLXW_cjs.vectorSlotFromParams(params);
|
|
994
994
|
await contributionMaterializer.assertVectorSlot(slot);
|
|
995
|
-
const statements = vectorStrategy.buildUpsert(slot, params,
|
|
995
|
+
const statements = vectorStrategy.buildUpsert(slot, params, chunkAQR6BHB3_cjs.nowIso());
|
|
996
996
|
try {
|
|
997
997
|
for (const statement of statements) {
|
|
998
998
|
await execRun(statement);
|
|
999
999
|
}
|
|
1000
1000
|
} catch (error) {
|
|
1001
|
-
throw
|
|
1001
|
+
throw chunkO7XVCLXW_cjs.mapVectorWriteError(error, params);
|
|
1002
1002
|
}
|
|
1003
1003
|
},
|
|
1004
1004
|
async upsertEmbeddingBatch(params) {
|
|
1005
1005
|
if (params.rows.length === 0) return;
|
|
1006
|
-
const slot =
|
|
1006
|
+
const slot = chunkO7XVCLXW_cjs.vectorSlotFromParams(params);
|
|
1007
1007
|
await contributionMaterializer.assertVectorSlot(slot);
|
|
1008
1008
|
const rowsById = new Map(
|
|
1009
1009
|
params.rows.map((row) => [row.nodeId, row])
|
|
1010
1010
|
);
|
|
1011
1011
|
const rows = [...rowsById.values()];
|
|
1012
|
-
const timestamp =
|
|
1012
|
+
const timestamp = chunkAQR6BHB3_cjs.nowIso();
|
|
1013
1013
|
try {
|
|
1014
1014
|
for (const chunk2 of chunkZDH3DX3C_cjs.chunk(
|
|
1015
1015
|
rows,
|
|
@@ -1040,11 +1040,11 @@ function createPostgresOperationBackend(options) {
|
|
|
1040
1040
|
}
|
|
1041
1041
|
}
|
|
1042
1042
|
} catch (error) {
|
|
1043
|
-
throw
|
|
1043
|
+
throw chunkO7XVCLXW_cjs.mapVectorWriteError(error, params);
|
|
1044
1044
|
}
|
|
1045
1045
|
},
|
|
1046
1046
|
async deleteEmbedding(params) {
|
|
1047
|
-
const slot =
|
|
1047
|
+
const slot = chunkO7XVCLXW_cjs.vectorSlotFromParams(params);
|
|
1048
1048
|
await contributionMaterializer.assertVectorSlot(slot);
|
|
1049
1049
|
const statements = vectorStrategy.buildDelete(slot, params);
|
|
1050
1050
|
for (const statement of statements) {
|
|
@@ -1052,19 +1052,19 @@ function createPostgresOperationBackend(options) {
|
|
|
1052
1052
|
}
|
|
1053
1053
|
},
|
|
1054
1054
|
async vectorSearch(params) {
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
const slot =
|
|
1055
|
+
chunkUTTW2Q3M_cjs.assertVectorSearchLimit(params.limit);
|
|
1056
|
+
chunk33PAKPED_cjs.assertPgvectorEfSearch(params.efSearch);
|
|
1057
|
+
const slot = chunkO7XVCLXW_cjs.vectorSlotFromParams(params);
|
|
1058
1058
|
const query = vectorStrategy.buildSearch(
|
|
1059
1059
|
slot,
|
|
1060
1060
|
params,
|
|
1061
1061
|
// Store-compiled candidates (predicates + subclass + currency)
|
|
1062
1062
|
// take precedence; the live-node default covers direct backend use.
|
|
1063
|
-
params.candidates ??
|
|
1063
|
+
params.candidates ?? chunkO7XVCLXW_cjs.buildLiveNodeCandidates(
|
|
1064
1064
|
tableNames.nodes,
|
|
1065
1065
|
params.graphId,
|
|
1066
1066
|
params.nodeKind,
|
|
1067
|
-
|
|
1067
|
+
chunkAQR6BHB3_cjs.nowIso()
|
|
1068
1068
|
)
|
|
1069
1069
|
);
|
|
1070
1070
|
const gucOverrides = await vectorSearchGucOverrides(params);
|
|
@@ -1072,7 +1072,7 @@ function createPostgresOperationBackend(options) {
|
|
|
1072
1072
|
try {
|
|
1073
1073
|
rows = await runVectorSearch(gucOverrides, query);
|
|
1074
1074
|
} catch (error) {
|
|
1075
|
-
throw
|
|
1075
|
+
throw chunkO7XVCLXW_cjs.mapVectorWriteError(error, params);
|
|
1076
1076
|
}
|
|
1077
1077
|
return rows.map((row) => ({
|
|
1078
1078
|
nodeId: row.node_id,
|
|
@@ -1084,10 +1084,10 @@ function createPostgresOperationBackend(options) {
|
|
|
1084
1084
|
// multi-statement fallback by simply not exposing the member.
|
|
1085
1085
|
...capabilities.windowFunctions ? {
|
|
1086
1086
|
async hybridSearch(params) {
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
const slot =
|
|
1087
|
+
chunkUTTW2Q3M_cjs.assertVectorSearchLimit(params.limit);
|
|
1088
|
+
chunkUTTW2Q3M_cjs.assertVectorSearchLimit(params.vector.k);
|
|
1089
|
+
chunk33PAKPED_cjs.assertPgvectorEfSearch(params.vector.efSearch);
|
|
1090
|
+
const slot = chunkO7XVCLXW_cjs.vectorSlotFromParams({
|
|
1091
1091
|
graphId: params.graphId,
|
|
1092
1092
|
nodeKind: params.nodeKind,
|
|
1093
1093
|
fieldPath: params.vector.fieldPath,
|
|
@@ -1095,11 +1095,11 @@ function createPostgresOperationBackend(options) {
|
|
|
1095
1095
|
metric: params.vector.metric,
|
|
1096
1096
|
indexType: params.vector.indexType
|
|
1097
1097
|
});
|
|
1098
|
-
const candidates = params.candidates ??
|
|
1098
|
+
const candidates = params.candidates ?? chunkO7XVCLXW_cjs.buildLiveNodeCandidates(
|
|
1099
1099
|
tableNames.nodes,
|
|
1100
1100
|
params.graphId,
|
|
1101
1101
|
params.nodeKind,
|
|
1102
|
-
|
|
1102
|
+
chunkAQR6BHB3_cjs.nowIso()
|
|
1103
1103
|
);
|
|
1104
1104
|
const vectorParams = {
|
|
1105
1105
|
graphId: params.graphId,
|
|
@@ -1115,11 +1115,11 @@ function createPostgresOperationBackend(options) {
|
|
|
1115
1115
|
const vectorSql = vectorStrategy.buildSearch(
|
|
1116
1116
|
slot,
|
|
1117
1117
|
vectorParams,
|
|
1118
|
-
|
|
1118
|
+
chunkX2XOQZT3_cjs.sql.raw("SELECT node_id FROM tg_hybrid_cand")
|
|
1119
1119
|
);
|
|
1120
1120
|
const statement = operationStrategy.buildHybridSearch(
|
|
1121
1121
|
{ ...params, candidates },
|
|
1122
|
-
|
|
1122
|
+
chunk6TJ6PKPS_cjs.toDrizzleSql(vectorSql, "postgres"),
|
|
1123
1123
|
params.vector.metric === "cosine"
|
|
1124
1124
|
);
|
|
1125
1125
|
const gucOverrides = await vectorSearchGucOverrides({
|
|
@@ -1133,9 +1133,9 @@ function createPostgresOperationBackend(options) {
|
|
|
1133
1133
|
statement
|
|
1134
1134
|
);
|
|
1135
1135
|
} catch (error) {
|
|
1136
|
-
throw
|
|
1136
|
+
throw chunkO7XVCLXW_cjs.mapVectorWriteError(error, vectorParams);
|
|
1137
1137
|
}
|
|
1138
|
-
return raw.map((row) =>
|
|
1138
|
+
return raw.map((row) => chunkO7XVCLXW_cjs.mapHybridSearchRow(row, toNodeRow));
|
|
1139
1139
|
}
|
|
1140
1140
|
} : {}
|
|
1141
1141
|
};
|
|
@@ -1151,7 +1151,7 @@ function createPostgresOperationBackend(options) {
|
|
|
1151
1151
|
// === Vector Index Operations ===
|
|
1152
1152
|
async createVectorIndex(params) {
|
|
1153
1153
|
if (vectorStrategy === void 0) return;
|
|
1154
|
-
const slot =
|
|
1154
|
+
const slot = chunkO7XVCLXW_cjs.vectorSlotFromCreateIndexParams(params);
|
|
1155
1155
|
await contributionMaterializer.ensureVectorSlot(slot);
|
|
1156
1156
|
const indexStatement = vectorStrategy.buildCreateIndex?.(slot, {
|
|
1157
1157
|
concurrent: params.concurrent === true
|
|
@@ -1160,12 +1160,12 @@ function createPostgresOperationBackend(options) {
|
|
|
1160
1160
|
try {
|
|
1161
1161
|
await execRun(indexStatement);
|
|
1162
1162
|
} catch (error) {
|
|
1163
|
-
if (!
|
|
1163
|
+
if (!chunkAO2WPYFZ_cjs.isInsufficientResourcesError(error)) throw error;
|
|
1164
1164
|
const dropStatement = vectorStrategy.buildDropIndex?.(slot);
|
|
1165
1165
|
if (dropStatement !== void 0) {
|
|
1166
1166
|
await execRun(dropStatement);
|
|
1167
1167
|
}
|
|
1168
|
-
const table =
|
|
1168
|
+
const table = chunkX2XOQZT3_cjs.sql.identifier(
|
|
1169
1169
|
vectorStrategy.tableName(
|
|
1170
1170
|
slot.graphId,
|
|
1171
1171
|
slot.nodeKind,
|
|
@@ -1173,13 +1173,13 @@ function createPostgresOperationBackend(options) {
|
|
|
1173
1173
|
)
|
|
1174
1174
|
);
|
|
1175
1175
|
await execRun(
|
|
1176
|
-
|
|
1176
|
+
chunkX2XOQZT3_cjs.sql`ALTER TABLE ${table} SET (parallel_workers = 0)`
|
|
1177
1177
|
);
|
|
1178
1178
|
try {
|
|
1179
1179
|
await execRun(indexStatement);
|
|
1180
1180
|
} finally {
|
|
1181
1181
|
await execRun(
|
|
1182
|
-
|
|
1182
|
+
chunkX2XOQZT3_cjs.sql`ALTER TABLE ${table} RESET (parallel_workers)`
|
|
1183
1183
|
);
|
|
1184
1184
|
}
|
|
1185
1185
|
}
|
|
@@ -1187,7 +1187,7 @@ function createPostgresOperationBackend(options) {
|
|
|
1187
1187
|
},
|
|
1188
1188
|
// === Fulltext Operations ===
|
|
1189
1189
|
async upsertFulltext(params) {
|
|
1190
|
-
const timestamp =
|
|
1190
|
+
const timestamp = chunkAQR6BHB3_cjs.nowIso();
|
|
1191
1191
|
const statements = operationStrategy.buildUpsertFulltext(
|
|
1192
1192
|
params,
|
|
1193
1193
|
timestamp
|
|
@@ -1204,7 +1204,7 @@ function createPostgresOperationBackend(options) {
|
|
|
1204
1204
|
},
|
|
1205
1205
|
async upsertFulltextBatch(params) {
|
|
1206
1206
|
if (params.rows.length === 0) return;
|
|
1207
|
-
const timestamp =
|
|
1207
|
+
const timestamp = chunkAQR6BHB3_cjs.nowIso();
|
|
1208
1208
|
for (const rows of chunkZDH3DX3C_cjs.chunk(
|
|
1209
1209
|
params.rows,
|
|
1210
1210
|
POSTGRES_FULLTEXT_UPSERT_BATCH_SIZE
|
|
@@ -1238,25 +1238,25 @@ function createPostgresOperationBackend(options) {
|
|
|
1238
1238
|
const rows = await execAll(query);
|
|
1239
1239
|
return rows.map((row, index) => ({
|
|
1240
1240
|
nodeId: row.node_id,
|
|
1241
|
-
score:
|
|
1241
|
+
score: chunkAQR6BHB3_cjs.coerceNumericScore(row.score),
|
|
1242
1242
|
rank: index + 1,
|
|
1243
1243
|
...row.snippet === null ? {} : { snippet: row.snippet }
|
|
1244
1244
|
}));
|
|
1245
1245
|
},
|
|
1246
1246
|
async dropVectorIndex(params) {
|
|
1247
1247
|
if (vectorStrategy === void 0) return;
|
|
1248
|
-
const slot =
|
|
1248
|
+
const slot = chunkO7XVCLXW_cjs.vectorSlotFromDropIndexParams(params);
|
|
1249
1249
|
const dropStatement = vectorStrategy.buildDropIndex?.(slot);
|
|
1250
1250
|
if (dropStatement === void 0) return;
|
|
1251
1251
|
try {
|
|
1252
1252
|
await execRun(dropStatement);
|
|
1253
1253
|
} catch (error) {
|
|
1254
|
-
if (!
|
|
1254
|
+
if (!chunkAO2WPYFZ_cjs.isMissingTableError(error)) throw error;
|
|
1255
1255
|
}
|
|
1256
1256
|
},
|
|
1257
1257
|
// === Query Execution ===
|
|
1258
1258
|
async execute(query) {
|
|
1259
|
-
const annTypes =
|
|
1259
|
+
const annTypes = chunkX2XOQZT3_cjs.isSqlFragment(query) ? chunkX2XOQZT3_cjs.annIndexScanTypes(query) : void 0;
|
|
1260
1260
|
if (annTypes !== void 0 && vectorStrategy !== void 0) {
|
|
1261
1261
|
const overrides = [];
|
|
1262
1262
|
for (const indexType of annTypes) {
|
|
@@ -1295,5 +1295,5 @@ function createTransactionBackend(options) {
|
|
|
1295
1295
|
}
|
|
1296
1296
|
|
|
1297
1297
|
exports.createPostgresBackend = createPostgresBackend;
|
|
1298
|
-
//# sourceMappingURL=chunk-
|
|
1299
|
-
//# sourceMappingURL=chunk-
|
|
1298
|
+
//# sourceMappingURL=chunk-7TOT7RKY.cjs.map
|
|
1299
|
+
//# sourceMappingURL=chunk-7TOT7RKY.cjs.map
|