@nicia-ai/typegraph 0.43.0 → 0.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/backend/drizzle/indexes.cjs +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 +32 -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 +28 -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 +33 -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 +29 -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-2OOY4OYT.js → chunk-2L54C2C2.js} +4 -4
- package/dist/{chunk-2OOY4OYT.js.map → chunk-2L54C2C2.js.map} +1 -1
- package/dist/{chunk-4WYFRACU.js → chunk-42PYUGLS.js} +58 -4
- package/dist/chunk-42PYUGLS.js.map +1 -0
- package/dist/{chunk-EQOQOT55.js → chunk-4GUBTVPV.js} +4 -5
- package/dist/chunk-4GUBTVPV.js.map +1 -0
- package/dist/{chunk-ZIRC2U6G.js → chunk-4GUTQPVO.js} +102 -16
- package/dist/chunk-4GUTQPVO.js.map +1 -0
- package/dist/{chunk-OYJSYDIH.js → chunk-4MB3AQAQ.js} +13 -3
- package/dist/chunk-4MB3AQAQ.js.map +1 -0
- package/dist/{chunk-5Q3P6OIC.cjs → chunk-4MEWSUVM.cjs} +12 -12
- package/dist/chunk-4MEWSUVM.cjs.map +1 -0
- package/dist/{chunk-VC26BUNP.js → chunk-4QIKLIGG.js} +17 -5
- package/dist/chunk-4QIKLIGG.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-UZLEQFTV.js → chunk-55ITBQJI.js} +4 -4
- package/dist/chunk-55ITBQJI.js.map +1 -0
- package/dist/{chunk-JOYPNY33.js → chunk-5EKPX6QU.js} +9 -9
- package/dist/{chunk-JOYPNY33.js.map → chunk-5EKPX6QU.js.map} +1 -1
- package/dist/{chunk-TRC646QQ.cjs → chunk-5GAONX5G.cjs} +7 -7
- package/dist/{chunk-TRC646QQ.cjs.map → chunk-5GAONX5G.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-64LERBFM.cjs → chunk-6RYPD3NJ.cjs} +75 -65
- package/dist/chunk-6RYPD3NJ.cjs.map +1 -0
- package/dist/{chunk-5AERZSHC.cjs → chunk-7PF2L3H6.cjs} +4 -4
- package/dist/{chunk-5AERZSHC.cjs.map → chunk-7PF2L3H6.cjs.map} +1 -1
- package/dist/chunk-B3F2D3SP.cjs +12 -0
- package/dist/{chunk-U3YRCZ5L.cjs.map → chunk-B3F2D3SP.cjs.map} +1 -1
- package/dist/{chunk-Z3WIL6S3.js → chunk-BGYJW37L.js} +5 -5
- package/dist/{chunk-Z3WIL6S3.js.map → chunk-BGYJW37L.js.map} +1 -1
- package/dist/{chunk-DMZEVJGL.cjs → chunk-BNS75YNF.cjs} +12 -13
- package/dist/chunk-BNS75YNF.cjs.map +1 -0
- package/dist/{chunk-KTBTSHU6.cjs → chunk-C4F7VJ5D.cjs} +13 -3
- package/dist/chunk-C4F7VJ5D.cjs.map +1 -0
- package/dist/{chunk-L2BYRYHC.js → chunk-CBKG6HEP.js} +43 -33
- package/dist/chunk-CBKG6HEP.js.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-O2GZM7UK.cjs → chunk-D54WH24V.cjs} +62 -7
- package/dist/chunk-D54WH24V.cjs.map +1 -0
- package/dist/{chunk-33PAKPED.cjs → chunk-D56XG4EI.cjs} +53 -41
- package/dist/chunk-D56XG4EI.cjs.map +1 -0
- 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-HHBKGPEI.js → chunk-DXEEHSGN.js} +517 -26
- package/dist/chunk-DXEEHSGN.js.map +1 -0
- package/dist/{chunk-UJRWOV5B.js → chunk-EFEOOCJ3.js} +5 -5
- package/dist/{chunk-UJRWOV5B.js.map → chunk-EFEOOCJ3.js.map} +1 -1
- package/dist/{chunk-ECU53PMN.cjs → chunk-EKFUG4G7.cjs} +5 -5
- package/dist/chunk-EKFUG4G7.cjs.map +1 -0
- 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-AQR6BHB3.cjs → chunk-F4NHQHEZ.cjs} +10 -10
- package/dist/{chunk-AQR6BHB3.cjs.map → chunk-F4NHQHEZ.cjs.map} +1 -1
- package/dist/{chunk-2G6ZEGYO.js → chunk-FL5UQRES.js} +4 -4
- package/dist/{chunk-2G6ZEGYO.js.map → chunk-FL5UQRES.js.map} +1 -1
- package/dist/{chunk-ZP2KPDNN.js → chunk-FLEQ2HBK.js} +3 -3
- package/dist/{chunk-ZP2KPDNN.js.map → chunk-FLEQ2HBK.js.map} +1 -1
- package/dist/{chunk-RAWG2FEU.js → chunk-FQ7ZPOTZ.js} +264 -18
- package/dist/chunk-FQ7ZPOTZ.js.map +1 -0
- package/dist/{chunk-O7XVCLXW.cjs → chunk-H7VE3FL4.cjs} +577 -82
- package/dist/chunk-H7VE3FL4.cjs.map +1 -0
- package/dist/{chunk-JNXZQBN3.js → chunk-ID4WXTKL.js} +1039 -482
- package/dist/chunk-ID4WXTKL.js.map +1 -0
- package/dist/{chunk-ZGOUVMVS.js → chunk-ISLPNELU.js} +17 -5
- package/dist/chunk-ISLPNELU.js.map +1 -0
- package/dist/{chunk-I73ATSAH.cjs → chunk-IX64T5OL.cjs} +4 -4
- package/dist/{chunk-I73ATSAH.cjs.map → chunk-IX64T5OL.cjs.map} +1 -1
- package/dist/{chunk-XDMPDUKL.cjs → chunk-J2ICGNHO.cjs} +8 -9
- package/dist/chunk-J2ICGNHO.cjs.map +1 -0
- package/dist/{chunk-KDRF3NR2.cjs → chunk-J7LXTUTP.cjs} +295 -201
- package/dist/chunk-J7LXTUTP.cjs.map +1 -0
- package/dist/{chunk-AO2WPYFZ.cjs → chunk-JQXSZHF2.cjs} +14 -4
- package/dist/chunk-JQXSZHF2.cjs.map +1 -0
- package/dist/{chunk-UTTW2Q3M.cjs → chunk-JXUTCSXX.cjs} +197 -133
- package/dist/chunk-JXUTCSXX.cjs.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-7Y6BV3TK.cjs → chunk-KMXWZLQX.cjs} +100 -100
- package/dist/{chunk-7Y6BV3TK.cjs.map → chunk-KMXWZLQX.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-FFQGI67R.cjs → chunk-NAAMUYMS.cjs} +56 -44
- package/dist/chunk-NAAMUYMS.cjs.map +1 -0
- package/dist/{chunk-6TJ6PKPS.cjs → chunk-OOA273IJ.cjs} +27 -27
- package/dist/{chunk-6TJ6PKPS.cjs.map → chunk-OOA273IJ.cjs.map} +1 -1
- package/dist/{chunk-F2KVJ6FF.cjs → chunk-P7GTYOLB.cjs} +203 -117
- package/dist/chunk-P7GTYOLB.cjs.map +1 -0
- package/dist/{chunk-42XYPKZU.js → chunk-PVUI6KGR.js} +67 -3
- package/dist/chunk-PVUI6KGR.js.map +1 -0
- package/dist/{chunk-L5AUCL5P.js → chunk-Q6EDCUXV.js} +274 -14
- package/dist/chunk-Q6EDCUXV.js.map +1 -0
- 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-3RPQDGUE.cjs → chunk-QC4MCOFV.cjs} +5 -5
- package/dist/{chunk-3RPQDGUE.cjs.map → chunk-QC4MCOFV.cjs.map} +1 -1
- package/dist/{chunk-4XRP2N6B.js → chunk-QLUXRWKL.js} +3 -3
- package/dist/{chunk-4XRP2N6B.js.map → chunk-QLUXRWKL.js.map} +1 -1
- package/dist/{chunk-OM6RIOA5.cjs → chunk-QR24DJDF.cjs} +13 -13
- package/dist/{chunk-OM6RIOA5.cjs.map → chunk-QR24DJDF.cjs.map} +1 -1
- package/dist/{chunk-YPVQYM3L.js → chunk-QRNYDV5Z.js} +138 -31
- package/dist/chunk-QRNYDV5Z.js.map +1 -0
- 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-5C75HQYQ.js → chunk-RFRM3Q5K.js} +17 -5
- package/dist/chunk-RFRM3Q5K.js.map +1 -0
- package/dist/{chunk-NXIZL7ZZ.js → chunk-RUQS6M7G.js} +6 -6
- package/dist/chunk-RUQS6M7G.js.map +1 -0
- package/dist/{chunk-CI5NPLXX.js → chunk-S3ZRKJHY.js} +3 -3
- package/dist/{chunk-CI5NPLXX.js.map → chunk-S3ZRKJHY.js.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-CTWZPYJW.js → chunk-TKORQCG4.js} +108 -15
- package/dist/chunk-TKORQCG4.js.map +1 -0
- package/dist/{chunk-2HKIID5K.js → chunk-TKP5T34P.js} +4 -5
- package/dist/chunk-TKP5T34P.js.map +1 -0
- package/dist/{chunk-X2XOQZT3.cjs → chunk-U5W4LKZV.cjs} +13 -9
- package/dist/chunk-U5W4LKZV.cjs.map +1 -0
- package/dist/{chunk-BLBG2VZ5.cjs → chunk-UCQ3BFSY.cjs} +372 -110
- package/dist/chunk-UCQ3BFSY.cjs.map +1 -0
- package/dist/{chunk-CUPJL6TS.js → chunk-V34A6R5V.js} +13 -4
- package/dist/chunk-V34A6R5V.js.map +1 -0
- package/dist/{chunk-LQLVJWUH.js → chunk-VTN3C3CH.js} +7 -7
- package/dist/chunk-VTN3C3CH.js.map +1 -0
- package/dist/{chunk-FY4VY5EV.cjs → chunk-VVQM4CZD.cjs} +20 -20
- package/dist/chunk-VVQM4CZD.cjs.map +1 -0
- package/dist/{chunk-LDCWO5B6.js → chunk-WDAVPX46.js} +3 -3
- package/dist/{chunk-LDCWO5B6.js.map → chunk-WDAVPX46.js.map} +1 -1
- package/dist/{chunk-5GV4JQNA.cjs → chunk-WDBXJOU5.cjs} +55 -43
- package/dist/chunk-WDBXJOU5.cjs.map +1 -0
- package/dist/{chunk-FMPZPOUD.js → chunk-WUFASQUO.js} +3 -3
- package/dist/{chunk-FMPZPOUD.js.map → chunk-WUFASQUO.js.map} +1 -1
- package/dist/{chunk-5ZPRE4CV.cjs → chunk-YDWLUT5V.cjs} +237 -130
- package/dist/chunk-YDWLUT5V.cjs.map +1 -0
- package/dist/{chunk-CVNGKTHO.js → chunk-YMTXMPV6.js} +4 -4
- package/dist/{chunk-CVNGKTHO.js.map → chunk-YMTXMPV6.js.map} +1 -1
- package/dist/{chunk-NDQLPKBX.cjs → chunk-YOALGKRE.cjs} +2092 -1535
- package/dist/chunk-YOALGKRE.cjs.map +1 -0
- package/dist/{chunk-OMQ2NBOR.cjs → chunk-Z3WO6MND.cjs} +27 -27
- package/dist/{chunk-OMQ2NBOR.cjs.map → chunk-Z3WO6MND.cjs.map} +1 -1
- package/dist/{chunk-V2GZBPY2.cjs → chunk-ZI6VQSZA.cjs} +310 -61
- package/dist/chunk-ZI6VQSZA.cjs.map +1 -0
- 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 +27 -28
- package/dist/core/index.d.cts +5 -5
- package/dist/core/index.d.ts +5 -5
- package/dist/core/index.js +7 -8
- package/dist/{ddl-3unqC-kg.d.cts → ddl-BG4J805L.d.cts} +3 -3
- package/dist/{ddl-Bc4Dl8fu.d.ts → ddl-CgiS9QLj.d.ts} +3 -3
- package/dist/{define-graph-DBFnc7u_.d.ts → define-graph-BGrJahvp.d.ts} +1 -1
- package/dist/{define-graph-Byslw2OO.d.cts → define-graph-alREY2wj.d.cts} +1 -1
- package/dist/graph-extension/index.cjs +19 -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 +4 -5
- package/dist/graph-merge/index.cjs +103 -104
- package/dist/graph-merge/index.cjs.map +1 -1
- package/dist/graph-merge/index.d.cts +9 -8
- package/dist/graph-merge/index.d.ts +9 -8
- package/dist/graph-merge/index.js +23 -24
- package/dist/graph-merge/index.js.map +1 -1
- package/dist/{index-DHXw7QAl.d.cts → index-BBxZCUdu.d.ts} +37 -7
- package/dist/{index-DQzVJBHa.d.ts → index-C3y_98iN.d.cts} +37 -7
- package/dist/index.cjs +209 -202
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -13
- package/dist/index.d.ts +13 -13
- package/dist/index.js +33 -34
- package/dist/index.js.map +1 -1
- 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 +50 -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 +24 -15
- package/dist/interchange/index.js.map +1 -1
- package/dist/{manager-U9_zopqr.d.cts → manager-KS7CGQQT.d.cts} +44 -6
- package/dist/{manager-Dl0-er1G.d.ts → manager-YoLEfcc1.d.ts} +44 -6
- package/dist/{materialize-indexes-BM3u0aXE.d.ts → materialize-indexes-Bhhyb1B3.d.ts} +1 -1
- package/dist/{materialize-indexes-DzMCetZe.d.cts → materialize-indexes-OHRWypW6.d.cts} +1 -1
- package/dist/{postgres-DpJqtbSX.d.cts → postgres-DpkW3R5Y.d.cts} +1 -1
- package/dist/{postgres-C5-WMKFA.d.ts → postgres-DwqyIniy.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 +40 -41
- package/dist/schema/index.d.cts +7 -7
- package/dist/schema/index.d.ts +7 -7
- package/dist/schema/index.js +13 -14
- package/dist/{searchable-B4mUXZT6.d.cts → searchable-CIZL8Hyw.d.cts} +2 -2
- package/dist/{searchable-C7jmPNLT.d.ts → searchable-DLWEfC4a.d.ts} +2 -2
- package/dist/{sqlite-Ch5tSYQY.d.ts → sqlite-DY0WODUK.d.cts} +1 -1
- package/dist/{sqlite-Da7jiYu9.d.cts → sqlite-L-VIRzqA.d.ts} +1 -1
- package/dist/{store-view-DdwBNjZQ.d.ts → store-view-66p92IPi.d.ts} +1974 -1751
- package/dist/{store-view-D1F6KqsE.d.cts → store-view-A85FFRnk.d.cts} +1974 -1751
- package/dist/{temporal-CMpigMCW.d.cts → temporal-BNbjXqer.d.cts} +1 -1
- package/dist/{temporal-BtrTYTiB.d.ts → temporal-Bob6Nfbp.d.ts} +1 -1
- package/dist/{types-Dh-EgT-w.d.cts → types-Ch9a0Dx6.d.cts} +483 -20
- package/dist/{types-Dh-EgT-w.d.ts → types-Ch9a0Dx6.d.ts} +483 -20
- package/dist/{types-D2rU5Taq.d.ts → types-ClCzT-dT.d.ts} +1 -1
- package/dist/{types-G4sVM-76.d.cts → types-DeORZhxn.d.cts} +1 -1
- package/dist/{where-DbZ9XDOI.d.cts → where-DPw52ksb.d.cts} +1 -1
- package/dist/{where-B8Y21kig.d.ts → where-kWUZPvEA.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/chunk-2HKIID5K.js.map +0 -1
- package/dist/chunk-33PAKPED.cjs.map +0 -1
- package/dist/chunk-42XYPKZU.js.map +0 -1
- package/dist/chunk-4WYFRACU.js.map +0 -1
- package/dist/chunk-5C75HQYQ.js.map +0 -1
- package/dist/chunk-5GV4JQNA.cjs.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-AO2WPYFZ.cjs.map +0 -1
- package/dist/chunk-BLBG2VZ5.cjs.map +0 -1
- package/dist/chunk-CTWZPYJW.js.map +0 -1
- package/dist/chunk-CUPJL6TS.js.map +0 -1
- package/dist/chunk-DMZEVJGL.cjs.map +0 -1
- package/dist/chunk-ECU53PMN.cjs.map +0 -1
- package/dist/chunk-EQOQOT55.js.map +0 -1
- package/dist/chunk-F2KVJ6FF.cjs.map +0 -1
- package/dist/chunk-F7TDKSVB.cjs +0 -61
- package/dist/chunk-F7TDKSVB.cjs.map +0 -1
- package/dist/chunk-FFQGI67R.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-O2GZM7UK.cjs.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-RXOAXO3R.js +0 -59
- package/dist/chunk-RXOAXO3R.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-VC26BUNP.js.map +0 -1
- package/dist/chunk-VGMNGWBR.cjs +0 -12
- package/dist/chunk-X2XOQZT3.cjs.map +0 -1
- package/dist/chunk-XDMPDUKL.cjs.map +0 -1
- package/dist/chunk-YPVQYM3L.js.map +0 -1
- package/dist/chunk-ZGOUVMVS.js.map +0 -1
- package/dist/chunk-ZIRC2U6G.js.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
3
|
+
var chunkZ3WO6MND_cjs = require('./chunk-Z3WO6MND.cjs');
|
|
4
|
+
var chunkCPEL3YIR_cjs = require('./chunk-CPEL3YIR.cjs');
|
|
5
|
+
var chunkEQ7JKLZO_cjs = require('./chunk-EQ7JKLZO.cjs');
|
|
6
|
+
var chunkZTAJL4DT_cjs = require('./chunk-ZTAJL4DT.cjs');
|
|
7
|
+
var chunkJXUTCSXX_cjs = require('./chunk-JXUTCSXX.cjs');
|
|
8
|
+
var chunkU5W4LKZV_cjs = require('./chunk-U5W4LKZV.cjs');
|
|
9
|
+
var chunkC4F7VJ5D_cjs = require('./chunk-C4F7VJ5D.cjs');
|
|
10
10
|
|
|
11
11
|
// src/backend/migrate-recorded-time.ts
|
|
12
12
|
var LEGACY_RECORDED_MAX = "9999-12-31T23:59:59.999Z";
|
|
@@ -53,24 +53,24 @@ var RECORDED_EDGE_COLUMNS = [
|
|
|
53
53
|
"meta"
|
|
54
54
|
];
|
|
55
55
|
function resolvedTableNames(backend, override) {
|
|
56
|
-
return
|
|
56
|
+
return chunkCPEL3YIR_cjs.createSqlSchema(override ?? backend.tableNames ?? {}).tables;
|
|
57
57
|
}
|
|
58
58
|
function shortenedIdentifier(value) {
|
|
59
59
|
if (value.length <= 63) return value;
|
|
60
|
-
return `${value.slice(0, 50)}_${
|
|
60
|
+
return `${value.slice(0, 50)}_${chunkJXUTCSXX_cjs.shortHash(value)}`;
|
|
61
61
|
}
|
|
62
62
|
function mappingTableName(tables, override) {
|
|
63
63
|
const candidate = override ?? `${tables.recordedClock}_${MIGRATION_SUFFIX}`;
|
|
64
|
-
return
|
|
64
|
+
return chunkCPEL3YIR_cjs.createSqlSchema({
|
|
65
65
|
recordedClock: shortenedIdentifier(candidate)
|
|
66
66
|
}).tables.recordedClock;
|
|
67
67
|
}
|
|
68
68
|
function temporaryTableName(tableName, role) {
|
|
69
|
-
return shortenedIdentifier(`__tg_${role}_${
|
|
69
|
+
return shortenedIdentifier(`__tg_${role}_${chunkJXUTCSXX_cjs.shortHash(tableName)}`);
|
|
70
70
|
}
|
|
71
71
|
function requireStatements(target) {
|
|
72
72
|
if (target.executeStatement === void 0) {
|
|
73
|
-
throw new
|
|
73
|
+
throw new chunkC4F7VJ5D_cjs.ConfigurationError(
|
|
74
74
|
"Recorded-time migration requires executeStatement support.",
|
|
75
75
|
{ dialect: target.dialect },
|
|
76
76
|
{ suggestion: "Use a built-in SQLite or PostgreSQL backend." }
|
|
@@ -79,15 +79,15 @@ function requireStatements(target) {
|
|
|
79
79
|
return target.executeStatement;
|
|
80
80
|
}
|
|
81
81
|
async function executeStatement(target, statement) {
|
|
82
|
-
await requireStatements(target)(
|
|
82
|
+
await requireStatements(target)(chunkU5W4LKZV_cjs.asCompiledStatementSql(statement));
|
|
83
83
|
}
|
|
84
84
|
async function executeDdl(target, ddl) {
|
|
85
|
-
await executeStatement(target,
|
|
85
|
+
await executeStatement(target, chunkU5W4LKZV_cjs.sql.raw(ddl));
|
|
86
86
|
}
|
|
87
87
|
function canonicalLegacyInstant(value) {
|
|
88
|
-
const canonical =
|
|
88
|
+
const canonical = chunkZTAJL4DT_cjs.canonicalizeDatabaseTimestamp(value);
|
|
89
89
|
if (canonical === void 0) {
|
|
90
|
-
throw new
|
|
90
|
+
throw new chunkC4F7VJ5D_cjs.ConfigurationError(
|
|
91
91
|
"Legacy recorded-time relation contained an invalid timestamp.",
|
|
92
92
|
{ value }
|
|
93
93
|
);
|
|
@@ -96,8 +96,8 @@ function canonicalLegacyInstant(value) {
|
|
|
96
96
|
}
|
|
97
97
|
function safeRevision(value) {
|
|
98
98
|
const revision = typeof value === "bigint" ? Number(value) : typeof value === "string" && /^\d+$/.test(value) ? Number(value) : value;
|
|
99
|
-
if (typeof revision !== "number" || !Number.isSafeInteger(revision) || revision < 1 || revision >=
|
|
100
|
-
throw new
|
|
99
|
+
if (typeof revision !== "number" || !Number.isSafeInteger(revision) || revision < 1 || revision >= chunkEQ7JKLZO_cjs.RECORDED_MAX_REVISION) {
|
|
100
|
+
throw new chunkC4F7VJ5D_cjs.ConfigurationError(
|
|
101
101
|
"Recorded anchor mapping contained an invalid revision.",
|
|
102
102
|
{ value }
|
|
103
103
|
);
|
|
@@ -106,9 +106,9 @@ function safeRevision(value) {
|
|
|
106
106
|
}
|
|
107
107
|
async function columnNames(target, tableName) {
|
|
108
108
|
const rows = target.dialect === "sqlite" ? await target.execute(
|
|
109
|
-
|
|
109
|
+
chunkU5W4LKZV_cjs.asCompiledRowsSql(chunkU5W4LKZV_cjs.sql`PRAGMA table_info(${chunkU5W4LKZV_cjs.sql.identifier(tableName)})`)
|
|
110
110
|
) : await target.execute(
|
|
111
|
-
|
|
111
|
+
chunkU5W4LKZV_cjs.asCompiledRowsSql(chunkU5W4LKZV_cjs.sql`
|
|
112
112
|
SELECT column_name AS name
|
|
113
113
|
FROM information_schema.columns
|
|
114
114
|
WHERE table_schema = current_schema()
|
|
@@ -121,28 +121,28 @@ async function columnNames(target, tableName) {
|
|
|
121
121
|
}
|
|
122
122
|
async function readLegacyInstants(target, tables) {
|
|
123
123
|
const rows = await target.execute(
|
|
124
|
-
|
|
124
|
+
chunkU5W4LKZV_cjs.asCompiledRowsSql(chunkU5W4LKZV_cjs.sql`
|
|
125
125
|
SELECT graph_id, recorded_from AS recorded_at
|
|
126
|
-
FROM ${
|
|
126
|
+
FROM ${chunkU5W4LKZV_cjs.sql.identifier(tables.recordedNodes)}
|
|
127
127
|
UNION
|
|
128
128
|
SELECT graph_id, recorded_to AS recorded_at
|
|
129
|
-
FROM ${
|
|
129
|
+
FROM ${chunkU5W4LKZV_cjs.sql.identifier(tables.recordedNodes)}
|
|
130
130
|
WHERE recorded_to <> ${LEGACY_RECORDED_MAX}
|
|
131
131
|
UNION
|
|
132
132
|
SELECT graph_id, recorded_from AS recorded_at
|
|
133
|
-
FROM ${
|
|
133
|
+
FROM ${chunkU5W4LKZV_cjs.sql.identifier(tables.recordedEdges)}
|
|
134
134
|
UNION
|
|
135
135
|
SELECT graph_id, recorded_to AS recorded_at
|
|
136
|
-
FROM ${
|
|
136
|
+
FROM ${chunkU5W4LKZV_cjs.sql.identifier(tables.recordedEdges)}
|
|
137
137
|
WHERE recorded_to <> ${LEGACY_RECORDED_MAX}
|
|
138
138
|
UNION
|
|
139
139
|
SELECT graph_id, recorded_at
|
|
140
|
-
FROM ${
|
|
140
|
+
FROM ${chunkU5W4LKZV_cjs.sql.identifier(tables.recordedClock)}
|
|
141
141
|
`)
|
|
142
142
|
);
|
|
143
143
|
const instants = rows.map((row) => {
|
|
144
144
|
if (typeof row.graph_id !== "string") {
|
|
145
|
-
throw new
|
|
145
|
+
throw new chunkC4F7VJ5D_cjs.ConfigurationError(
|
|
146
146
|
"Legacy recorded-time relation contained an invalid graph id.",
|
|
147
147
|
{ graphId: row.graph_id }
|
|
148
148
|
);
|
|
@@ -193,38 +193,38 @@ function migrationMapDdl(dialect, table) {
|
|
|
193
193
|
);`;
|
|
194
194
|
}
|
|
195
195
|
async function writeMappingRows(target, tableName, rows) {
|
|
196
|
-
await executeStatement(target,
|
|
196
|
+
await executeStatement(target, chunkU5W4LKZV_cjs.sql`DELETE FROM ${chunkU5W4LKZV_cjs.sql.identifier(tableName)}`);
|
|
197
197
|
const rowsPerStatement = Math.max(
|
|
198
198
|
1,
|
|
199
199
|
Math.floor((target.capabilities.maxBindParameters ?? 900) / 4)
|
|
200
200
|
);
|
|
201
201
|
for (let start = 0; start < rows.length; start += rowsPerStatement) {
|
|
202
202
|
const values = rows.slice(start, start + rowsPerStatement).map(
|
|
203
|
-
(row) =>
|
|
203
|
+
(row) => chunkU5W4LKZV_cjs.sql`(${row.graphId}, ${row.legacyRecordedAt}, ${row.revision}, ${row.recordedAt})`
|
|
204
204
|
);
|
|
205
205
|
await executeStatement(
|
|
206
206
|
target,
|
|
207
|
-
|
|
208
|
-
INSERT INTO ${
|
|
207
|
+
chunkU5W4LKZV_cjs.sql`
|
|
208
|
+
INSERT INTO ${chunkU5W4LKZV_cjs.sql.identifier(tableName)}
|
|
209
209
|
(graph_id, legacy_recorded_at, revision, recorded_at)
|
|
210
|
-
VALUES ${
|
|
210
|
+
VALUES ${chunkU5W4LKZV_cjs.sql.join(values, chunkU5W4LKZV_cjs.sql`, `)}
|
|
211
211
|
`
|
|
212
212
|
);
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
215
|
function tableDdl(dialect, tables, temporary) {
|
|
216
216
|
if (dialect === "sqlite") {
|
|
217
|
-
const temporaryTables2 =
|
|
218
|
-
const finalTables2 =
|
|
219
|
-
const temporaryContributions =
|
|
220
|
-
const finalContributions =
|
|
217
|
+
const temporaryTables2 = chunkZ3WO6MND_cjs.createSqliteTables(temporary);
|
|
218
|
+
const finalTables2 = chunkZ3WO6MND_cjs.createSqliteTables(tables);
|
|
219
|
+
const temporaryContributions = chunkZ3WO6MND_cjs.sqliteContributions(temporaryTables2);
|
|
220
|
+
const finalContributions = chunkZ3WO6MND_cjs.sqliteContributions(finalTables2);
|
|
221
221
|
return ddlForRecordedTables(temporaryContributions, finalContributions);
|
|
222
222
|
}
|
|
223
|
-
const temporaryTables =
|
|
224
|
-
const finalTables =
|
|
223
|
+
const temporaryTables = chunkZ3WO6MND_cjs.createPostgresTables(temporary);
|
|
224
|
+
const finalTables = chunkZ3WO6MND_cjs.createPostgresTables(tables);
|
|
225
225
|
return ddlForRecordedTables(
|
|
226
|
-
|
|
227
|
-
|
|
226
|
+
chunkZ3WO6MND_cjs.postgresContributions(temporaryTables),
|
|
227
|
+
chunkZ3WO6MND_cjs.postgresContributions(finalTables)
|
|
228
228
|
);
|
|
229
229
|
}
|
|
230
230
|
function ddlForRecordedTables(temporary, final) {
|
|
@@ -236,13 +236,13 @@ function ddlForRecordedTables(temporary, final) {
|
|
|
236
236
|
(entry) => entry.logicalName === logicalName
|
|
237
237
|
)?.createDdl;
|
|
238
238
|
if (temporaryDdl === void 0 || finalDdl === void 0) {
|
|
239
|
-
throw new
|
|
239
|
+
throw new chunkC4F7VJ5D_cjs.ConfigurationError(
|
|
240
240
|
`Could not generate migration DDL for ${logicalName}.`
|
|
241
241
|
);
|
|
242
242
|
}
|
|
243
243
|
const createTable = temporaryDdl[0];
|
|
244
244
|
if (createTable === void 0) {
|
|
245
|
-
throw new
|
|
245
|
+
throw new chunkC4F7VJ5D_cjs.ConfigurationError(
|
|
246
246
|
`Could not generate migration table DDL for ${logicalName}.`
|
|
247
247
|
);
|
|
248
248
|
}
|
|
@@ -255,27 +255,27 @@ function ddlForRecordedTables(temporary, final) {
|
|
|
255
255
|
};
|
|
256
256
|
}
|
|
257
257
|
function migratedColumn(column, legacyAlias) {
|
|
258
|
-
if (column === "recorded_from") return
|
|
258
|
+
if (column === "recorded_from") return chunkU5W4LKZV_cjs.sql`from_map.revision`;
|
|
259
259
|
if (column === "recorded_to") {
|
|
260
|
-
return
|
|
260
|
+
return chunkU5W4LKZV_cjs.sql`
|
|
261
261
|
CASE
|
|
262
|
-
WHEN ${
|
|
263
|
-
THEN ${
|
|
262
|
+
WHEN ${chunkU5W4LKZV_cjs.sql.raw(legacyAlias)}.recorded_to = ${LEGACY_RECORDED_MAX}
|
|
263
|
+
THEN ${chunkEQ7JKLZO_cjs.RECORDED_MAX_REVISION}
|
|
264
264
|
ELSE to_map.revision
|
|
265
265
|
END
|
|
266
266
|
`;
|
|
267
267
|
}
|
|
268
|
-
return
|
|
268
|
+
return chunkU5W4LKZV_cjs.sql`${chunkU5W4LKZV_cjs.sql.raw(legacyAlias)}.${chunkU5W4LKZV_cjs.sql.identifier(column)}`;
|
|
269
269
|
}
|
|
270
270
|
function mappingMatch(dialect, mappingAlias, legacyColumn) {
|
|
271
|
-
const mapping =
|
|
272
|
-
const legacy =
|
|
273
|
-
return dialect === "postgres" ?
|
|
271
|
+
const mapping = chunkU5W4LKZV_cjs.sql.raw(mappingAlias);
|
|
272
|
+
const legacy = chunkU5W4LKZV_cjs.sql.raw(`legacy.${legacyColumn}`);
|
|
273
|
+
return dialect === "postgres" ? chunkU5W4LKZV_cjs.sql`${mapping}.recorded_at = ${legacy}` : chunkU5W4LKZV_cjs.sql`${mapping}.legacy_recorded_at = ${legacy}`;
|
|
274
274
|
}
|
|
275
275
|
function missingMappingCount(value, legacyTable) {
|
|
276
276
|
const count = Number(value);
|
|
277
277
|
if (!Number.isSafeInteger(count) || count < 0) {
|
|
278
|
-
throw new
|
|
278
|
+
throw new chunkC4F7VJ5D_cjs.ConfigurationError(
|
|
279
279
|
"Recorded-time migration returned an invalid integrity-check count.",
|
|
280
280
|
{ legacyTable, value }
|
|
281
281
|
);
|
|
@@ -286,12 +286,12 @@ async function assertRecordedRelationMappings(target, options) {
|
|
|
286
286
|
const fromMatch = mappingMatch(target.dialect, "from_map", "recorded_from");
|
|
287
287
|
const toMatch = mappingMatch(target.dialect, "to_map", "recorded_to");
|
|
288
288
|
const rows = await target.execute(
|
|
289
|
-
|
|
289
|
+
chunkU5W4LKZV_cjs.asCompiledRowsSql(chunkU5W4LKZV_cjs.sql`
|
|
290
290
|
SELECT COUNT(*) AS missing
|
|
291
|
-
FROM ${
|
|
292
|
-
LEFT JOIN ${
|
|
291
|
+
FROM ${chunkU5W4LKZV_cjs.sql.identifier(options.legacyTable)} AS legacy
|
|
292
|
+
LEFT JOIN ${chunkU5W4LKZV_cjs.sql.identifier(options.mappingTable)} AS from_map
|
|
293
293
|
ON from_map.graph_id = legacy.graph_id AND ${fromMatch}
|
|
294
|
-
LEFT JOIN ${
|
|
294
|
+
LEFT JOIN ${chunkU5W4LKZV_cjs.sql.identifier(options.mappingTable)} AS to_map
|
|
295
295
|
ON to_map.graph_id = legacy.graph_id AND ${toMatch}
|
|
296
296
|
WHERE from_map.revision IS NULL
|
|
297
297
|
OR (
|
|
@@ -302,7 +302,7 @@ async function assertRecordedRelationMappings(target, options) {
|
|
|
302
302
|
);
|
|
303
303
|
const missing = missingMappingCount(rows[0]?.missing, options.legacyTable);
|
|
304
304
|
if (missing === 0) return;
|
|
305
|
-
throw new
|
|
305
|
+
throw new chunkC4F7VJ5D_cjs.ConfigurationError(
|
|
306
306
|
"Legacy recorded-time boundaries could not be mapped exactly.",
|
|
307
307
|
{ legacyTable: options.legacyTable, missingRows: missing },
|
|
308
308
|
{
|
|
@@ -313,17 +313,17 @@ async function assertRecordedRelationMappings(target, options) {
|
|
|
313
313
|
async function assertRecordedClockMappings(target, options) {
|
|
314
314
|
const match = mappingMatch(target.dialect, "anchor_map", "recorded_at");
|
|
315
315
|
const rows = await target.execute(
|
|
316
|
-
|
|
316
|
+
chunkU5W4LKZV_cjs.asCompiledRowsSql(chunkU5W4LKZV_cjs.sql`
|
|
317
317
|
SELECT COUNT(*) AS missing
|
|
318
|
-
FROM ${
|
|
319
|
-
LEFT JOIN ${
|
|
318
|
+
FROM ${chunkU5W4LKZV_cjs.sql.identifier(options.legacyTable)} AS legacy
|
|
319
|
+
LEFT JOIN ${chunkU5W4LKZV_cjs.sql.identifier(options.mappingTable)} AS anchor_map
|
|
320
320
|
ON anchor_map.graph_id = legacy.graph_id AND ${match}
|
|
321
321
|
WHERE anchor_map.revision IS NULL
|
|
322
322
|
`)
|
|
323
323
|
);
|
|
324
324
|
const missing = missingMappingCount(rows[0]?.missing, options.legacyTable);
|
|
325
325
|
if (missing === 0) return;
|
|
326
|
-
throw new
|
|
326
|
+
throw new chunkC4F7VJ5D_cjs.ConfigurationError(
|
|
327
327
|
"Legacy recorded clock values could not be mapped exactly.",
|
|
328
328
|
{ legacyTable: options.legacyTable, missingRows: missing },
|
|
329
329
|
{
|
|
@@ -332,7 +332,7 @@ async function assertRecordedClockMappings(target, options) {
|
|
|
332
332
|
);
|
|
333
333
|
}
|
|
334
334
|
async function copyRecordedRelation(target, options) {
|
|
335
|
-
const columnList = options.columns.map((column) =>
|
|
335
|
+
const columnList = options.columns.map((column) => chunkU5W4LKZV_cjs.sql.identifier(column));
|
|
336
336
|
const values = options.columns.map(
|
|
337
337
|
(column) => migratedColumn(column, "legacy")
|
|
338
338
|
);
|
|
@@ -341,16 +341,16 @@ async function copyRecordedRelation(target, options) {
|
|
|
341
341
|
const toMatch = mappingMatch(target.dialect, "to_map", "recorded_to");
|
|
342
342
|
await executeStatement(
|
|
343
343
|
target,
|
|
344
|
-
|
|
345
|
-
INSERT INTO ${
|
|
346
|
-
(${
|
|
347
|
-
SELECT ${
|
|
348
|
-
FROM ${
|
|
344
|
+
chunkU5W4LKZV_cjs.sql`
|
|
345
|
+
INSERT INTO ${chunkU5W4LKZV_cjs.sql.identifier(options.temporaryTable)}
|
|
346
|
+
(${chunkU5W4LKZV_cjs.sql.join(columnList, chunkU5W4LKZV_cjs.sql`, `)})
|
|
347
|
+
SELECT ${chunkU5W4LKZV_cjs.sql.join(values, chunkU5W4LKZV_cjs.sql`, `)}
|
|
348
|
+
FROM ${chunkU5W4LKZV_cjs.sql.identifier(options.legacyTable)} AS legacy
|
|
349
349
|
-- LEFT JOIN is deliberate: a missing mapping reaches the NOT NULL
|
|
350
350
|
-- revision columns and fails loud instead of silently dropping history.
|
|
351
|
-
LEFT JOIN ${
|
|
351
|
+
LEFT JOIN ${chunkU5W4LKZV_cjs.sql.identifier(options.mappingTable)} AS from_map
|
|
352
352
|
ON from_map.graph_id = legacy.graph_id AND ${fromMatch}
|
|
353
|
-
LEFT JOIN ${
|
|
353
|
+
LEFT JOIN ${chunkU5W4LKZV_cjs.sql.identifier(options.mappingTable)} AS to_map
|
|
354
354
|
ON to_map.graph_id = legacy.graph_id AND ${toMatch}
|
|
355
355
|
`
|
|
356
356
|
);
|
|
@@ -360,13 +360,13 @@ async function copyRecordedClock(target, options) {
|
|
|
360
360
|
const match = mappingMatch(target.dialect, "anchor_map", "recorded_at");
|
|
361
361
|
await executeStatement(
|
|
362
362
|
target,
|
|
363
|
-
|
|
364
|
-
INSERT INTO ${
|
|
363
|
+
chunkU5W4LKZV_cjs.sql`
|
|
364
|
+
INSERT INTO ${chunkU5W4LKZV_cjs.sql.identifier(options.temporaryTable)}
|
|
365
365
|
(graph_id, revision, recorded_at)
|
|
366
366
|
SELECT legacy.graph_id, anchor_map.revision, legacy.recorded_at
|
|
367
|
-
FROM ${
|
|
367
|
+
FROM ${chunkU5W4LKZV_cjs.sql.identifier(options.legacyTable)} AS legacy
|
|
368
368
|
-- Preserve fail-loud behavior if the preflight invariant changes later.
|
|
369
|
-
LEFT JOIN ${
|
|
369
|
+
LEFT JOIN ${chunkU5W4LKZV_cjs.sql.identifier(options.mappingTable)} AS anchor_map
|
|
370
370
|
ON anchor_map.graph_id = legacy.graph_id AND ${match}
|
|
371
371
|
`
|
|
372
372
|
);
|
|
@@ -381,7 +381,7 @@ async function replaceLegacyTables(target, tables, mappingTable) {
|
|
|
381
381
|
for (const table of Object.values(temporary)) {
|
|
382
382
|
await executeStatement(
|
|
383
383
|
target,
|
|
384
|
-
|
|
384
|
+
chunkU5W4LKZV_cjs.sql`DROP TABLE IF EXISTS ${chunkU5W4LKZV_cjs.sql.identifier(table)}`
|
|
385
385
|
);
|
|
386
386
|
}
|
|
387
387
|
await executeDdl(target, requireCreateTable(ddl.nodes));
|
|
@@ -406,15 +406,15 @@ async function replaceLegacyTables(target, tables, mappingTable) {
|
|
|
406
406
|
});
|
|
407
407
|
await executeStatement(
|
|
408
408
|
target,
|
|
409
|
-
|
|
409
|
+
chunkU5W4LKZV_cjs.sql`DROP TABLE ${chunkU5W4LKZV_cjs.sql.identifier(tables.recordedNodes)}`
|
|
410
410
|
);
|
|
411
411
|
await executeStatement(
|
|
412
412
|
target,
|
|
413
|
-
|
|
413
|
+
chunkU5W4LKZV_cjs.sql`DROP TABLE ${chunkU5W4LKZV_cjs.sql.identifier(tables.recordedEdges)}`
|
|
414
414
|
);
|
|
415
415
|
await executeStatement(
|
|
416
416
|
target,
|
|
417
|
-
|
|
417
|
+
chunkU5W4LKZV_cjs.sql`DROP TABLE ${chunkU5W4LKZV_cjs.sql.identifier(tables.recordedClock)}`
|
|
418
418
|
);
|
|
419
419
|
await renameTable(target, temporary.recordedNodes, tables.recordedNodes);
|
|
420
420
|
await renameTable(target, temporary.recordedEdges, tables.recordedEdges);
|
|
@@ -446,17 +446,17 @@ async function renamePrimaryKeyConstraint(target, temporaryTable, finalTable) {
|
|
|
446
446
|
if (target.dialect !== "postgres") return;
|
|
447
447
|
await executeStatement(
|
|
448
448
|
target,
|
|
449
|
-
|
|
450
|
-
ALTER TABLE ${
|
|
451
|
-
RENAME CONSTRAINT ${
|
|
452
|
-
TO ${
|
|
449
|
+
chunkU5W4LKZV_cjs.sql`
|
|
450
|
+
ALTER TABLE ${chunkU5W4LKZV_cjs.sql.identifier(finalTable)}
|
|
451
|
+
RENAME CONSTRAINT ${chunkU5W4LKZV_cjs.sql.identifier(`${temporaryTable}_pkey`)}
|
|
452
|
+
TO ${chunkU5W4LKZV_cjs.sql.identifier(shortenedIdentifier(`${finalTable}_pkey`))}
|
|
453
453
|
`
|
|
454
454
|
);
|
|
455
455
|
}
|
|
456
456
|
function requireCreateTable(statements) {
|
|
457
457
|
const statement = statements[0];
|
|
458
458
|
if (statement === void 0) {
|
|
459
|
-
throw new
|
|
459
|
+
throw new chunkC4F7VJ5D_cjs.ConfigurationError("Recorded migration table DDL was empty.");
|
|
460
460
|
}
|
|
461
461
|
return statement;
|
|
462
462
|
}
|
|
@@ -464,10 +464,10 @@ async function renameTable(target, from, to) {
|
|
|
464
464
|
try {
|
|
465
465
|
await executeStatement(
|
|
466
466
|
target,
|
|
467
|
-
|
|
467
|
+
chunkU5W4LKZV_cjs.sql`ALTER TABLE ${chunkU5W4LKZV_cjs.sql.identifier(from)} RENAME TO ${chunkU5W4LKZV_cjs.sql.identifier(to)}`
|
|
468
468
|
);
|
|
469
469
|
} catch (error) {
|
|
470
|
-
throw new
|
|
470
|
+
throw new chunkC4F7VJ5D_cjs.ConfigurationError(
|
|
471
471
|
"Could not rename a migrated recorded-time table.",
|
|
472
472
|
{ from, to },
|
|
473
473
|
{ cause: error }
|
|
@@ -498,9 +498,9 @@ async function migrateLegacyRecordedTime(options) {
|
|
|
498
498
|
};
|
|
499
499
|
}
|
|
500
500
|
const rows = await target.execute(
|
|
501
|
-
|
|
501
|
+
chunkU5W4LKZV_cjs.asCompiledRowsSql(chunkU5W4LKZV_cjs.sql`
|
|
502
502
|
SELECT COUNT(*) AS anchors, COUNT(DISTINCT graph_id) AS graphs
|
|
503
|
-
FROM ${
|
|
503
|
+
FROM ${chunkU5W4LKZV_cjs.sql.identifier(mapTable)}
|
|
504
504
|
`)
|
|
505
505
|
);
|
|
506
506
|
const anchors = Number(rows[0]?.anchors ?? 0);
|
|
@@ -515,7 +515,7 @@ async function migrateLegacyRecordedTime(options) {
|
|
|
515
515
|
const nodeColumns = await columnNames(target, tables.recordedNodes);
|
|
516
516
|
const edgeColumns = await columnNames(target, tables.recordedEdges);
|
|
517
517
|
if (!nodeColumns.has("recorded_from") || !edgeColumns.has("recorded_from")) {
|
|
518
|
-
throw new
|
|
518
|
+
throw new chunkC4F7VJ5D_cjs.ConfigurationError(
|
|
519
519
|
"Legacy recorded-time schema is incomplete.",
|
|
520
520
|
{ tables }
|
|
521
521
|
);
|
|
@@ -534,24 +534,24 @@ async function migrateLegacyRecordedTime(options) {
|
|
|
534
534
|
}
|
|
535
535
|
async function migrateRecordedAnchor(options) {
|
|
536
536
|
try {
|
|
537
|
-
return
|
|
537
|
+
return chunkEQ7JKLZO_cjs.asRecordedInstant(options.anchor);
|
|
538
538
|
} catch (error) {
|
|
539
|
-
if (!(error instanceof
|
|
539
|
+
if (!(error instanceof chunkC4F7VJ5D_cjs.ValidationError)) throw error;
|
|
540
540
|
}
|
|
541
541
|
const legacyRecordedAt = canonicalLegacyInstant(options.anchor);
|
|
542
542
|
const tables = resolvedTableNames(options.backend, options.tableNames);
|
|
543
543
|
const mapTable = mappingTableName(tables, options.mappingTableName);
|
|
544
544
|
const rows = await options.backend.execute(
|
|
545
|
-
|
|
545
|
+
chunkU5W4LKZV_cjs.asCompiledRowsSql(chunkU5W4LKZV_cjs.sql`
|
|
546
546
|
SELECT revision, recorded_at
|
|
547
|
-
FROM ${
|
|
547
|
+
FROM ${chunkU5W4LKZV_cjs.sql.identifier(mapTable)}
|
|
548
548
|
WHERE graph_id = ${options.graphId}
|
|
549
549
|
AND legacy_recorded_at = ${legacyRecordedAt}
|
|
550
550
|
`)
|
|
551
551
|
);
|
|
552
552
|
const row = rows[0];
|
|
553
553
|
if (row === void 0) {
|
|
554
|
-
throw new
|
|
554
|
+
throw new chunkC4F7VJ5D_cjs.ConfigurationError(
|
|
555
555
|
"No migrated recorded anchor matches this graph and legacy timestamp.",
|
|
556
556
|
{ anchor: options.anchor, graphId: options.graphId },
|
|
557
557
|
{
|
|
@@ -559,14 +559,14 @@ async function migrateRecordedAnchor(options) {
|
|
|
559
559
|
}
|
|
560
560
|
);
|
|
561
561
|
}
|
|
562
|
-
return
|
|
562
|
+
return chunkEQ7JKLZO_cjs.createRecordedInstant(
|
|
563
563
|
safeRevision(row.revision),
|
|
564
564
|
canonicalLegacyInstant(row.recorded_at)
|
|
565
565
|
);
|
|
566
566
|
}
|
|
567
567
|
async function deleteLegacyRecordedAnchorMap(options) {
|
|
568
568
|
if (options.backend.executeStatement === void 0) {
|
|
569
|
-
throw new
|
|
569
|
+
throw new chunkC4F7VJ5D_cjs.ConfigurationError(
|
|
570
570
|
"Deleting a recorded anchor migration map requires executeStatement support.",
|
|
571
571
|
{ dialect: options.backend.dialect }
|
|
572
572
|
);
|
|
@@ -576,23 +576,23 @@ async function deleteLegacyRecordedAnchorMap(options) {
|
|
|
576
576
|
await options.backend.transaction(async (target) => {
|
|
577
577
|
await executeStatement(
|
|
578
578
|
target,
|
|
579
|
-
|
|
580
|
-
DELETE FROM ${
|
|
579
|
+
chunkU5W4LKZV_cjs.sql`
|
|
580
|
+
DELETE FROM ${chunkU5W4LKZV_cjs.sql.identifier(mapTable)}
|
|
581
581
|
WHERE graph_id = ${options.graphId}
|
|
582
582
|
`
|
|
583
583
|
);
|
|
584
584
|
if (options.dropWhenEmpty !== true) return;
|
|
585
585
|
const rows = await target.execute(
|
|
586
|
-
|
|
586
|
+
chunkU5W4LKZV_cjs.asCompiledRowsSql(chunkU5W4LKZV_cjs.sql`
|
|
587
587
|
SELECT COUNT(*) AS anchors, COUNT(DISTINCT graph_id) AS graphs
|
|
588
|
-
FROM ${
|
|
588
|
+
FROM ${chunkU5W4LKZV_cjs.sql.identifier(mapTable)}
|
|
589
589
|
`)
|
|
590
590
|
);
|
|
591
591
|
const remaining = missingMappingCount(rows[0]?.anchors, mapTable);
|
|
592
592
|
if (remaining === 0) {
|
|
593
593
|
await executeStatement(
|
|
594
594
|
target,
|
|
595
|
-
|
|
595
|
+
chunkU5W4LKZV_cjs.sql`DROP TABLE ${chunkU5W4LKZV_cjs.sql.identifier(mapTable)}`
|
|
596
596
|
);
|
|
597
597
|
}
|
|
598
598
|
});
|
|
@@ -601,5 +601,5 @@ async function deleteLegacyRecordedAnchorMap(options) {
|
|
|
601
601
|
exports.deleteLegacyRecordedAnchorMap = deleteLegacyRecordedAnchorMap;
|
|
602
602
|
exports.migrateLegacyRecordedTime = migrateLegacyRecordedTime;
|
|
603
603
|
exports.migrateRecordedAnchor = migrateRecordedAnchor;
|
|
604
|
-
//# sourceMappingURL=chunk-
|
|
605
|
-
//# sourceMappingURL=chunk-
|
|
604
|
+
//# sourceMappingURL=chunk-KMXWZLQX.cjs.map
|
|
605
|
+
//# sourceMappingURL=chunk-KMXWZLQX.cjs.map
|