@nicia-ai/typegraph 0.42.1 → 0.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/backend/drizzle/indexes.cjs +9 -9
- package/dist/backend/drizzle/indexes.d.cts +1 -1
- package/dist/backend/drizzle/indexes.d.ts +1 -1
- package/dist/backend/drizzle/indexes.js +5 -5
- package/dist/backend/index.cjs +50 -50
- package/dist/backend/index.d.cts +3 -3
- package/dist/backend/index.d.ts +3 -3
- package/dist/backend/index.js +11 -11
- package/dist/backend/postgres/index.cjs +26 -26
- package/dist/backend/postgres/index.d.cts +6 -5
- package/dist/backend/postgres/index.d.ts +6 -5
- package/dist/backend/postgres/index.js +13 -13
- package/dist/backend/postgres/pglite-store.cjs +33 -33
- package/dist/backend/postgres/pglite-store.cjs.map +1 -1
- package/dist/backend/postgres/pglite-store.d.cts +7 -7
- package/dist/backend/postgres/pglite-store.d.ts +7 -7
- package/dist/backend/postgres/pglite-store.js +29 -29
- package/dist/backend/postgres/pglite-store.js.map +1 -1
- package/dist/backend/postgres/pglite.cjs +15 -15
- package/dist/backend/postgres/pglite.d.cts +3 -2
- package/dist/backend/postgres/pglite.d.ts +3 -2
- package/dist/backend/postgres/pglite.js +14 -14
- package/dist/backend/sqlite/index.cjs +23 -23
- package/dist/backend/sqlite/index.d.cts +7 -6
- package/dist/backend/sqlite/index.d.ts +7 -6
- package/dist/backend/sqlite/index.js +11 -11
- package/dist/backend/sqlite/libsql.cjs +17 -17
- package/dist/backend/sqlite/libsql.cjs.map +1 -1
- package/dist/backend/sqlite/libsql.d.cts +3 -2
- package/dist/backend/sqlite/libsql.d.ts +3 -2
- package/dist/backend/sqlite/libsql.js +13 -13
- package/dist/backend/sqlite/libsql.js.map +1 -1
- package/dist/backend/sqlite/local-store.cjs +34 -34
- package/dist/backend/sqlite/local-store.cjs.map +1 -1
- package/dist/backend/sqlite/local-store.d.cts +8 -7
- package/dist/backend/sqlite/local-store.d.ts +8 -7
- package/dist/backend/sqlite/local-store.js +30 -30
- package/dist/backend/sqlite/local-store.js.map +1 -1
- package/dist/backend/sqlite/local.cjs +16 -16
- package/dist/backend/sqlite/local.d.cts +3 -2
- package/dist/backend/sqlite/local.d.ts +3 -2
- package/dist/backend/sqlite/local.js +14 -14
- package/dist/{chunk-3RPQDGUE.cjs → chunk-2BIG7U6E.cjs} +5 -5
- package/dist/{chunk-3RPQDGUE.cjs.map → chunk-2BIG7U6E.cjs.map} +1 -1
- package/dist/{chunk-2OOY4OYT.js → chunk-2L54C2C2.js} +4 -4
- package/dist/{chunk-2OOY4OYT.js.map → chunk-2L54C2C2.js.map} +1 -1
- package/dist/{chunk-V2GZBPY2.cjs → chunk-2VLBGQBY.cjs} +310 -61
- package/dist/chunk-2VLBGQBY.cjs.map +1 -0
- package/dist/{chunk-RXOAXO3R.js → chunk-2WDD2NO3.js} +3 -3
- package/dist/{chunk-RXOAXO3R.js.map → chunk-2WDD2NO3.js.map} +1 -1
- package/dist/{chunk-2HKIID5K.js → chunk-2Y4IFKW7.js} +5 -5
- package/dist/{chunk-2HKIID5K.js.map → chunk-2Y4IFKW7.js.map} +1 -1
- package/dist/{chunk-ECU53PMN.cjs → chunk-3PRKZW6D.cjs} +5 -5
- package/dist/chunk-3PRKZW6D.cjs.map +1 -0
- package/dist/{chunk-2G6ZEGYO.js → chunk-46GDII45.js} +4 -4
- package/dist/{chunk-2G6ZEGYO.js.map → chunk-46GDII45.js.map} +1 -1
- package/dist/{chunk-OYJSYDIH.js → chunk-4MB3AQAQ.js} +13 -3
- package/dist/chunk-4MB3AQAQ.js.map +1 -0
- package/dist/chunk-4SZ6XPTG.cjs +12 -0
- package/dist/{chunk-VGMNGWBR.cjs.map → chunk-4SZ6XPTG.cjs.map} +1 -1
- package/dist/{chunk-FY4VY5EV.cjs → chunk-5MUSU4ZP.cjs} +20 -20
- package/dist/chunk-5MUSU4ZP.cjs.map +1 -0
- package/dist/{chunk-ZIRC2U6G.js → chunk-63KCKSSH.js} +78 -16
- package/dist/chunk-63KCKSSH.js.map +1 -0
- package/dist/{chunk-7Y6BV3TK.cjs → chunk-66UVLHQA.cjs} +100 -100
- package/dist/{chunk-7Y6BV3TK.cjs.map → chunk-66UVLHQA.cjs.map} +1 -1
- package/dist/{chunk-M4GYQF2H.js → chunk-6DCB664D.js} +7 -4
- package/dist/chunk-6DCB664D.js.map +1 -0
- package/dist/{chunk-OMQ2NBOR.cjs → chunk-6JZUSDY2.cjs} +27 -27
- package/dist/{chunk-OMQ2NBOR.cjs.map → chunk-6JZUSDY2.cjs.map} +1 -1
- package/dist/{chunk-Z3WIL6S3.js → chunk-7G32LIQM.js} +5 -5
- package/dist/{chunk-Z3WIL6S3.js.map → chunk-7G32LIQM.js.map} +1 -1
- package/dist/{chunk-2SO5I5AI.cjs → chunk-7V2FGGI2.cjs} +250 -198
- package/dist/chunk-7V2FGGI2.cjs.map +1 -0
- package/dist/{chunk-I73ATSAH.cjs → chunk-A2I2XO52.cjs} +4 -4
- package/dist/{chunk-I73ATSAH.cjs.map → chunk-A2I2XO52.cjs.map} +1 -1
- package/dist/{chunk-O2GZM7UK.cjs → chunk-A4PBRX4C.cjs} +7 -7
- package/dist/{chunk-O2GZM7UK.cjs.map → chunk-A4PBRX4C.cjs.map} +1 -1
- package/dist/{chunk-5P6IPIT6.cjs → chunk-ALFUGRYB.cjs} +75 -65
- package/dist/chunk-ALFUGRYB.cjs.map +1 -0
- package/dist/{chunk-NXIZL7ZZ.js → chunk-ATLN63JA.js} +6 -6
- package/dist/chunk-ATLN63JA.js.map +1 -0
- package/dist/{chunk-CUPJL6TS.js → chunk-B75XRV3O.js} +3 -3
- package/dist/{chunk-CUPJL6TS.js.map → chunk-B75XRV3O.js.map} +1 -1
- package/dist/{chunk-DP7KC6CL.js → chunk-BCP7LLOY.js} +754 -476
- package/dist/chunk-BCP7LLOY.js.map +1 -0
- package/dist/{chunk-RAWG2FEU.js → chunk-BEFM74L2.js} +264 -18
- package/dist/chunk-BEFM74L2.js.map +1 -0
- package/dist/{chunk-LQLVJWUH.js → chunk-BNUFUFAU.js} +7 -7
- package/dist/chunk-BNUFUFAU.js.map +1 -0
- package/dist/{chunk-KTBTSHU6.cjs → chunk-C4F7VJ5D.cjs} +13 -3
- package/dist/chunk-C4F7VJ5D.cjs.map +1 -0
- package/dist/{chunk-CVK4T34X.cjs → chunk-CPEL3YIR.cjs} +22 -22
- package/dist/{chunk-CVK4T34X.cjs.map → chunk-CPEL3YIR.cjs.map} +1 -1
- package/dist/{chunk-O3USVVWS.js → chunk-DK2S42XB.js} +3 -3
- package/dist/{chunk-O3USVVWS.js.map → chunk-DK2S42XB.js.map} +1 -1
- package/dist/{chunk-DMZEVJGL.cjs → chunk-EE7N5XXQ.cjs} +13 -13
- package/dist/{chunk-DMZEVJGL.cjs.map → chunk-EE7N5XXQ.cjs.map} +1 -1
- package/dist/{chunk-ZGOUVMVS.js → chunk-EFELJVLA.js} +5 -5
- package/dist/{chunk-ZGOUVMVS.js.map → chunk-EFELJVLA.js.map} +1 -1
- package/dist/chunk-EPTSMFH7.cjs +12 -0
- package/dist/{chunk-U3YRCZ5L.cjs.map → chunk-EPTSMFH7.cjs.map} +1 -1
- package/dist/{chunk-FSCJOTHF.cjs → chunk-EQ7JKLZO.cjs} +10 -10
- package/dist/{chunk-FSCJOTHF.cjs.map → chunk-EQ7JKLZO.cjs.map} +1 -1
- package/dist/{chunk-5Q3P6OIC.cjs → chunk-FGO5JFVJ.cjs} +12 -12
- package/dist/chunk-FGO5JFVJ.cjs.map +1 -0
- package/dist/{chunk-VC26BUNP.js → chunk-FMGEZBAQ.js} +5 -5
- package/dist/{chunk-VC26BUNP.js.map → chunk-FMGEZBAQ.js.map} +1 -1
- package/dist/{chunk-UZLEQFTV.js → chunk-FMMIX6N4.js} +4 -4
- package/dist/chunk-FMMIX6N4.js.map +1 -0
- package/dist/{chunk-5C75HQYQ.js → chunk-FRHHDHKH.js} +5 -5
- package/dist/{chunk-5C75HQYQ.js.map → chunk-FRHHDHKH.js.map} +1 -1
- package/dist/{chunk-EVFL2ZY5.js → chunk-FSXTPBRN.js} +63 -12
- package/dist/chunk-FSXTPBRN.js.map +1 -0
- package/dist/{chunk-TRC646QQ.cjs → chunk-GFRGG2US.cjs} +7 -7
- package/dist/{chunk-TRC646QQ.cjs.map → chunk-GFRGG2US.cjs.map} +1 -1
- package/dist/{chunk-UJRWOV5B.js → chunk-GWEDD3DH.js} +5 -5
- package/dist/{chunk-UJRWOV5B.js.map → chunk-GWEDD3DH.js.map} +1 -1
- package/dist/{chunk-AQR6BHB3.cjs → chunk-HJH3RMXG.cjs} +10 -10
- package/dist/{chunk-AQR6BHB3.cjs.map → chunk-HJH3RMXG.cjs.map} +1 -1
- package/dist/{chunk-F7TDKSVB.cjs → chunk-HOHAJ2NR.cjs} +4 -4
- package/dist/{chunk-F7TDKSVB.cjs.map → chunk-HOHAJ2NR.cjs.map} +1 -1
- package/dist/{chunk-YPVQYM3L.js → chunk-HOIFFY4M.js} +100 -20
- package/dist/chunk-HOIFFY4M.js.map +1 -0
- package/dist/{chunk-LDCWO5B6.js → chunk-IIMQJYAM.js} +3 -3
- package/dist/{chunk-LDCWO5B6.js.map → chunk-IIMQJYAM.js.map} +1 -1
- package/dist/{chunk-OM6RIOA5.cjs → chunk-IIT5K7SK.cjs} +13 -13
- package/dist/{chunk-OM6RIOA5.cjs.map → chunk-IIT5K7SK.cjs.map} +1 -1
- package/dist/{chunk-EQOQOT55.js → chunk-IJTLXNGJ.js} +5 -5
- package/dist/{chunk-EQOQOT55.js.map → chunk-IJTLXNGJ.js.map} +1 -1
- package/dist/{chunk-4XRP2N6B.js → chunk-JRP3VGHS.js} +3 -3
- package/dist/{chunk-4XRP2N6B.js.map → chunk-JRP3VGHS.js.map} +1 -1
- package/dist/{chunk-42XYPKZU.js → chunk-K3BUWSFR.js} +41 -3
- package/dist/chunk-K3BUWSFR.js.map +1 -0
- package/dist/{chunk-GT7NEXSU.js → chunk-KCO5EFJU.js} +3 -3
- package/dist/{chunk-GT7NEXSU.js.map → chunk-KCO5EFJU.js.map} +1 -1
- package/dist/{chunk-ARN3ZODS.cjs → chunk-KKYELPZ2.cjs} +6 -6
- package/dist/{chunk-ARN3ZODS.cjs.map → chunk-KKYELPZ2.cjs.map} +1 -1
- package/dist/{chunk-33PAKPED.cjs → chunk-MCHP7RHZ.cjs} +41 -41
- package/dist/{chunk-33PAKPED.cjs.map → chunk-MCHP7RHZ.cjs.map} +1 -1
- package/dist/{chunk-CDYRPI5U.js → chunk-MIJKEVV7.js} +4 -4
- package/dist/{chunk-CDYRPI5U.js.map → chunk-MIJKEVV7.js.map} +1 -1
- package/dist/{chunk-K2HHCWZO.cjs → chunk-NCX65HBY.cjs} +137 -108
- package/dist/chunk-NCX65HBY.cjs.map +1 -0
- package/dist/{chunk-6TJ6PKPS.cjs → chunk-NN3QSOVS.cjs} +27 -27
- package/dist/{chunk-6TJ6PKPS.cjs.map → chunk-NN3QSOVS.cjs.map} +1 -1
- package/dist/{chunk-F2KVJ6FF.cjs → chunk-OSZPLZIV.cjs} +179 -117
- package/dist/chunk-OSZPLZIV.cjs.map +1 -0
- package/dist/{chunk-UTTW2Q3M.cjs → chunk-OVUUTCPJ.cjs} +171 -133
- package/dist/chunk-OVUUTCPJ.cjs.map +1 -0
- package/dist/{chunk-FMPZPOUD.js → chunk-PAW2XUZN.js} +3 -3
- package/dist/{chunk-FMPZPOUD.js.map → chunk-PAW2XUZN.js.map} +1 -1
- package/dist/{chunk-5ZPRE4CV.cjs → chunk-PDGEXGS6.cjs} +204 -124
- package/dist/chunk-PDGEXGS6.cjs.map +1 -0
- package/dist/{chunk-CVNGKTHO.js → chunk-PHXITZE4.js} +4 -4
- package/dist/{chunk-CVNGKTHO.js.map → chunk-PHXITZE4.js.map} +1 -1
- package/dist/{chunk-ZPCKPLMX.cjs → chunk-QB6VMOJ2.cjs} +8 -8
- package/dist/{chunk-ZPCKPLMX.cjs.map → chunk-QB6VMOJ2.cjs.map} +1 -1
- package/dist/{chunk-5AERZSHC.cjs → chunk-QGKILWGZ.cjs} +4 -4
- package/dist/{chunk-5AERZSHC.cjs.map → chunk-QGKILWGZ.cjs.map} +1 -1
- package/dist/{chunk-ZOHCFYXE.js → chunk-QT6V3YRH.js} +3 -3
- package/dist/{chunk-ZOHCFYXE.js.map → chunk-QT6V3YRH.js.map} +1 -1
- package/dist/{chunk-XDMPDUKL.cjs → chunk-QYWINYEA.cjs} +9 -9
- package/dist/{chunk-XDMPDUKL.cjs.map → chunk-QYWINYEA.cjs.map} +1 -1
- package/dist/{chunk-3V6D5DEC.js → chunk-S4KQ5LV4.js} +3 -3
- package/dist/{chunk-3V6D5DEC.js.map → chunk-S4KQ5LV4.js.map} +1 -1
- package/dist/{chunk-6NB73BXV.js → chunk-SBPC5IP3.js} +40 -12
- package/dist/chunk-SBPC5IP3.js.map +1 -0
- package/dist/{chunk-HHBKGPEI.js → chunk-SQRD2CYF.js} +264 -21
- package/dist/chunk-SQRD2CYF.js.map +1 -0
- package/dist/{chunk-O7XVCLXW.cjs → chunk-ST3LPB2V.cjs} +324 -77
- package/dist/chunk-ST3LPB2V.cjs.map +1 -0
- package/dist/{chunk-FFQGI67R.cjs → chunk-STQ3BSED.cjs} +44 -44
- package/dist/{chunk-FFQGI67R.cjs.map → chunk-STQ3BSED.cjs.map} +1 -1
- package/dist/{chunk-JOYPNY33.js → chunk-TCRIQMBU.js} +9 -9
- package/dist/{chunk-JOYPNY33.js.map → chunk-TCRIQMBU.js.map} +1 -1
- package/dist/{chunk-ZP2KPDNN.js → chunk-TFMVL4QH.js} +3 -3
- package/dist/{chunk-ZP2KPDNN.js.map → chunk-TFMVL4QH.js.map} +1 -1
- package/dist/{chunk-4WYFRACU.js → chunk-TVLKA4AY.js} +3 -3
- package/dist/{chunk-4WYFRACU.js.map → chunk-TVLKA4AY.js.map} +1 -1
- package/dist/{chunk-X2XOQZT3.cjs → chunk-U5W4LKZV.cjs} +13 -9
- package/dist/chunk-U5W4LKZV.cjs.map +1 -0
- package/dist/{chunk-WYQILW5V.js → chunk-VITTKBWF.js} +43 -33
- package/dist/chunk-VITTKBWF.js.map +1 -0
- package/dist/{chunk-AO2WPYFZ.cjs → chunk-WBUFJ7BS.cjs} +4 -4
- package/dist/{chunk-AO2WPYFZ.cjs.map → chunk-WBUFJ7BS.cjs.map} +1 -1
- package/dist/{chunk-CI5NPLXX.js → chunk-XMYJY7NI.js} +3 -3
- package/dist/{chunk-CI5NPLXX.js.map → chunk-XMYJY7NI.js.map} +1 -1
- package/dist/{chunk-277UZV7X.cjs → chunk-XR4YZFKW.cjs} +1803 -1525
- package/dist/chunk-XR4YZFKW.cjs.map +1 -0
- package/dist/{chunk-5GV4JQNA.cjs → chunk-YNULOIR5.cjs} +43 -43
- package/dist/{chunk-5GV4JQNA.cjs.map → chunk-YNULOIR5.cjs.map} +1 -1
- package/dist/{chunk-ZBV4LQD2.cjs → chunk-ZTAJL4DT.cjs} +4 -4
- package/dist/{chunk-ZBV4LQD2.cjs.map → chunk-ZTAJL4DT.cjs.map} +1 -1
- package/dist/core/index.cjs +28 -28
- package/dist/core/index.d.cts +5 -5
- package/dist/core/index.d.ts +5 -5
- package/dist/core/index.js +8 -8
- package/dist/{ddl-Bc4Dl8fu.d.ts → ddl-D5369kOY.d.ts} +3 -3
- package/dist/{ddl-3unqC-kg.d.cts → ddl-eWg7hx6R.d.cts} +3 -3
- package/dist/{define-graph-Byslw2OO.d.cts → define-graph-DVF-oN1i.d.cts} +1 -1
- package/dist/{define-graph-DBFnc7u_.d.ts → define-graph-SvYXOl78.d.ts} +1 -1
- package/dist/graph-extension/index.cjs +20 -20
- package/dist/graph-extension/index.d.cts +4 -4
- package/dist/graph-extension/index.d.ts +4 -4
- package/dist/graph-extension/index.js +5 -5
- package/dist/graph-merge/index.cjs +104 -104
- package/dist/graph-merge/index.d.cts +9 -8
- package/dist/graph-merge/index.d.ts +9 -8
- package/dist/graph-merge/index.js +24 -24
- package/dist/{index-DQzVJBHa.d.ts → index-By89Sezh.d.ts} +37 -7
- package/dist/{index-DHXw7QAl.d.cts → index-DcQ3Sxs-.d.cts} +37 -7
- package/dist/index.cjs +210 -202
- package/dist/index.d.cts +13 -13
- package/dist/index.d.ts +13 -13
- package/dist/index.js +34 -34
- package/dist/indexes/index.cjs +13 -13
- package/dist/indexes/index.d.cts +4 -4
- package/dist/indexes/index.d.ts +4 -4
- package/dist/indexes/index.js +6 -6
- package/dist/interchange/index.cjs +49 -41
- package/dist/interchange/index.cjs.map +1 -1
- package/dist/interchange/index.d.cts +11 -11
- package/dist/interchange/index.d.ts +11 -11
- package/dist/interchange/index.js +23 -15
- package/dist/interchange/index.js.map +1 -1
- package/dist/{manager-Dl0-er1G.d.ts → manager-B0KjKE93.d.ts} +44 -6
- package/dist/{manager-U9_zopqr.d.cts → manager-Cn0NFIhN.d.cts} +44 -6
- package/dist/{materialize-indexes-BM3u0aXE.d.ts → materialize-indexes-BD4V3svD.d.ts} +1 -1
- package/dist/{materialize-indexes-DzMCetZe.d.cts → materialize-indexes-DVRhd5h4.d.cts} +1 -1
- package/dist/{postgres-C5-WMKFA.d.ts → postgres-DaEWvN4x.d.cts} +1 -1
- package/dist/{postgres-DpJqtbSX.d.cts → postgres-u0a0HN2D.d.ts} +1 -1
- package/dist/profiler/index.d.cts +10 -9
- package/dist/profiler/index.d.ts +10 -9
- package/dist/provenance/index.cjs +38 -38
- package/dist/provenance/index.cjs.map +1 -1
- package/dist/provenance/index.d.cts +7 -7
- package/dist/provenance/index.d.ts +7 -7
- package/dist/provenance/index.js +8 -8
- package/dist/provenance/index.js.map +1 -1
- package/dist/schema/index.cjs +41 -41
- package/dist/schema/index.d.cts +7 -7
- package/dist/schema/index.d.ts +7 -7
- package/dist/schema/index.js +14 -14
- package/dist/{searchable-B4mUXZT6.d.cts → searchable-BT7j9_IK.d.cts} +2 -2
- package/dist/{searchable-C7jmPNLT.d.ts → searchable-CnYEancP.d.ts} +2 -2
- package/dist/{sqlite-Da7jiYu9.d.cts → sqlite-BrMoSsI7.d.cts} +1 -1
- package/dist/{sqlite-Ch5tSYQY.d.ts → sqlite-CHhZUyO5.d.ts} +1 -1
- package/dist/{store-view-CNcOG8bQ.d.cts → store-view-Bvdku0Ht.d.ts} +199 -35
- package/dist/{store-view-6C2vTWqf.d.ts → store-view-w-md0nQ4.d.cts} +199 -35
- package/dist/{temporal-BtrTYTiB.d.ts → temporal--x9T8K4S.d.ts} +1 -1
- package/dist/{temporal-CMpigMCW.d.cts → temporal-BCORwUau.d.cts} +1 -1
- package/dist/{types-G4sVM-76.d.cts → types-6-WJmSD4.d.cts} +1 -1
- package/dist/{types-D2rU5Taq.d.ts → types-COODtTJU.d.ts} +1 -1
- package/dist/{types-Dh-EgT-w.d.ts → types-Cjvkj0jA.d.cts} +351 -12
- package/dist/{types-Dh-EgT-w.d.cts → types-Cjvkj0jA.d.ts} +351 -12
- package/dist/{where-B8Y21kig.d.ts → where-5xVawAwL.d.ts} +1 -1
- package/dist/{where-DbZ9XDOI.d.cts → where-CUQmCR6d.d.cts} +1 -1
- package/package.json +1 -1
- package/dist/chunk-277UZV7X.cjs.map +0 -1
- package/dist/chunk-2SO5I5AI.cjs.map +0 -1
- package/dist/chunk-42XYPKZU.js.map +0 -1
- package/dist/chunk-5P6IPIT6.cjs.map +0 -1
- package/dist/chunk-5Q3P6OIC.cjs.map +0 -1
- package/dist/chunk-5ZPRE4CV.cjs.map +0 -1
- package/dist/chunk-6NB73BXV.js.map +0 -1
- package/dist/chunk-DP7KC6CL.js.map +0 -1
- package/dist/chunk-ECU53PMN.cjs.map +0 -1
- package/dist/chunk-EVFL2ZY5.js.map +0 -1
- package/dist/chunk-F2KVJ6FF.cjs.map +0 -1
- package/dist/chunk-FY4VY5EV.cjs.map +0 -1
- package/dist/chunk-HHBKGPEI.js.map +0 -1
- package/dist/chunk-K2HHCWZO.cjs.map +0 -1
- package/dist/chunk-KTBTSHU6.cjs.map +0 -1
- package/dist/chunk-LQLVJWUH.js.map +0 -1
- package/dist/chunk-M4GYQF2H.js.map +0 -1
- package/dist/chunk-NXIZL7ZZ.js.map +0 -1
- package/dist/chunk-O7XVCLXW.cjs.map +0 -1
- package/dist/chunk-OYJSYDIH.js.map +0 -1
- package/dist/chunk-RAWG2FEU.js.map +0 -1
- package/dist/chunk-U3YRCZ5L.cjs +0 -12
- package/dist/chunk-UTTW2Q3M.cjs.map +0 -1
- package/dist/chunk-UZLEQFTV.js.map +0 -1
- package/dist/chunk-V2GZBPY2.cjs.map +0 -1
- package/dist/chunk-VGMNGWBR.cjs +0 -12
- package/dist/chunk-WYQILW5V.js.map +0 -1
- package/dist/chunk-X2XOQZT3.cjs.map +0 -1
- package/dist/chunk-YPVQYM3L.js.map +0 -1
- package/dist/chunk-ZIRC2U6G.js.map +0 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
3
|
+
var chunk7V2FGGI2_cjs = require('./chunk-7V2FGGI2.cjs');
|
|
4
|
+
var chunkCPEL3YIR_cjs = require('./chunk-CPEL3YIR.cjs');
|
|
5
|
+
var chunk3PRKZW6D_cjs = require('./chunk-3PRKZW6D.cjs');
|
|
6
|
+
var chunkKKYELPZ2_cjs = require('./chunk-KKYELPZ2.cjs');
|
|
7
7
|
var chunkACSVZPK7_cjs = require('./chunk-ACSVZPK7.cjs');
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
8
|
+
var chunkZTAJL4DT_cjs = require('./chunk-ZTAJL4DT.cjs');
|
|
9
|
+
var chunkOVUUTCPJ_cjs = require('./chunk-OVUUTCPJ.cjs');
|
|
10
|
+
var chunkU5W4LKZV_cjs = require('./chunk-U5W4LKZV.cjs');
|
|
11
11
|
var chunk764JHTLT_cjs = require('./chunk-764JHTLT.cjs');
|
|
12
|
-
var
|
|
13
|
-
var
|
|
12
|
+
var chunkA4PBRX4C_cjs = require('./chunk-A4PBRX4C.cjs');
|
|
13
|
+
var chunkC4F7VJ5D_cjs = require('./chunk-C4F7VJ5D.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 = chunk3PRKZW6D_cjs.rowPropsToObject(row.props);
|
|
22
|
+
const props = chunkA4PBRX4C_cjs.filterReservedKeys(rawProps, chunkA4PBRX4C_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 = chunk3PRKZW6D_cjs.rowPropsToObject(row.props);
|
|
42
|
+
const props = chunkA4PBRX4C_cjs.filterReservedKeys(rawProps, chunkA4PBRX4C_cjs.RESERVED_EDGE_KEYS);
|
|
43
43
|
return {
|
|
44
44
|
id: row.id,
|
|
45
45
|
kind: row.kind,
|
|
@@ -62,13 +62,41 @@ function rowToEdgeMeta(row) {
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
// src/store/operations/write-transaction.ts
|
|
65
|
+
async function lockSchemaVersionForStoreWrite(ctx, backend) {
|
|
66
|
+
const expectedVersion = ctx.schemaVersion;
|
|
67
|
+
if (expectedVersion === void 0) return;
|
|
68
|
+
if ("transaction" in backend && !backend.capabilities.transactions) {
|
|
69
|
+
throw new chunkC4F7VJ5D_cjs.ConfigurationError(
|
|
70
|
+
"Schema-managed Store writes require a transactional backend so schema changes and entity writes can share one fence.",
|
|
71
|
+
{
|
|
72
|
+
code: "SCHEMA_WRITE_FENCE_UNSUPPORTED",
|
|
73
|
+
graphId: ctx.graphId
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
const lockSchemaVersionForWrite = backend.lockSchemaVersionForWrite;
|
|
78
|
+
if (lockSchemaVersionForWrite === void 0) {
|
|
79
|
+
throw new chunkC4F7VJ5D_cjs.ConfigurationError(
|
|
80
|
+
"This backend cannot fence schema-managed Store writes against a concurrent schema change.",
|
|
81
|
+
{
|
|
82
|
+
code: "SCHEMA_WRITE_FENCE_UNSUPPORTED",
|
|
83
|
+
graphId: ctx.graphId
|
|
84
|
+
}
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
await lockSchemaVersionForWrite({
|
|
88
|
+
graphId: ctx.graphId,
|
|
89
|
+
expectedVersion
|
|
90
|
+
});
|
|
91
|
+
}
|
|
65
92
|
function runInWriteTransaction(ctx, backend, fn) {
|
|
66
93
|
const ownsWriteLock = "transaction" in backend && backend.capabilities.transactions;
|
|
67
|
-
return
|
|
68
|
-
|
|
94
|
+
return chunk3PRKZW6D_cjs.runOptionallyInTransaction(backend, async (target) => {
|
|
95
|
+
await lockSchemaVersionForStoreWrite(ctx, target);
|
|
96
|
+
const lock = ctx.historyEnabled || ctx.revisionTrackingEnabled ? await chunk7V2FGGI2_cjs.lockRecordedGraphWrite(target, ctx.graphId) : chunk7V2FGGI2_cjs.uncapturedGraphWriteLock();
|
|
69
97
|
const result = await fn(target, lock);
|
|
70
98
|
if (ctx.revisionTrackingEnabled && !ctx.historyEnabled) {
|
|
71
|
-
await
|
|
99
|
+
await chunk7V2FGGI2_cjs.advanceRevisionClock(
|
|
72
100
|
target,
|
|
73
101
|
ctx.revisionSchema,
|
|
74
102
|
ctx.graphId,
|
|
@@ -91,7 +119,7 @@ async function checkDisjointnessConstraint(ctx, kind, id) {
|
|
|
91
119
|
for (const disjointKind of disjointKinds) {
|
|
92
120
|
const existing = await ctx.backend.getNode(ctx.graphId, disjointKind, id);
|
|
93
121
|
if (existing && !existing.deleted_at) {
|
|
94
|
-
const error =
|
|
122
|
+
const error = chunk7V2FGGI2_cjs.checkDisjointness(id, kind, [disjointKind], ctx.registry);
|
|
95
123
|
if (error) throw error;
|
|
96
124
|
}
|
|
97
125
|
}
|
|
@@ -108,7 +136,7 @@ async function checkCardinalityConstraint(ctx, edgeKind, cardinality, fromKind,
|
|
|
108
136
|
fromKind,
|
|
109
137
|
fromId
|
|
110
138
|
});
|
|
111
|
-
const error =
|
|
139
|
+
const error = chunk7V2FGGI2_cjs.checkCardinality(
|
|
112
140
|
edgeKind,
|
|
113
141
|
fromKind,
|
|
114
142
|
fromId,
|
|
@@ -128,7 +156,7 @@ async function checkCardinalityConstraint(ctx, edgeKind, cardinality, fromKind,
|
|
|
128
156
|
toKind,
|
|
129
157
|
toId
|
|
130
158
|
});
|
|
131
|
-
const error =
|
|
159
|
+
const error = chunk7V2FGGI2_cjs.checkUniqueEdge(
|
|
132
160
|
edgeKind,
|
|
133
161
|
fromKind,
|
|
134
162
|
fromId,
|
|
@@ -150,7 +178,7 @@ async function checkCardinalityConstraint(ctx, edgeKind, cardinality, fromKind,
|
|
|
150
178
|
fromId,
|
|
151
179
|
activeOnly: true
|
|
152
180
|
});
|
|
153
|
-
const error =
|
|
181
|
+
const error = chunk7V2FGGI2_cjs.checkCardinality(
|
|
154
182
|
edgeKind,
|
|
155
183
|
fromKind,
|
|
156
184
|
fromId,
|
|
@@ -167,7 +195,7 @@ async function checkCardinalityConstraint(ctx, edgeKind, cardinality, fromKind,
|
|
|
167
195
|
// src/store/operations/node-operations.ts
|
|
168
196
|
function getNodeRegistration(graph, kind) {
|
|
169
197
|
const registration = graph.nodes[kind];
|
|
170
|
-
if (registration === void 0) throw new
|
|
198
|
+
if (registration === void 0) throw new chunkC4F7VJ5D_cjs.KindNotFoundError(kind, "node");
|
|
171
199
|
return registration;
|
|
172
200
|
}
|
|
173
201
|
var CACHE_KEY_SEPARATOR = "\0";
|
|
@@ -178,7 +206,7 @@ function buildUniqueCacheKey(graphId, nodeKind, constraintName, key) {
|
|
|
178
206
|
return `${graphId}${CACHE_KEY_SEPARATOR}${nodeKind}${CACHE_KEY_SEPARATOR}${constraintName}${CACHE_KEY_SEPARATOR}${key}`;
|
|
179
207
|
}
|
|
180
208
|
function createNodeAlreadyExistsError(kind, id) {
|
|
181
|
-
return new
|
|
209
|
+
return new chunkC4F7VJ5D_cjs.ValidationError(
|
|
182
210
|
`Node already exists: ${kind}/${id}`,
|
|
183
211
|
{
|
|
184
212
|
entityType: "node",
|
|
@@ -219,7 +247,7 @@ function resolveConstraint(graph, kind, constraintName) {
|
|
|
219
247
|
(candidate) => candidate.name === constraintName
|
|
220
248
|
);
|
|
221
249
|
if (constraint === void 0) {
|
|
222
|
-
throw new
|
|
250
|
+
throw new chunkC4F7VJ5D_cjs.NodeConstraintNotFoundError(constraintName, kind);
|
|
223
251
|
}
|
|
224
252
|
return constraint;
|
|
225
253
|
}
|
|
@@ -280,8 +308,8 @@ function createNodeBatchValidationBackend(graphId, registry, backend) {
|
|
|
280
308
|
}
|
|
281
309
|
function registerPendingUniqueEntries(kind, id, props, constraints) {
|
|
282
310
|
for (const constraint of constraints) {
|
|
283
|
-
if (!
|
|
284
|
-
const key =
|
|
311
|
+
if (!chunk7V2FGGI2_cjs.checkWherePredicate(constraint, props)) continue;
|
|
312
|
+
const key = chunk7V2FGGI2_cjs.computeUniqueKey(
|
|
285
313
|
props,
|
|
286
314
|
constraint.fields,
|
|
287
315
|
constraint.collation
|
|
@@ -294,7 +322,7 @@ function createNodeBatchValidationBackend(graphId, registry, backend) {
|
|
|
294
322
|
);
|
|
295
323
|
pendingUniqueOwners.set(concreteEntryKey, id);
|
|
296
324
|
if (constraint.scope !== "kind") {
|
|
297
|
-
const kindsToCheck =
|
|
325
|
+
const kindsToCheck = chunk7V2FGGI2_cjs.getKindsForUniquenessCheck(
|
|
298
326
|
kind,
|
|
299
327
|
constraint.scope,
|
|
300
328
|
registry
|
|
@@ -313,12 +341,12 @@ function createNodeBatchValidationBackend(graphId, registry, backend) {
|
|
|
313
341
|
}
|
|
314
342
|
function registerAppliedNodeUpdate(kind, id, oldProps, newProps, constraints) {
|
|
315
343
|
for (const constraint of constraints) {
|
|
316
|
-
const oldApplies =
|
|
317
|
-
const newApplies =
|
|
318
|
-
const oldKey = oldApplies ?
|
|
319
|
-
const newKey = newApplies ?
|
|
344
|
+
const oldApplies = chunk7V2FGGI2_cjs.checkWherePredicate(constraint, oldProps);
|
|
345
|
+
const newApplies = chunk7V2FGGI2_cjs.checkWherePredicate(constraint, newProps);
|
|
346
|
+
const oldKey = oldApplies ? chunk7V2FGGI2_cjs.computeUniqueKey(oldProps, constraint.fields, constraint.collation) : void 0;
|
|
347
|
+
const newKey = newApplies ? chunk7V2FGGI2_cjs.computeUniqueKey(newProps, constraint.fields, constraint.collation) : void 0;
|
|
320
348
|
if (oldKey === newKey) continue;
|
|
321
|
-
const kindsToCheck =
|
|
349
|
+
const kindsToCheck = chunk7V2FGGI2_cjs.getKindsForUniquenessCheck(
|
|
322
350
|
kind,
|
|
323
351
|
constraint.scope,
|
|
324
352
|
registry
|
|
@@ -358,7 +386,7 @@ function createNodeBatchValidationBackend(graphId, registry, backend) {
|
|
|
358
386
|
if (uniqueCache.has(cacheKey)) return;
|
|
359
387
|
uniqueCache.set(cacheKey, row);
|
|
360
388
|
}
|
|
361
|
-
const validationBackend =
|
|
389
|
+
const validationBackend = chunk3PRKZW6D_cjs.createBackendOverlay(backend, {
|
|
362
390
|
getNode: getNodeCached,
|
|
363
391
|
checkUnique: checkUniqueCached
|
|
364
392
|
});
|
|
@@ -375,7 +403,7 @@ function draftNodeCreate(ctx, input, id, options) {
|
|
|
375
403
|
const kind = input.kind;
|
|
376
404
|
const registration = getNodeRegistration(ctx.graph, kind);
|
|
377
405
|
const nodeKind = registration.type;
|
|
378
|
-
const validatedProps = options?.propsPreValidated === true ? input.props :
|
|
406
|
+
const validatedProps = options?.propsPreValidated === true ? input.props : chunkKKYELPZ2_cjs.validateNodeProps(nodeKind.schema, input.props, {
|
|
379
407
|
kind,
|
|
380
408
|
operation: "create"
|
|
381
409
|
});
|
|
@@ -385,8 +413,8 @@ function draftNodeCreate(ctx, input, id, options) {
|
|
|
385
413
|
nodeKind,
|
|
386
414
|
uniqueConstraints: registration.unique ?? [],
|
|
387
415
|
validatedProps,
|
|
388
|
-
validFrom:
|
|
389
|
-
validTo:
|
|
416
|
+
validFrom: chunkZTAJL4DT_cjs.validateOptionalCanonicalIsoDate(input.validFrom, "validFrom"),
|
|
417
|
+
validTo: chunkZTAJL4DT_cjs.validateOptionalCanonicalIsoDate(input.validTo, "validTo")
|
|
390
418
|
};
|
|
391
419
|
}
|
|
392
420
|
async function finishNodeCreatePreparation(ctx, draft, backend) {
|
|
@@ -401,8 +429,8 @@ async function finishNodeCreatePreparation(ctx, draft, backend) {
|
|
|
401
429
|
backend
|
|
402
430
|
};
|
|
403
431
|
await checkDisjointnessConstraint(constraintContext, kind, id);
|
|
404
|
-
await
|
|
405
|
-
|
|
432
|
+
await chunk7V2FGGI2_cjs.checkUniquenessConstraints(
|
|
433
|
+
chunk7V2FGGI2_cjs.createUniquenessContext(ctx.graphId, ctx.registry, backend),
|
|
406
434
|
kind,
|
|
407
435
|
id,
|
|
408
436
|
validatedProps,
|
|
@@ -432,8 +460,8 @@ async function validateAndPrepareNodeCreate(ctx, input, id, backend, options) {
|
|
|
432
460
|
);
|
|
433
461
|
}
|
|
434
462
|
async function finalizeNodeCreateBatch(ctx, preparedCreates, backend, lock) {
|
|
435
|
-
await
|
|
436
|
-
|
|
463
|
+
await chunk7V2FGGI2_cjs.applyNodeInsertSideEffectsBatch(
|
|
464
|
+
chunk7V2FGGI2_cjs.createNodeWriteContext(ctx.graphId, ctx.registry, lock),
|
|
437
465
|
preparedCreates.map((prepared) => ({
|
|
438
466
|
kind: prepared.kind,
|
|
439
467
|
id: prepared.id,
|
|
@@ -445,8 +473,8 @@ async function finalizeNodeCreateBatch(ctx, preparedCreates, backend, lock) {
|
|
|
445
473
|
);
|
|
446
474
|
}
|
|
447
475
|
async function finalizeNodeCreate(ctx, prepared, backend, lock) {
|
|
448
|
-
await
|
|
449
|
-
|
|
476
|
+
await chunk7V2FGGI2_cjs.applyNodeInsertSideEffects(
|
|
477
|
+
chunk7V2FGGI2_cjs.createNodeWriteContext(ctx.graphId, ctx.registry, lock),
|
|
450
478
|
{
|
|
451
479
|
kind: prepared.kind,
|
|
452
480
|
id: prepared.id,
|
|
@@ -459,7 +487,7 @@ async function finalizeNodeCreate(ctx, prepared, backend, lock) {
|
|
|
459
487
|
}
|
|
460
488
|
function computeNodeUpdate(ctx, kind, id, existingProps, inputProps) {
|
|
461
489
|
const registration = getNodeRegistration(ctx.graph, kind);
|
|
462
|
-
const validatedProps =
|
|
490
|
+
const validatedProps = chunkKKYELPZ2_cjs.validateNodeProps(
|
|
463
491
|
registration.type.schema,
|
|
464
492
|
{ ...existingProps, ...inputProps },
|
|
465
493
|
{ kind, operation: "update", id }
|
|
@@ -467,7 +495,7 @@ function computeNodeUpdate(ctx, kind, id, existingProps, inputProps) {
|
|
|
467
495
|
return { registration, validatedProps };
|
|
468
496
|
}
|
|
469
497
|
function resolveNodeUpdateProps(ctx, existing, inputProps) {
|
|
470
|
-
const existingProps =
|
|
498
|
+
const existingProps = chunk3PRKZW6D_cjs.rowPropsToObject(existing.props);
|
|
471
499
|
const { registration, validatedProps } = computeNodeUpdate(
|
|
472
500
|
ctx,
|
|
473
501
|
existing.kind,
|
|
@@ -493,15 +521,15 @@ function nodeUpsertDirtyCheck(ctx, kind, id, existingProps, inputProps) {
|
|
|
493
521
|
async function performNodeUpdate(ctx, input, backend, lock, options) {
|
|
494
522
|
const { kind, id } = input;
|
|
495
523
|
const existing = await backend.getNode(ctx.graphId, kind, id);
|
|
496
|
-
if (!existing) throw new
|
|
524
|
+
if (!existing) throw new chunkC4F7VJ5D_cjs.NodeNotFoundError(kind, id);
|
|
497
525
|
const { registration, validatedProps } = resolveNodeUpdateProps(
|
|
498
526
|
ctx,
|
|
499
527
|
existing,
|
|
500
528
|
input.props
|
|
501
529
|
);
|
|
502
530
|
const nodeKind = registration.type;
|
|
503
|
-
const validTo =
|
|
504
|
-
const writeContext =
|
|
531
|
+
const validTo = chunkZTAJL4DT_cjs.validateOptionalCanonicalIsoDate(input.validTo, "validTo");
|
|
532
|
+
const writeContext = chunk7V2FGGI2_cjs.createNodeWriteContext(ctx.graphId, ctx.registry, lock);
|
|
505
533
|
const shared = {
|
|
506
534
|
schema: nodeKind.schema,
|
|
507
535
|
validatedProps,
|
|
@@ -509,15 +537,15 @@ async function performNodeUpdate(ctx, input, backend, lock, options) {
|
|
|
509
537
|
...validTo !== void 0 && { validTo }
|
|
510
538
|
};
|
|
511
539
|
if (options?.clearDeleted) {
|
|
512
|
-
const row2 = await
|
|
540
|
+
const row2 = await chunk7V2FGGI2_cjs.applyNodeUpdate(
|
|
513
541
|
writeContext,
|
|
514
542
|
{ ...shared, existing, clearDeleted: true },
|
|
515
543
|
backend
|
|
516
544
|
);
|
|
517
545
|
return rowToNode(row2);
|
|
518
546
|
}
|
|
519
|
-
if (!
|
|
520
|
-
const row = await
|
|
547
|
+
if (!chunk3PRKZW6D_cjs.isLiveNodeRow(existing)) throw new chunkC4F7VJ5D_cjs.NodeNotFoundError(kind, id);
|
|
548
|
+
const row = await chunk7V2FGGI2_cjs.applyNodeUpdate(
|
|
521
549
|
writeContext,
|
|
522
550
|
{ ...shared, existing },
|
|
523
551
|
backend
|
|
@@ -545,13 +573,13 @@ async function primeBatchValidationCaches(ctx, drafts, backend, seams) {
|
|
|
545
573
|
const groups = /* @__PURE__ */ new Map();
|
|
546
574
|
for (const draft of drafts) {
|
|
547
575
|
for (const constraint of draft.uniqueConstraints) {
|
|
548
|
-
if (!
|
|
549
|
-
const key =
|
|
576
|
+
if (!chunk7V2FGGI2_cjs.checkWherePredicate(constraint, draft.validatedProps)) continue;
|
|
577
|
+
const key = chunk7V2FGGI2_cjs.computeUniqueKey(
|
|
550
578
|
draft.validatedProps,
|
|
551
579
|
constraint.fields,
|
|
552
580
|
constraint.collation
|
|
553
581
|
);
|
|
554
|
-
const kindsToCheck =
|
|
582
|
+
const kindsToCheck = chunk7V2FGGI2_cjs.getKindsForUniquenessCheck(
|
|
555
583
|
draft.kind,
|
|
556
584
|
constraint.scope,
|
|
557
585
|
ctx.registry
|
|
@@ -597,7 +625,7 @@ async function prepareBatchCreates(ctx, inputs, backend, options) {
|
|
|
597
625
|
seedUniqueRow
|
|
598
626
|
} = createNodeBatchValidationBackend(ctx.graphId, ctx.registry, backend);
|
|
599
627
|
const drafts = inputs.map(
|
|
600
|
-
(input) => draftNodeCreate(ctx, input, input.id ??
|
|
628
|
+
(input) => draftNodeCreate(ctx, input, input.id ?? chunk7V2FGGI2_cjs.generateId(), options)
|
|
601
629
|
);
|
|
602
630
|
await primeBatchValidationCaches(ctx, drafts, backend, {
|
|
603
631
|
seedNodeRow,
|
|
@@ -673,7 +701,7 @@ async function batchCheckUniqueAcrossKinds(backend, graphId, constraintName, uni
|
|
|
673
701
|
}
|
|
674
702
|
async function executeNodeCreateInternal(ctx, input, backend, options) {
|
|
675
703
|
const kind = input.kind;
|
|
676
|
-
const id = input.id ??
|
|
704
|
+
const id = input.id ?? chunk7V2FGGI2_cjs.generateId();
|
|
677
705
|
const opContext = ctx.createOperationContext("create", "node", kind, id);
|
|
678
706
|
const shouldReturnRow = options?.returnRow ?? true;
|
|
679
707
|
return runHookedWriteOperation(
|
|
@@ -692,8 +720,8 @@ async function executeNodeCreateInternal(ctx, input, backend, options) {
|
|
|
692
720
|
if (shouldReturnRow) {
|
|
693
721
|
row = await target.insertNode(prepared.insertParams);
|
|
694
722
|
} else {
|
|
695
|
-
await
|
|
696
|
-
|
|
723
|
+
await chunk7V2FGGI2_cjs.runInsertNoReturn(
|
|
724
|
+
chunk7V2FGGI2_cjs.nodeInsertDispatch(target),
|
|
697
725
|
prepared.insertParams
|
|
698
726
|
);
|
|
699
727
|
}
|
|
@@ -709,7 +737,7 @@ async function executeNodeCreate(ctx, input, backend, options) {
|
|
|
709
737
|
...options
|
|
710
738
|
});
|
|
711
739
|
if (!result) {
|
|
712
|
-
throw new
|
|
740
|
+
throw new chunkC4F7VJ5D_cjs.DatabaseOperationError(
|
|
713
741
|
"Node create failed: expected created node row",
|
|
714
742
|
{ operation: "insert", entity: "node" }
|
|
715
743
|
);
|
|
@@ -724,7 +752,7 @@ async function executeNodeCreateNoReturnBatch(ctx, inputs, backend) {
|
|
|
724
752
|
inputs,
|
|
725
753
|
target
|
|
726
754
|
);
|
|
727
|
-
await
|
|
755
|
+
await chunk7V2FGGI2_cjs.runInsertBatch(chunk7V2FGGI2_cjs.nodeInsertDispatch(target), batchInsertParams);
|
|
728
756
|
await finalizeNodeCreateBatch(ctx, preparedCreates, target, lock);
|
|
729
757
|
});
|
|
730
758
|
}
|
|
@@ -737,8 +765,8 @@ async function executeNodeCreateBatch(ctx, inputs, backend, options) {
|
|
|
737
765
|
target,
|
|
738
766
|
options
|
|
739
767
|
);
|
|
740
|
-
const rows = await
|
|
741
|
-
|
|
768
|
+
const rows = await chunk7V2FGGI2_cjs.runInsertBatchReturning(
|
|
769
|
+
chunk7V2FGGI2_cjs.nodeInsertDispatch(target),
|
|
742
770
|
batchInsertParams
|
|
743
771
|
);
|
|
744
772
|
await finalizeNodeCreateBatch(ctx, preparedCreates, target, lock);
|
|
@@ -777,9 +805,9 @@ async function executeNodeDelete(ctx, kind, id, backend) {
|
|
|
777
805
|
async (target, lock) => {
|
|
778
806
|
const registration = getNodeRegistration(ctx.graph, kind);
|
|
779
807
|
const preflight = await target.getNode(ctx.graphId, kind, id);
|
|
780
|
-
if (!preflight || !
|
|
781
|
-
await
|
|
782
|
-
|
|
808
|
+
if (!preflight || !chunk3PRKZW6D_cjs.isLiveNodeRow(preflight)) return;
|
|
809
|
+
await chunk7V2FGGI2_cjs.applyNodeSoftDelete(
|
|
810
|
+
chunk7V2FGGI2_cjs.createNodeWriteContext(ctx.graphId, ctx.registry, lock),
|
|
783
811
|
{
|
|
784
812
|
existing: preflight,
|
|
785
813
|
schema: registration.type.schema,
|
|
@@ -801,8 +829,8 @@ async function executeNodeHardDelete(ctx, kind, id, backend) {
|
|
|
801
829
|
backend,
|
|
802
830
|
async (target, lock) => {
|
|
803
831
|
const registration = getNodeRegistration(ctx.graph, kind);
|
|
804
|
-
await
|
|
805
|
-
|
|
832
|
+
await chunk7V2FGGI2_cjs.applyNodeHardDelete(
|
|
833
|
+
chunk7V2FGGI2_cjs.createNodeWriteContext(ctx.graphId, ctx.registry, lock),
|
|
806
834
|
{
|
|
807
835
|
kind,
|
|
808
836
|
id,
|
|
@@ -818,12 +846,12 @@ async function executeNodeGetOrCreateByConstraint(ctx, kind, constraintName, pro
|
|
|
818
846
|
const ifExists = options?.ifExists ?? "return";
|
|
819
847
|
const registration = getNodeRegistration(ctx.graph, kind);
|
|
820
848
|
const nodeKind = registration.type;
|
|
821
|
-
const validatedProps =
|
|
849
|
+
const validatedProps = chunkKKYELPZ2_cjs.validateNodeProps(nodeKind.schema, props, {
|
|
822
850
|
kind,
|
|
823
851
|
operation: "create"
|
|
824
852
|
});
|
|
825
853
|
const constraint = resolveConstraint(ctx.graph, kind, constraintName);
|
|
826
|
-
if (!
|
|
854
|
+
if (!chunk7V2FGGI2_cjs.checkWherePredicate(constraint, validatedProps)) {
|
|
827
855
|
const node = await executeNodeCreate(
|
|
828
856
|
ctx,
|
|
829
857
|
{ kind, props: validatedProps },
|
|
@@ -832,12 +860,12 @@ async function executeNodeGetOrCreateByConstraint(ctx, kind, constraintName, pro
|
|
|
832
860
|
);
|
|
833
861
|
return { node, action: "created" };
|
|
834
862
|
}
|
|
835
|
-
const key =
|
|
863
|
+
const key = chunk7V2FGGI2_cjs.computeUniqueKey(
|
|
836
864
|
validatedProps,
|
|
837
865
|
constraint.fields,
|
|
838
866
|
constraint.collation
|
|
839
867
|
);
|
|
840
|
-
const kindsToCheck =
|
|
868
|
+
const kindsToCheck = chunk7V2FGGI2_cjs.getKindsForUniquenessCheck(
|
|
841
869
|
kind,
|
|
842
870
|
constraint.scope,
|
|
843
871
|
ctx.registry
|
|
@@ -894,25 +922,25 @@ async function executeNodeGetOrCreateByConstraint(ctx, kind, constraintName, pro
|
|
|
894
922
|
try {
|
|
895
923
|
return await attempt();
|
|
896
924
|
} catch (error) {
|
|
897
|
-
if (!(error instanceof
|
|
925
|
+
if (!(error instanceof chunkC4F7VJ5D_cjs.UniquenessError)) throw error;
|
|
898
926
|
return attempt();
|
|
899
927
|
}
|
|
900
928
|
}
|
|
901
929
|
async function executeNodeFindByConstraint(ctx, kind, constraintName, props, backend) {
|
|
902
930
|
const registration = getNodeRegistration(ctx.graph, kind);
|
|
903
931
|
const nodeKind = registration.type;
|
|
904
|
-
const validatedProps =
|
|
932
|
+
const validatedProps = chunkKKYELPZ2_cjs.validateNodeProps(nodeKind.schema, props, {
|
|
905
933
|
kind,
|
|
906
934
|
operation: "create"
|
|
907
935
|
});
|
|
908
936
|
const constraint = resolveConstraint(ctx.graph, kind, constraintName);
|
|
909
|
-
if (!
|
|
910
|
-
const key =
|
|
937
|
+
if (!chunk7V2FGGI2_cjs.checkWherePredicate(constraint, validatedProps)) return void 0;
|
|
938
|
+
const key = chunk7V2FGGI2_cjs.computeUniqueKey(
|
|
911
939
|
validatedProps,
|
|
912
940
|
constraint.fields,
|
|
913
941
|
constraint.collation
|
|
914
942
|
);
|
|
915
|
-
const kindsToCheck =
|
|
943
|
+
const kindsToCheck = chunk7V2FGGI2_cjs.getKindsForUniquenessCheck(
|
|
916
944
|
kind,
|
|
917
945
|
constraint.scope,
|
|
918
946
|
ctx.registry
|
|
@@ -938,12 +966,12 @@ async function executeNodeFindByConstraint(ctx, kind, constraintName, props, bac
|
|
|
938
966
|
function validateAndComputeKeys(nodeKind, kind, constraint, items) {
|
|
939
967
|
const validated = [];
|
|
940
968
|
for (const item of items) {
|
|
941
|
-
const validatedProps =
|
|
969
|
+
const validatedProps = chunkKKYELPZ2_cjs.validateNodeProps(nodeKind.schema, item.props, {
|
|
942
970
|
kind,
|
|
943
971
|
operation: "create"
|
|
944
972
|
});
|
|
945
|
-
const applies =
|
|
946
|
-
const key = applies ?
|
|
973
|
+
const applies = chunk7V2FGGI2_cjs.checkWherePredicate(constraint, validatedProps);
|
|
974
|
+
const key = applies ? chunk7V2FGGI2_cjs.computeUniqueKey(
|
|
947
975
|
validatedProps,
|
|
948
976
|
constraint.fields,
|
|
949
977
|
constraint.collation
|
|
@@ -966,7 +994,7 @@ async function executeNodeBulkFindByConstraint(ctx, kind, constraintName, items,
|
|
|
966
994
|
const constraint = resolveConstraint(ctx.graph, kind, constraintName);
|
|
967
995
|
const validated = validateAndComputeKeys(nodeKind, kind, constraint, items);
|
|
968
996
|
const uniqueKeys = collectUniqueKeys(validated);
|
|
969
|
-
const kindsToCheck =
|
|
997
|
+
const kindsToCheck = chunk7V2FGGI2_cjs.getKindsForUniquenessCheck(
|
|
970
998
|
kind,
|
|
971
999
|
constraint.scope,
|
|
972
1000
|
ctx.registry
|
|
@@ -1016,10 +1044,10 @@ function resolveNodeIndex(graph, kind, indexName) {
|
|
|
1016
1044
|
(candidate) => candidate.entity === "node" && candidate.kind === kind && candidate.name === indexName
|
|
1017
1045
|
);
|
|
1018
1046
|
if (declaration?.entity !== "node") {
|
|
1019
|
-
throw new
|
|
1047
|
+
throw new chunkC4F7VJ5D_cjs.NodeIndexNotFoundError(indexName, kind);
|
|
1020
1048
|
}
|
|
1021
1049
|
if (declaration.method !== void 0) {
|
|
1022
|
-
throw new
|
|
1050
|
+
throw new chunkC4F7VJ5D_cjs.ConfigurationError(
|
|
1023
1051
|
`bulkFindByIndex cannot probe index "${indexName}" (method "${declaration.method}"): only btree indexes serve equality probes.`,
|
|
1024
1052
|
{ indexName, kind, method: declaration.method }
|
|
1025
1053
|
);
|
|
@@ -1057,7 +1085,7 @@ function validateIndexProbeValue(value, valueType, pointer, kind) {
|
|
|
1057
1085
|
}
|
|
1058
1086
|
}
|
|
1059
1087
|
function indexProbeTypeError(pointer, kind, expected, value) {
|
|
1060
|
-
return new
|
|
1088
|
+
return new chunkC4F7VJ5D_cjs.ValidationError(
|
|
1061
1089
|
`Index probe value for "${pointer}" on node kind "${kind}" has an incompatible type`,
|
|
1062
1090
|
{
|
|
1063
1091
|
entityType: "node",
|
|
@@ -1091,7 +1119,7 @@ async function executeNodeBulkFindByIndex(ctx, kind, indexName, items, backend,
|
|
|
1091
1119
|
if (items.length === 0) return [];
|
|
1092
1120
|
const index = resolveNodeIndex(ctx.graph, kind, indexName);
|
|
1093
1121
|
if (index.fields.length === 0) {
|
|
1094
|
-
throw new
|
|
1122
|
+
throw new chunkC4F7VJ5D_cjs.ConfigurationError(
|
|
1095
1123
|
`bulkFindByIndex requires an index with at least one prop-based field on index "${indexName}" (node kind "${kind}")`,
|
|
1096
1124
|
{ indexName, kind },
|
|
1097
1125
|
{
|
|
@@ -1100,7 +1128,7 @@ async function executeNodeBulkFindByIndex(ctx, kind, indexName, items, backend,
|
|
|
1100
1128
|
);
|
|
1101
1129
|
}
|
|
1102
1130
|
if (index.fieldValueTypes.includes("date")) {
|
|
1103
|
-
throw new
|
|
1131
|
+
throw new chunkC4F7VJ5D_cjs.ConfigurationError(
|
|
1104
1132
|
`bulkFindByIndex does not support date-typed key fields on index "${indexName}" (node kind "${kind}")`,
|
|
1105
1133
|
{ indexName, kind },
|
|
1106
1134
|
{
|
|
@@ -1110,7 +1138,7 @@ async function executeNodeBulkFindByIndex(ctx, kind, indexName, items, backend,
|
|
|
1110
1138
|
}
|
|
1111
1139
|
const limitPerInput = options?.limitPerInput;
|
|
1112
1140
|
if (limitPerInput !== void 0 && (!Number.isInteger(limitPerInput) || limitPerInput <= 0)) {
|
|
1113
|
-
throw new
|
|
1141
|
+
throw new chunkC4F7VJ5D_cjs.ValidationError(
|
|
1114
1142
|
"bulkFindByIndex limitPerInput must be a positive integer",
|
|
1115
1143
|
{
|
|
1116
1144
|
entityType: "node",
|
|
@@ -1125,7 +1153,7 @@ async function executeNodeBulkFindByIndex(ctx, kind, indexName, items, backend,
|
|
|
1125
1153
|
}
|
|
1126
1154
|
);
|
|
1127
1155
|
}
|
|
1128
|
-
const adapter =
|
|
1156
|
+
const adapter = chunkOVUUTCPJ_cjs.getDialect(backend.dialect);
|
|
1129
1157
|
const probes = items.map(
|
|
1130
1158
|
(item) => index.fields.map((pointer, position) => {
|
|
1131
1159
|
const value = chunkTDXIBCGY_cjs.resolveJsonPointer(item.props, pointer);
|
|
@@ -1152,47 +1180,47 @@ async function executeNodeBulkFindByIndex(ctx, kind, indexName, items, backend,
|
|
|
1152
1180
|
}
|
|
1153
1181
|
groupToInputs[existing]?.push(inputIndex);
|
|
1154
1182
|
}
|
|
1155
|
-
const schema = backend.tableNames ?
|
|
1183
|
+
const schema = backend.tableNames ? chunkCPEL3YIR_cjs.createSqlSchema(backend.tableNames) : chunkCPEL3YIR_cjs.DEFAULT_SQL_SCHEMA;
|
|
1156
1184
|
const compileContext = {
|
|
1157
1185
|
dialect: backend.dialect,
|
|
1158
|
-
propsColumn:
|
|
1159
|
-
systemColumn: (column) =>
|
|
1186
|
+
propsColumn: chunkU5W4LKZV_cjs.sql.raw(`"props"`),
|
|
1187
|
+
systemColumn: (column) => chunkU5W4LKZV_cjs.sql.raw(`"${column}"`)
|
|
1160
1188
|
};
|
|
1161
|
-
const fieldKeys =
|
|
1189
|
+
const fieldKeys = chunkOVUUTCPJ_cjs.compileNodeIndexFieldKeys(index, compileContext);
|
|
1162
1190
|
const groupPredicates = groupProbes.map(
|
|
1163
|
-
(probe) =>
|
|
1191
|
+
(probe) => chunkU5W4LKZV_cjs.sql`(${chunkU5W4LKZV_cjs.sql.join(
|
|
1164
1192
|
fieldKeys.map((fieldKey, position) => {
|
|
1165
1193
|
const value = probe[position];
|
|
1166
1194
|
if (value === void 0 || value === null) {
|
|
1167
|
-
return
|
|
1195
|
+
return chunkU5W4LKZV_cjs.sql`${fieldKey} IS NULL`;
|
|
1168
1196
|
}
|
|
1169
1197
|
return adapter.nullSafeEquals(
|
|
1170
1198
|
fieldKey,
|
|
1171
|
-
|
|
1199
|
+
chunkU5W4LKZV_cjs.sql`${coerceIndexProbeBind(value, adapter)}`
|
|
1172
1200
|
);
|
|
1173
1201
|
}),
|
|
1174
|
-
|
|
1202
|
+
chunkU5W4LKZV_cjs.sql` AND `
|
|
1175
1203
|
)})`
|
|
1176
1204
|
);
|
|
1177
1205
|
const caseBranches = groupPredicates.map(
|
|
1178
|
-
(predicate, group) =>
|
|
1206
|
+
(predicate, group) => chunkU5W4LKZV_cjs.sql`WHEN ${predicate} THEN ${chunkU5W4LKZV_cjs.sql.raw(String(group))}`
|
|
1179
1207
|
);
|
|
1180
|
-
const probeIndexExpr =
|
|
1208
|
+
const probeIndexExpr = chunkU5W4LKZV_cjs.sql`CASE ${chunkU5W4LKZV_cjs.sql.join(caseBranches, chunkU5W4LKZV_cjs.sql` `)} ELSE NULL END`;
|
|
1181
1209
|
const conditions = [
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1210
|
+
chunkU5W4LKZV_cjs.sql`"graph_id" = ${ctx.graphId}`,
|
|
1211
|
+
chunkU5W4LKZV_cjs.sql`"kind" = ${kind}`,
|
|
1212
|
+
chunkU5W4LKZV_cjs.sql`"deleted_at" IS NULL`
|
|
1185
1213
|
];
|
|
1186
1214
|
if (index.where !== void 0) {
|
|
1187
|
-
conditions.push(
|
|
1215
|
+
conditions.push(chunkOVUUTCPJ_cjs.compileIndexWhere(compileContext, index.where));
|
|
1188
1216
|
}
|
|
1189
|
-
conditions.push(
|
|
1190
|
-
const whereClause =
|
|
1191
|
-
const probedSelect =
|
|
1217
|
+
conditions.push(chunkU5W4LKZV_cjs.sql`(${chunkU5W4LKZV_cjs.sql.join(groupPredicates, chunkU5W4LKZV_cjs.sql` OR `)})`);
|
|
1218
|
+
const whereClause = chunkU5W4LKZV_cjs.sql.join(conditions, chunkU5W4LKZV_cjs.sql` AND `);
|
|
1219
|
+
const probedSelect = chunkU5W4LKZV_cjs.sql`SELECT "id", ${probeIndexExpr} AS probe_idx FROM ${schema.nodesTable} WHERE ${whereClause}`;
|
|
1192
1220
|
const capInSql = limitPerInput !== void 0 && backend.capabilities.windowFunctions;
|
|
1193
|
-
const query = capInSql ?
|
|
1221
|
+
const query = capInSql ? chunkU5W4LKZV_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"` : chunkU5W4LKZV_cjs.sql`${probedSelect} ORDER BY probe_idx, "id"`;
|
|
1194
1222
|
const rawMatches = await backend.execute(
|
|
1195
|
-
|
|
1223
|
+
chunkU5W4LKZV_cjs.asCompiledRowsSql(query)
|
|
1196
1224
|
);
|
|
1197
1225
|
const matches = limitPerInput !== void 0 && !capInSql ? capMatchesPerGroup(rawMatches, limitPerInput) : rawMatches;
|
|
1198
1226
|
const nodesById = await hydrateNodesById(
|
|
@@ -1225,7 +1253,7 @@ function capMatchesPerGroup(matches, limitPerInput) {
|
|
|
1225
1253
|
return capped;
|
|
1226
1254
|
}
|
|
1227
1255
|
async function hydrateNodesById(backend, graphId, kind, ids) {
|
|
1228
|
-
const rowsById = await
|
|
1256
|
+
const rowsById = await chunk7V2FGGI2_cjs.getNodeRowsByIds(backend, graphId, kind, ids);
|
|
1229
1257
|
const nodesById = /* @__PURE__ */ new Map();
|
|
1230
1258
|
for (const [id, row] of rowsById) {
|
|
1231
1259
|
if (row.deleted_at !== void 0) continue;
|
|
@@ -1241,7 +1269,7 @@ async function executeNodeBulkGetOrCreateByConstraint(ctx, kind, constraintName,
|
|
|
1241
1269
|
const constraint = resolveConstraint(ctx.graph, kind, constraintName);
|
|
1242
1270
|
const validated = validateAndComputeKeys(nodeKind, kind, constraint, items);
|
|
1243
1271
|
const uniqueKeys = collectUniqueKeys(validated);
|
|
1244
|
-
const kindsToCheck =
|
|
1272
|
+
const kindsToCheck = chunk7V2FGGI2_cjs.getKindsForUniquenessCheck(
|
|
1245
1273
|
kind,
|
|
1246
1274
|
constraint.scope,
|
|
1247
1275
|
ctx.registry
|
|
@@ -1355,6 +1383,7 @@ exports.executeNodeGetOrCreateByConstraint = executeNodeGetOrCreateByConstraint;
|
|
|
1355
1383
|
exports.executeNodeHardDelete = executeNodeHardDelete;
|
|
1356
1384
|
exports.executeNodeUpdate = executeNodeUpdate;
|
|
1357
1385
|
exports.executeNodeUpsertUpdate = executeNodeUpsertUpdate;
|
|
1386
|
+
exports.lockSchemaVersionForStoreWrite = lockSchemaVersionForStoreWrite;
|
|
1358
1387
|
exports.nodeUpsertDirtyCheck = nodeUpsertDirtyCheck;
|
|
1359
1388
|
exports.primeBatchValidationCaches = primeBatchValidationCaches;
|
|
1360
1389
|
exports.rowToEdge = rowToEdge;
|
|
@@ -1363,5 +1392,5 @@ exports.rowToNode = rowToNode;
|
|
|
1363
1392
|
exports.rowToNodeMeta = rowToNodeMeta;
|
|
1364
1393
|
exports.runHookedWriteOperation = runHookedWriteOperation;
|
|
1365
1394
|
exports.runInWriteTransaction = runInWriteTransaction;
|
|
1366
|
-
//# sourceMappingURL=chunk-
|
|
1367
|
-
//# sourceMappingURL=chunk-
|
|
1395
|
+
//# sourceMappingURL=chunk-NCX65HBY.cjs.map
|
|
1396
|
+
//# sourceMappingURL=chunk-NCX65HBY.cjs.map
|