@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,16 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
3
|
+
var chunk2SO5I5AI_cjs = require('./chunk-2SO5I5AI.cjs');
|
|
4
|
+
var chunkCVK4T34X_cjs = require('./chunk-CVK4T34X.cjs');
|
|
5
|
+
var chunkECU53PMN_cjs = require('./chunk-ECU53PMN.cjs');
|
|
6
|
+
var chunkARN3ZODS_cjs = require('./chunk-ARN3ZODS.cjs');
|
|
7
7
|
var chunkACSVZPK7_cjs = require('./chunk-ACSVZPK7.cjs');
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
8
|
+
var chunkZBV4LQD2_cjs = require('./chunk-ZBV4LQD2.cjs');
|
|
9
|
+
var chunkUTTW2Q3M_cjs = require('./chunk-UTTW2Q3M.cjs');
|
|
10
|
+
var chunkX2XOQZT3_cjs = require('./chunk-X2XOQZT3.cjs');
|
|
11
11
|
var chunk764JHTLT_cjs = require('./chunk-764JHTLT.cjs');
|
|
12
|
-
var
|
|
13
|
-
var
|
|
12
|
+
var chunkO2GZM7UK_cjs = require('./chunk-O2GZM7UK.cjs');
|
|
13
|
+
var chunkKTBTSHU6_cjs = require('./chunk-KTBTSHU6.cjs');
|
|
14
14
|
var chunkTDXIBCGY_cjs = require('./chunk-TDXIBCGY.cjs');
|
|
15
15
|
|
|
16
16
|
// src/store/row-mappers.ts
|
|
@@ -18,8 +18,8 @@ function nullToUndefined(value) {
|
|
|
18
18
|
return value === null ? void 0 : value;
|
|
19
19
|
}
|
|
20
20
|
function rowToNode(row) {
|
|
21
|
-
const rawProps =
|
|
22
|
-
const props =
|
|
21
|
+
const rawProps = chunkECU53PMN_cjs.rowPropsToObject(row.props);
|
|
22
|
+
const props = chunkO2GZM7UK_cjs.filterReservedKeys(rawProps, chunkO2GZM7UK_cjs.RESERVED_NODE_KEYS);
|
|
23
23
|
return {
|
|
24
24
|
kind: row.kind,
|
|
25
25
|
id: row.id,
|
|
@@ -38,8 +38,8 @@ function rowToNodeMeta(row) {
|
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
40
|
function rowToEdge(row) {
|
|
41
|
-
const rawProps =
|
|
42
|
-
const props =
|
|
41
|
+
const rawProps = chunkECU53PMN_cjs.rowPropsToObject(row.props);
|
|
42
|
+
const props = chunkO2GZM7UK_cjs.filterReservedKeys(rawProps, chunkO2GZM7UK_cjs.RESERVED_EDGE_KEYS);
|
|
43
43
|
return {
|
|
44
44
|
id: row.id,
|
|
45
45
|
kind: row.kind,
|
|
@@ -64,11 +64,11 @@ function rowToEdgeMeta(row) {
|
|
|
64
64
|
// src/store/operations/write-transaction.ts
|
|
65
65
|
function runInWriteTransaction(ctx, backend, fn) {
|
|
66
66
|
const ownsWriteLock = "transaction" in backend && backend.capabilities.transactions;
|
|
67
|
-
return
|
|
68
|
-
const lock = ctx.historyEnabled || ctx.revisionTrackingEnabled ? await
|
|
67
|
+
return chunkECU53PMN_cjs.runOptionallyInTransaction(backend, async (target) => {
|
|
68
|
+
const lock = ctx.historyEnabled || ctx.revisionTrackingEnabled ? await chunk2SO5I5AI_cjs.lockRecordedGraphWrite(target, ctx.graphId) : chunk2SO5I5AI_cjs.uncapturedGraphWriteLock();
|
|
69
69
|
const result = await fn(target, lock);
|
|
70
70
|
if (ctx.revisionTrackingEnabled && !ctx.historyEnabled) {
|
|
71
|
-
await
|
|
71
|
+
await chunk2SO5I5AI_cjs.advanceRevisionClock(
|
|
72
72
|
target,
|
|
73
73
|
ctx.revisionSchema,
|
|
74
74
|
ctx.graphId,
|
|
@@ -91,7 +91,7 @@ async function checkDisjointnessConstraint(ctx, kind, id) {
|
|
|
91
91
|
for (const disjointKind of disjointKinds) {
|
|
92
92
|
const existing = await ctx.backend.getNode(ctx.graphId, disjointKind, id);
|
|
93
93
|
if (existing && !existing.deleted_at) {
|
|
94
|
-
const error =
|
|
94
|
+
const error = chunk2SO5I5AI_cjs.checkDisjointness(id, kind, [disjointKind], ctx.registry);
|
|
95
95
|
if (error) throw error;
|
|
96
96
|
}
|
|
97
97
|
}
|
|
@@ -108,7 +108,7 @@ async function checkCardinalityConstraint(ctx, edgeKind, cardinality, fromKind,
|
|
|
108
108
|
fromKind,
|
|
109
109
|
fromId
|
|
110
110
|
});
|
|
111
|
-
const error =
|
|
111
|
+
const error = chunk2SO5I5AI_cjs.checkCardinality(
|
|
112
112
|
edgeKind,
|
|
113
113
|
fromKind,
|
|
114
114
|
fromId,
|
|
@@ -128,7 +128,7 @@ async function checkCardinalityConstraint(ctx, edgeKind, cardinality, fromKind,
|
|
|
128
128
|
toKind,
|
|
129
129
|
toId
|
|
130
130
|
});
|
|
131
|
-
const error =
|
|
131
|
+
const error = chunk2SO5I5AI_cjs.checkUniqueEdge(
|
|
132
132
|
edgeKind,
|
|
133
133
|
fromKind,
|
|
134
134
|
fromId,
|
|
@@ -150,7 +150,7 @@ async function checkCardinalityConstraint(ctx, edgeKind, cardinality, fromKind,
|
|
|
150
150
|
fromId,
|
|
151
151
|
activeOnly: true
|
|
152
152
|
});
|
|
153
|
-
const error =
|
|
153
|
+
const error = chunk2SO5I5AI_cjs.checkCardinality(
|
|
154
154
|
edgeKind,
|
|
155
155
|
fromKind,
|
|
156
156
|
fromId,
|
|
@@ -167,7 +167,7 @@ async function checkCardinalityConstraint(ctx, edgeKind, cardinality, fromKind,
|
|
|
167
167
|
// src/store/operations/node-operations.ts
|
|
168
168
|
function getNodeRegistration(graph, kind) {
|
|
169
169
|
const registration = graph.nodes[kind];
|
|
170
|
-
if (registration === void 0) throw new
|
|
170
|
+
if (registration === void 0) throw new chunkKTBTSHU6_cjs.KindNotFoundError(kind, "node");
|
|
171
171
|
return registration;
|
|
172
172
|
}
|
|
173
173
|
var CACHE_KEY_SEPARATOR = "\0";
|
|
@@ -178,7 +178,7 @@ function buildUniqueCacheKey(graphId, nodeKind, constraintName, key) {
|
|
|
178
178
|
return `${graphId}${CACHE_KEY_SEPARATOR}${nodeKind}${CACHE_KEY_SEPARATOR}${constraintName}${CACHE_KEY_SEPARATOR}${key}`;
|
|
179
179
|
}
|
|
180
180
|
function createNodeAlreadyExistsError(kind, id) {
|
|
181
|
-
return new
|
|
181
|
+
return new chunkKTBTSHU6_cjs.ValidationError(
|
|
182
182
|
`Node already exists: ${kind}/${id}`,
|
|
183
183
|
{
|
|
184
184
|
entityType: "node",
|
|
@@ -219,7 +219,7 @@ function resolveConstraint(graph, kind, constraintName) {
|
|
|
219
219
|
(candidate) => candidate.name === constraintName
|
|
220
220
|
);
|
|
221
221
|
if (constraint === void 0) {
|
|
222
|
-
throw new
|
|
222
|
+
throw new chunkKTBTSHU6_cjs.NodeConstraintNotFoundError(constraintName, kind);
|
|
223
223
|
}
|
|
224
224
|
return constraint;
|
|
225
225
|
}
|
|
@@ -280,8 +280,8 @@ function createNodeBatchValidationBackend(graphId, registry, backend) {
|
|
|
280
280
|
}
|
|
281
281
|
function registerPendingUniqueEntries(kind, id, props, constraints) {
|
|
282
282
|
for (const constraint of constraints) {
|
|
283
|
-
if (!
|
|
284
|
-
const key =
|
|
283
|
+
if (!chunk2SO5I5AI_cjs.checkWherePredicate(constraint, props)) continue;
|
|
284
|
+
const key = chunk2SO5I5AI_cjs.computeUniqueKey(
|
|
285
285
|
props,
|
|
286
286
|
constraint.fields,
|
|
287
287
|
constraint.collation
|
|
@@ -294,7 +294,7 @@ function createNodeBatchValidationBackend(graphId, registry, backend) {
|
|
|
294
294
|
);
|
|
295
295
|
pendingUniqueOwners.set(concreteEntryKey, id);
|
|
296
296
|
if (constraint.scope !== "kind") {
|
|
297
|
-
const kindsToCheck =
|
|
297
|
+
const kindsToCheck = chunk2SO5I5AI_cjs.getKindsForUniquenessCheck(
|
|
298
298
|
kind,
|
|
299
299
|
constraint.scope,
|
|
300
300
|
registry
|
|
@@ -313,12 +313,12 @@ function createNodeBatchValidationBackend(graphId, registry, backend) {
|
|
|
313
313
|
}
|
|
314
314
|
function registerAppliedNodeUpdate(kind, id, oldProps, newProps, constraints) {
|
|
315
315
|
for (const constraint of constraints) {
|
|
316
|
-
const oldApplies =
|
|
317
|
-
const newApplies =
|
|
318
|
-
const oldKey = oldApplies ?
|
|
319
|
-
const newKey = newApplies ?
|
|
316
|
+
const oldApplies = chunk2SO5I5AI_cjs.checkWherePredicate(constraint, oldProps);
|
|
317
|
+
const newApplies = chunk2SO5I5AI_cjs.checkWherePredicate(constraint, newProps);
|
|
318
|
+
const oldKey = oldApplies ? chunk2SO5I5AI_cjs.computeUniqueKey(oldProps, constraint.fields, constraint.collation) : void 0;
|
|
319
|
+
const newKey = newApplies ? chunk2SO5I5AI_cjs.computeUniqueKey(newProps, constraint.fields, constraint.collation) : void 0;
|
|
320
320
|
if (oldKey === newKey) continue;
|
|
321
|
-
const kindsToCheck =
|
|
321
|
+
const kindsToCheck = chunk2SO5I5AI_cjs.getKindsForUniquenessCheck(
|
|
322
322
|
kind,
|
|
323
323
|
constraint.scope,
|
|
324
324
|
registry
|
|
@@ -358,7 +358,7 @@ function createNodeBatchValidationBackend(graphId, registry, backend) {
|
|
|
358
358
|
if (uniqueCache.has(cacheKey)) return;
|
|
359
359
|
uniqueCache.set(cacheKey, row);
|
|
360
360
|
}
|
|
361
|
-
const validationBackend =
|
|
361
|
+
const validationBackend = chunkECU53PMN_cjs.createBackendOverlay(backend, {
|
|
362
362
|
getNode: getNodeCached,
|
|
363
363
|
checkUnique: checkUniqueCached
|
|
364
364
|
});
|
|
@@ -375,7 +375,7 @@ function draftNodeCreate(ctx, input, id, options) {
|
|
|
375
375
|
const kind = input.kind;
|
|
376
376
|
const registration = getNodeRegistration(ctx.graph, kind);
|
|
377
377
|
const nodeKind = registration.type;
|
|
378
|
-
const validatedProps = options?.propsPreValidated === true ? input.props :
|
|
378
|
+
const validatedProps = options?.propsPreValidated === true ? input.props : chunkARN3ZODS_cjs.validateNodeProps(nodeKind.schema, input.props, {
|
|
379
379
|
kind,
|
|
380
380
|
operation: "create"
|
|
381
381
|
});
|
|
@@ -385,8 +385,8 @@ function draftNodeCreate(ctx, input, id, options) {
|
|
|
385
385
|
nodeKind,
|
|
386
386
|
uniqueConstraints: registration.unique ?? [],
|
|
387
387
|
validatedProps,
|
|
388
|
-
validFrom:
|
|
389
|
-
validTo:
|
|
388
|
+
validFrom: chunkZBV4LQD2_cjs.validateOptionalCanonicalIsoDate(input.validFrom, "validFrom"),
|
|
389
|
+
validTo: chunkZBV4LQD2_cjs.validateOptionalCanonicalIsoDate(input.validTo, "validTo")
|
|
390
390
|
};
|
|
391
391
|
}
|
|
392
392
|
async function finishNodeCreatePreparation(ctx, draft, backend) {
|
|
@@ -401,8 +401,8 @@ async function finishNodeCreatePreparation(ctx, draft, backend) {
|
|
|
401
401
|
backend
|
|
402
402
|
};
|
|
403
403
|
await checkDisjointnessConstraint(constraintContext, kind, id);
|
|
404
|
-
await
|
|
405
|
-
|
|
404
|
+
await chunk2SO5I5AI_cjs.checkUniquenessConstraints(
|
|
405
|
+
chunk2SO5I5AI_cjs.createUniquenessContext(ctx.graphId, ctx.registry, backend),
|
|
406
406
|
kind,
|
|
407
407
|
id,
|
|
408
408
|
validatedProps,
|
|
@@ -432,8 +432,8 @@ async function validateAndPrepareNodeCreate(ctx, input, id, backend, options) {
|
|
|
432
432
|
);
|
|
433
433
|
}
|
|
434
434
|
async function finalizeNodeCreateBatch(ctx, preparedCreates, backend, lock) {
|
|
435
|
-
await
|
|
436
|
-
|
|
435
|
+
await chunk2SO5I5AI_cjs.applyNodeInsertSideEffectsBatch(
|
|
436
|
+
chunk2SO5I5AI_cjs.createNodeWriteContext(ctx.graphId, ctx.registry, lock),
|
|
437
437
|
preparedCreates.map((prepared) => ({
|
|
438
438
|
kind: prepared.kind,
|
|
439
439
|
id: prepared.id,
|
|
@@ -445,8 +445,8 @@ async function finalizeNodeCreateBatch(ctx, preparedCreates, backend, lock) {
|
|
|
445
445
|
);
|
|
446
446
|
}
|
|
447
447
|
async function finalizeNodeCreate(ctx, prepared, backend, lock) {
|
|
448
|
-
await
|
|
449
|
-
|
|
448
|
+
await chunk2SO5I5AI_cjs.applyNodeInsertSideEffects(
|
|
449
|
+
chunk2SO5I5AI_cjs.createNodeWriteContext(ctx.graphId, ctx.registry, lock),
|
|
450
450
|
{
|
|
451
451
|
kind: prepared.kind,
|
|
452
452
|
id: prepared.id,
|
|
@@ -459,7 +459,7 @@ async function finalizeNodeCreate(ctx, prepared, backend, lock) {
|
|
|
459
459
|
}
|
|
460
460
|
function computeNodeUpdate(ctx, kind, id, existingProps, inputProps) {
|
|
461
461
|
const registration = getNodeRegistration(ctx.graph, kind);
|
|
462
|
-
const validatedProps =
|
|
462
|
+
const validatedProps = chunkARN3ZODS_cjs.validateNodeProps(
|
|
463
463
|
registration.type.schema,
|
|
464
464
|
{ ...existingProps, ...inputProps },
|
|
465
465
|
{ kind, operation: "update", id }
|
|
@@ -467,7 +467,7 @@ function computeNodeUpdate(ctx, kind, id, existingProps, inputProps) {
|
|
|
467
467
|
return { registration, validatedProps };
|
|
468
468
|
}
|
|
469
469
|
function resolveNodeUpdateProps(ctx, existing, inputProps) {
|
|
470
|
-
const existingProps =
|
|
470
|
+
const existingProps = chunkECU53PMN_cjs.rowPropsToObject(existing.props);
|
|
471
471
|
const { registration, validatedProps } = computeNodeUpdate(
|
|
472
472
|
ctx,
|
|
473
473
|
existing.kind,
|
|
@@ -493,15 +493,15 @@ function nodeUpsertDirtyCheck(ctx, kind, id, existingProps, inputProps) {
|
|
|
493
493
|
async function performNodeUpdate(ctx, input, backend, lock, options) {
|
|
494
494
|
const { kind, id } = input;
|
|
495
495
|
const existing = await backend.getNode(ctx.graphId, kind, id);
|
|
496
|
-
if (!existing) throw new
|
|
496
|
+
if (!existing) throw new chunkKTBTSHU6_cjs.NodeNotFoundError(kind, id);
|
|
497
497
|
const { registration, validatedProps } = resolveNodeUpdateProps(
|
|
498
498
|
ctx,
|
|
499
499
|
existing,
|
|
500
500
|
input.props
|
|
501
501
|
);
|
|
502
502
|
const nodeKind = registration.type;
|
|
503
|
-
const validTo =
|
|
504
|
-
const writeContext =
|
|
503
|
+
const validTo = chunkZBV4LQD2_cjs.validateOptionalCanonicalIsoDate(input.validTo, "validTo");
|
|
504
|
+
const writeContext = chunk2SO5I5AI_cjs.createNodeWriteContext(ctx.graphId, ctx.registry, lock);
|
|
505
505
|
const shared = {
|
|
506
506
|
schema: nodeKind.schema,
|
|
507
507
|
validatedProps,
|
|
@@ -509,15 +509,15 @@ async function performNodeUpdate(ctx, input, backend, lock, options) {
|
|
|
509
509
|
...validTo !== void 0 && { validTo }
|
|
510
510
|
};
|
|
511
511
|
if (options?.clearDeleted) {
|
|
512
|
-
const row2 = await
|
|
512
|
+
const row2 = await chunk2SO5I5AI_cjs.applyNodeUpdate(
|
|
513
513
|
writeContext,
|
|
514
514
|
{ ...shared, existing, clearDeleted: true },
|
|
515
515
|
backend
|
|
516
516
|
);
|
|
517
517
|
return rowToNode(row2);
|
|
518
518
|
}
|
|
519
|
-
if (!
|
|
520
|
-
const row = await
|
|
519
|
+
if (!chunkECU53PMN_cjs.isLiveNodeRow(existing)) throw new chunkKTBTSHU6_cjs.NodeNotFoundError(kind, id);
|
|
520
|
+
const row = await chunk2SO5I5AI_cjs.applyNodeUpdate(
|
|
521
521
|
writeContext,
|
|
522
522
|
{ ...shared, existing },
|
|
523
523
|
backend
|
|
@@ -545,13 +545,13 @@ async function primeBatchValidationCaches(ctx, drafts, backend, seams) {
|
|
|
545
545
|
const groups = /* @__PURE__ */ new Map();
|
|
546
546
|
for (const draft of drafts) {
|
|
547
547
|
for (const constraint of draft.uniqueConstraints) {
|
|
548
|
-
if (!
|
|
549
|
-
const key =
|
|
548
|
+
if (!chunk2SO5I5AI_cjs.checkWherePredicate(constraint, draft.validatedProps)) continue;
|
|
549
|
+
const key = chunk2SO5I5AI_cjs.computeUniqueKey(
|
|
550
550
|
draft.validatedProps,
|
|
551
551
|
constraint.fields,
|
|
552
552
|
constraint.collation
|
|
553
553
|
);
|
|
554
|
-
const kindsToCheck =
|
|
554
|
+
const kindsToCheck = chunk2SO5I5AI_cjs.getKindsForUniquenessCheck(
|
|
555
555
|
draft.kind,
|
|
556
556
|
constraint.scope,
|
|
557
557
|
ctx.registry
|
|
@@ -597,7 +597,7 @@ async function prepareBatchCreates(ctx, inputs, backend, options) {
|
|
|
597
597
|
seedUniqueRow
|
|
598
598
|
} = createNodeBatchValidationBackend(ctx.graphId, ctx.registry, backend);
|
|
599
599
|
const drafts = inputs.map(
|
|
600
|
-
(input) => draftNodeCreate(ctx, input, input.id ??
|
|
600
|
+
(input) => draftNodeCreate(ctx, input, input.id ?? chunk2SO5I5AI_cjs.generateId(), options)
|
|
601
601
|
);
|
|
602
602
|
await primeBatchValidationCaches(ctx, drafts, backend, {
|
|
603
603
|
seedNodeRow,
|
|
@@ -673,7 +673,7 @@ async function batchCheckUniqueAcrossKinds(backend, graphId, constraintName, uni
|
|
|
673
673
|
}
|
|
674
674
|
async function executeNodeCreateInternal(ctx, input, backend, options) {
|
|
675
675
|
const kind = input.kind;
|
|
676
|
-
const id = input.id ??
|
|
676
|
+
const id = input.id ?? chunk2SO5I5AI_cjs.generateId();
|
|
677
677
|
const opContext = ctx.createOperationContext("create", "node", kind, id);
|
|
678
678
|
const shouldReturnRow = options?.returnRow ?? true;
|
|
679
679
|
return runHookedWriteOperation(
|
|
@@ -692,8 +692,8 @@ async function executeNodeCreateInternal(ctx, input, backend, options) {
|
|
|
692
692
|
if (shouldReturnRow) {
|
|
693
693
|
row = await target.insertNode(prepared.insertParams);
|
|
694
694
|
} else {
|
|
695
|
-
await
|
|
696
|
-
|
|
695
|
+
await chunk2SO5I5AI_cjs.runInsertNoReturn(
|
|
696
|
+
chunk2SO5I5AI_cjs.nodeInsertDispatch(target),
|
|
697
697
|
prepared.insertParams
|
|
698
698
|
);
|
|
699
699
|
}
|
|
@@ -709,7 +709,7 @@ async function executeNodeCreate(ctx, input, backend, options) {
|
|
|
709
709
|
...options
|
|
710
710
|
});
|
|
711
711
|
if (!result) {
|
|
712
|
-
throw new
|
|
712
|
+
throw new chunkKTBTSHU6_cjs.DatabaseOperationError(
|
|
713
713
|
"Node create failed: expected created node row",
|
|
714
714
|
{ operation: "insert", entity: "node" }
|
|
715
715
|
);
|
|
@@ -724,7 +724,7 @@ async function executeNodeCreateNoReturnBatch(ctx, inputs, backend) {
|
|
|
724
724
|
inputs,
|
|
725
725
|
target
|
|
726
726
|
);
|
|
727
|
-
await
|
|
727
|
+
await chunk2SO5I5AI_cjs.runInsertBatch(chunk2SO5I5AI_cjs.nodeInsertDispatch(target), batchInsertParams);
|
|
728
728
|
await finalizeNodeCreateBatch(ctx, preparedCreates, target, lock);
|
|
729
729
|
});
|
|
730
730
|
}
|
|
@@ -737,8 +737,8 @@ async function executeNodeCreateBatch(ctx, inputs, backend, options) {
|
|
|
737
737
|
target,
|
|
738
738
|
options
|
|
739
739
|
);
|
|
740
|
-
const rows = await
|
|
741
|
-
|
|
740
|
+
const rows = await chunk2SO5I5AI_cjs.runInsertBatchReturning(
|
|
741
|
+
chunk2SO5I5AI_cjs.nodeInsertDispatch(target),
|
|
742
742
|
batchInsertParams
|
|
743
743
|
);
|
|
744
744
|
await finalizeNodeCreateBatch(ctx, preparedCreates, target, lock);
|
|
@@ -777,9 +777,9 @@ async function executeNodeDelete(ctx, kind, id, backend) {
|
|
|
777
777
|
async (target, lock) => {
|
|
778
778
|
const registration = getNodeRegistration(ctx.graph, kind);
|
|
779
779
|
const preflight = await target.getNode(ctx.graphId, kind, id);
|
|
780
|
-
if (!preflight || !
|
|
781
|
-
await
|
|
782
|
-
|
|
780
|
+
if (!preflight || !chunkECU53PMN_cjs.isLiveNodeRow(preflight)) return;
|
|
781
|
+
await chunk2SO5I5AI_cjs.applyNodeSoftDelete(
|
|
782
|
+
chunk2SO5I5AI_cjs.createNodeWriteContext(ctx.graphId, ctx.registry, lock),
|
|
783
783
|
{
|
|
784
784
|
existing: preflight,
|
|
785
785
|
schema: registration.type.schema,
|
|
@@ -801,8 +801,8 @@ async function executeNodeHardDelete(ctx, kind, id, backend) {
|
|
|
801
801
|
backend,
|
|
802
802
|
async (target, lock) => {
|
|
803
803
|
const registration = getNodeRegistration(ctx.graph, kind);
|
|
804
|
-
await
|
|
805
|
-
|
|
804
|
+
await chunk2SO5I5AI_cjs.applyNodeHardDelete(
|
|
805
|
+
chunk2SO5I5AI_cjs.createNodeWriteContext(ctx.graphId, ctx.registry, lock),
|
|
806
806
|
{
|
|
807
807
|
kind,
|
|
808
808
|
id,
|
|
@@ -818,12 +818,12 @@ async function executeNodeGetOrCreateByConstraint(ctx, kind, constraintName, pro
|
|
|
818
818
|
const ifExists = options?.ifExists ?? "return";
|
|
819
819
|
const registration = getNodeRegistration(ctx.graph, kind);
|
|
820
820
|
const nodeKind = registration.type;
|
|
821
|
-
const validatedProps =
|
|
821
|
+
const validatedProps = chunkARN3ZODS_cjs.validateNodeProps(nodeKind.schema, props, {
|
|
822
822
|
kind,
|
|
823
823
|
operation: "create"
|
|
824
824
|
});
|
|
825
825
|
const constraint = resolveConstraint(ctx.graph, kind, constraintName);
|
|
826
|
-
if (!
|
|
826
|
+
if (!chunk2SO5I5AI_cjs.checkWherePredicate(constraint, validatedProps)) {
|
|
827
827
|
const node = await executeNodeCreate(
|
|
828
828
|
ctx,
|
|
829
829
|
{ kind, props: validatedProps },
|
|
@@ -832,12 +832,12 @@ async function executeNodeGetOrCreateByConstraint(ctx, kind, constraintName, pro
|
|
|
832
832
|
);
|
|
833
833
|
return { node, action: "created" };
|
|
834
834
|
}
|
|
835
|
-
const key =
|
|
835
|
+
const key = chunk2SO5I5AI_cjs.computeUniqueKey(
|
|
836
836
|
validatedProps,
|
|
837
837
|
constraint.fields,
|
|
838
838
|
constraint.collation
|
|
839
839
|
);
|
|
840
|
-
const kindsToCheck =
|
|
840
|
+
const kindsToCheck = chunk2SO5I5AI_cjs.getKindsForUniquenessCheck(
|
|
841
841
|
kind,
|
|
842
842
|
constraint.scope,
|
|
843
843
|
ctx.registry
|
|
@@ -894,25 +894,25 @@ async function executeNodeGetOrCreateByConstraint(ctx, kind, constraintName, pro
|
|
|
894
894
|
try {
|
|
895
895
|
return await attempt();
|
|
896
896
|
} catch (error) {
|
|
897
|
-
if (!(error instanceof
|
|
897
|
+
if (!(error instanceof chunkKTBTSHU6_cjs.UniquenessError)) throw error;
|
|
898
898
|
return attempt();
|
|
899
899
|
}
|
|
900
900
|
}
|
|
901
901
|
async function executeNodeFindByConstraint(ctx, kind, constraintName, props, backend) {
|
|
902
902
|
const registration = getNodeRegistration(ctx.graph, kind);
|
|
903
903
|
const nodeKind = registration.type;
|
|
904
|
-
const validatedProps =
|
|
904
|
+
const validatedProps = chunkARN3ZODS_cjs.validateNodeProps(nodeKind.schema, props, {
|
|
905
905
|
kind,
|
|
906
906
|
operation: "create"
|
|
907
907
|
});
|
|
908
908
|
const constraint = resolveConstraint(ctx.graph, kind, constraintName);
|
|
909
|
-
if (!
|
|
910
|
-
const key =
|
|
909
|
+
if (!chunk2SO5I5AI_cjs.checkWherePredicate(constraint, validatedProps)) return void 0;
|
|
910
|
+
const key = chunk2SO5I5AI_cjs.computeUniqueKey(
|
|
911
911
|
validatedProps,
|
|
912
912
|
constraint.fields,
|
|
913
913
|
constraint.collation
|
|
914
914
|
);
|
|
915
|
-
const kindsToCheck =
|
|
915
|
+
const kindsToCheck = chunk2SO5I5AI_cjs.getKindsForUniquenessCheck(
|
|
916
916
|
kind,
|
|
917
917
|
constraint.scope,
|
|
918
918
|
ctx.registry
|
|
@@ -938,12 +938,12 @@ async function executeNodeFindByConstraint(ctx, kind, constraintName, props, bac
|
|
|
938
938
|
function validateAndComputeKeys(nodeKind, kind, constraint, items) {
|
|
939
939
|
const validated = [];
|
|
940
940
|
for (const item of items) {
|
|
941
|
-
const validatedProps =
|
|
941
|
+
const validatedProps = chunkARN3ZODS_cjs.validateNodeProps(nodeKind.schema, item.props, {
|
|
942
942
|
kind,
|
|
943
943
|
operation: "create"
|
|
944
944
|
});
|
|
945
|
-
const applies =
|
|
946
|
-
const key = applies ?
|
|
945
|
+
const applies = chunk2SO5I5AI_cjs.checkWherePredicate(constraint, validatedProps);
|
|
946
|
+
const key = applies ? chunk2SO5I5AI_cjs.computeUniqueKey(
|
|
947
947
|
validatedProps,
|
|
948
948
|
constraint.fields,
|
|
949
949
|
constraint.collation
|
|
@@ -966,7 +966,7 @@ async function executeNodeBulkFindByConstraint(ctx, kind, constraintName, items,
|
|
|
966
966
|
const constraint = resolveConstraint(ctx.graph, kind, constraintName);
|
|
967
967
|
const validated = validateAndComputeKeys(nodeKind, kind, constraint, items);
|
|
968
968
|
const uniqueKeys = collectUniqueKeys(validated);
|
|
969
|
-
const kindsToCheck =
|
|
969
|
+
const kindsToCheck = chunk2SO5I5AI_cjs.getKindsForUniquenessCheck(
|
|
970
970
|
kind,
|
|
971
971
|
constraint.scope,
|
|
972
972
|
ctx.registry
|
|
@@ -1016,10 +1016,10 @@ function resolveNodeIndex(graph, kind, indexName) {
|
|
|
1016
1016
|
(candidate) => candidate.entity === "node" && candidate.kind === kind && candidate.name === indexName
|
|
1017
1017
|
);
|
|
1018
1018
|
if (declaration?.entity !== "node") {
|
|
1019
|
-
throw new
|
|
1019
|
+
throw new chunkKTBTSHU6_cjs.NodeIndexNotFoundError(indexName, kind);
|
|
1020
1020
|
}
|
|
1021
1021
|
if (declaration.method !== void 0) {
|
|
1022
|
-
throw new
|
|
1022
|
+
throw new chunkKTBTSHU6_cjs.ConfigurationError(
|
|
1023
1023
|
`bulkFindByIndex cannot probe index "${indexName}" (method "${declaration.method}"): only btree indexes serve equality probes.`,
|
|
1024
1024
|
{ indexName, kind, method: declaration.method }
|
|
1025
1025
|
);
|
|
@@ -1057,7 +1057,7 @@ function validateIndexProbeValue(value, valueType, pointer, kind) {
|
|
|
1057
1057
|
}
|
|
1058
1058
|
}
|
|
1059
1059
|
function indexProbeTypeError(pointer, kind, expected, value) {
|
|
1060
|
-
return new
|
|
1060
|
+
return new chunkKTBTSHU6_cjs.ValidationError(
|
|
1061
1061
|
`Index probe value for "${pointer}" on node kind "${kind}" has an incompatible type`,
|
|
1062
1062
|
{
|
|
1063
1063
|
entityType: "node",
|
|
@@ -1091,7 +1091,7 @@ async function executeNodeBulkFindByIndex(ctx, kind, indexName, items, backend,
|
|
|
1091
1091
|
if (items.length === 0) return [];
|
|
1092
1092
|
const index = resolveNodeIndex(ctx.graph, kind, indexName);
|
|
1093
1093
|
if (index.fields.length === 0) {
|
|
1094
|
-
throw new
|
|
1094
|
+
throw new chunkKTBTSHU6_cjs.ConfigurationError(
|
|
1095
1095
|
`bulkFindByIndex requires an index with at least one prop-based field on index "${indexName}" (node kind "${kind}")`,
|
|
1096
1096
|
{ indexName, kind },
|
|
1097
1097
|
{
|
|
@@ -1100,7 +1100,7 @@ async function executeNodeBulkFindByIndex(ctx, kind, indexName, items, backend,
|
|
|
1100
1100
|
);
|
|
1101
1101
|
}
|
|
1102
1102
|
if (index.fieldValueTypes.includes("date")) {
|
|
1103
|
-
throw new
|
|
1103
|
+
throw new chunkKTBTSHU6_cjs.ConfigurationError(
|
|
1104
1104
|
`bulkFindByIndex does not support date-typed key fields on index "${indexName}" (node kind "${kind}")`,
|
|
1105
1105
|
{ indexName, kind },
|
|
1106
1106
|
{
|
|
@@ -1110,7 +1110,7 @@ async function executeNodeBulkFindByIndex(ctx, kind, indexName, items, backend,
|
|
|
1110
1110
|
}
|
|
1111
1111
|
const limitPerInput = options?.limitPerInput;
|
|
1112
1112
|
if (limitPerInput !== void 0 && (!Number.isInteger(limitPerInput) || limitPerInput <= 0)) {
|
|
1113
|
-
throw new
|
|
1113
|
+
throw new chunkKTBTSHU6_cjs.ValidationError(
|
|
1114
1114
|
"bulkFindByIndex limitPerInput must be a positive integer",
|
|
1115
1115
|
{
|
|
1116
1116
|
entityType: "node",
|
|
@@ -1125,7 +1125,7 @@ async function executeNodeBulkFindByIndex(ctx, kind, indexName, items, backend,
|
|
|
1125
1125
|
}
|
|
1126
1126
|
);
|
|
1127
1127
|
}
|
|
1128
|
-
const adapter =
|
|
1128
|
+
const adapter = chunkUTTW2Q3M_cjs.getDialect(backend.dialect);
|
|
1129
1129
|
const probes = items.map(
|
|
1130
1130
|
(item) => index.fields.map((pointer, position) => {
|
|
1131
1131
|
const value = chunkTDXIBCGY_cjs.resolveJsonPointer(item.props, pointer);
|
|
@@ -1152,47 +1152,47 @@ async function executeNodeBulkFindByIndex(ctx, kind, indexName, items, backend,
|
|
|
1152
1152
|
}
|
|
1153
1153
|
groupToInputs[existing]?.push(inputIndex);
|
|
1154
1154
|
}
|
|
1155
|
-
const schema = backend.tableNames ?
|
|
1155
|
+
const schema = backend.tableNames ? chunkCVK4T34X_cjs.createSqlSchema(backend.tableNames) : chunkCVK4T34X_cjs.DEFAULT_SQL_SCHEMA;
|
|
1156
1156
|
const compileContext = {
|
|
1157
1157
|
dialect: backend.dialect,
|
|
1158
|
-
propsColumn:
|
|
1159
|
-
systemColumn: (column) =>
|
|
1158
|
+
propsColumn: chunkX2XOQZT3_cjs.sql.raw(`"props"`),
|
|
1159
|
+
systemColumn: (column) => chunkX2XOQZT3_cjs.sql.raw(`"${column}"`)
|
|
1160
1160
|
};
|
|
1161
|
-
const fieldKeys =
|
|
1161
|
+
const fieldKeys = chunkUTTW2Q3M_cjs.compileNodeIndexFieldKeys(index, compileContext);
|
|
1162
1162
|
const groupPredicates = groupProbes.map(
|
|
1163
|
-
(probe) =>
|
|
1163
|
+
(probe) => chunkX2XOQZT3_cjs.sql`(${chunkX2XOQZT3_cjs.sql.join(
|
|
1164
1164
|
fieldKeys.map((fieldKey, position) => {
|
|
1165
1165
|
const value = probe[position];
|
|
1166
1166
|
if (value === void 0 || value === null) {
|
|
1167
|
-
return
|
|
1167
|
+
return chunkX2XOQZT3_cjs.sql`${fieldKey} IS NULL`;
|
|
1168
1168
|
}
|
|
1169
1169
|
return adapter.nullSafeEquals(
|
|
1170
1170
|
fieldKey,
|
|
1171
|
-
|
|
1171
|
+
chunkX2XOQZT3_cjs.sql`${coerceIndexProbeBind(value, adapter)}`
|
|
1172
1172
|
);
|
|
1173
1173
|
}),
|
|
1174
|
-
|
|
1174
|
+
chunkX2XOQZT3_cjs.sql` AND `
|
|
1175
1175
|
)})`
|
|
1176
1176
|
);
|
|
1177
1177
|
const caseBranches = groupPredicates.map(
|
|
1178
|
-
(predicate, group) =>
|
|
1178
|
+
(predicate, group) => chunkX2XOQZT3_cjs.sql`WHEN ${predicate} THEN ${chunkX2XOQZT3_cjs.sql.raw(String(group))}`
|
|
1179
1179
|
);
|
|
1180
|
-
const probeIndexExpr =
|
|
1180
|
+
const probeIndexExpr = chunkX2XOQZT3_cjs.sql`CASE ${chunkX2XOQZT3_cjs.sql.join(caseBranches, chunkX2XOQZT3_cjs.sql` `)} ELSE NULL END`;
|
|
1181
1181
|
const conditions = [
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1182
|
+
chunkX2XOQZT3_cjs.sql`"graph_id" = ${ctx.graphId}`,
|
|
1183
|
+
chunkX2XOQZT3_cjs.sql`"kind" = ${kind}`,
|
|
1184
|
+
chunkX2XOQZT3_cjs.sql`"deleted_at" IS NULL`
|
|
1185
1185
|
];
|
|
1186
1186
|
if (index.where !== void 0) {
|
|
1187
|
-
conditions.push(
|
|
1187
|
+
conditions.push(chunkUTTW2Q3M_cjs.compileIndexWhere(compileContext, index.where));
|
|
1188
1188
|
}
|
|
1189
|
-
conditions.push(
|
|
1190
|
-
const whereClause =
|
|
1191
|
-
const probedSelect =
|
|
1189
|
+
conditions.push(chunkX2XOQZT3_cjs.sql`(${chunkX2XOQZT3_cjs.sql.join(groupPredicates, chunkX2XOQZT3_cjs.sql` OR `)})`);
|
|
1190
|
+
const whereClause = chunkX2XOQZT3_cjs.sql.join(conditions, chunkX2XOQZT3_cjs.sql` AND `);
|
|
1191
|
+
const probedSelect = chunkX2XOQZT3_cjs.sql`SELECT "id", ${probeIndexExpr} AS probe_idx FROM ${schema.nodesTable} WHERE ${whereClause}`;
|
|
1192
1192
|
const capInSql = limitPerInput !== void 0 && backend.capabilities.windowFunctions;
|
|
1193
|
-
const query = capInSql ?
|
|
1193
|
+
const query = capInSql ? chunkX2XOQZT3_cjs.sql`SELECT "id", probe_idx FROM (SELECT "id", probe_idx, ROW_NUMBER() OVER (PARTITION BY probe_idx ORDER BY "id") AS probe_rank FROM (${probedSelect}) AS probed) AS ranked WHERE probe_rank <= ${limitPerInput} ORDER BY probe_idx, "id"` : chunkX2XOQZT3_cjs.sql`${probedSelect} ORDER BY probe_idx, "id"`;
|
|
1194
1194
|
const rawMatches = await backend.execute(
|
|
1195
|
-
|
|
1195
|
+
chunkX2XOQZT3_cjs.asCompiledRowsSql(query)
|
|
1196
1196
|
);
|
|
1197
1197
|
const matches = limitPerInput !== void 0 && !capInSql ? capMatchesPerGroup(rawMatches, limitPerInput) : rawMatches;
|
|
1198
1198
|
const nodesById = await hydrateNodesById(
|
|
@@ -1225,7 +1225,7 @@ function capMatchesPerGroup(matches, limitPerInput) {
|
|
|
1225
1225
|
return capped;
|
|
1226
1226
|
}
|
|
1227
1227
|
async function hydrateNodesById(backend, graphId, kind, ids) {
|
|
1228
|
-
const rowsById = await
|
|
1228
|
+
const rowsById = await chunk2SO5I5AI_cjs.getNodeRowsByIds(backend, graphId, kind, ids);
|
|
1229
1229
|
const nodesById = /* @__PURE__ */ new Map();
|
|
1230
1230
|
for (const [id, row] of rowsById) {
|
|
1231
1231
|
if (row.deleted_at !== void 0) continue;
|
|
@@ -1241,7 +1241,7 @@ async function executeNodeBulkGetOrCreateByConstraint(ctx, kind, constraintName,
|
|
|
1241
1241
|
const constraint = resolveConstraint(ctx.graph, kind, constraintName);
|
|
1242
1242
|
const validated = validateAndComputeKeys(nodeKind, kind, constraint, items);
|
|
1243
1243
|
const uniqueKeys = collectUniqueKeys(validated);
|
|
1244
|
-
const kindsToCheck =
|
|
1244
|
+
const kindsToCheck = chunk2SO5I5AI_cjs.getKindsForUniquenessCheck(
|
|
1245
1245
|
kind,
|
|
1246
1246
|
constraint.scope,
|
|
1247
1247
|
ctx.registry
|
|
@@ -1363,5 +1363,5 @@ exports.rowToNode = rowToNode;
|
|
|
1363
1363
|
exports.rowToNodeMeta = rowToNodeMeta;
|
|
1364
1364
|
exports.runHookedWriteOperation = runHookedWriteOperation;
|
|
1365
1365
|
exports.runInWriteTransaction = runInWriteTransaction;
|
|
1366
|
-
//# sourceMappingURL=chunk-
|
|
1367
|
-
//# sourceMappingURL=chunk-
|
|
1366
|
+
//# sourceMappingURL=chunk-K2HHCWZO.cjs.map
|
|
1367
|
+
//# sourceMappingURL=chunk-K2HHCWZO.cjs.map
|