@nicia-ai/typegraph 0.44.0 → 0.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/backend/drizzle/indexes.cjs +7 -7
- package/dist/backend/drizzle/indexes.d.cts +1 -1
- package/dist/backend/drizzle/indexes.d.ts +1 -1
- package/dist/backend/drizzle/indexes.js +3 -3
- package/dist/backend/index.cjs +37 -37
- package/dist/backend/index.d.cts +3 -3
- package/dist/backend/index.d.ts +3 -3
- package/dist/backend/index.js +6 -6
- package/dist/backend/postgres/index.cjs +23 -23
- package/dist/backend/postgres/index.d.cts +6 -6
- package/dist/backend/postgres/index.d.ts +6 -6
- package/dist/backend/postgres/index.js +10 -10
- package/dist/backend/postgres/pglite-store.cjs +24 -25
- 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 +20 -21
- package/dist/backend/postgres/pglite-store.js.map +1 -1
- package/dist/backend/postgres/pglite.cjs +12 -12
- package/dist/backend/postgres/pglite.d.cts +3 -3
- package/dist/backend/postgres/pglite.d.ts +3 -3
- package/dist/backend/postgres/pglite.js +11 -11
- package/dist/backend/sqlite/index.cjs +21 -21
- package/dist/backend/sqlite/index.d.cts +6 -6
- package/dist/backend/sqlite/index.d.ts +6 -6
- package/dist/backend/sqlite/index.js +9 -9
- package/dist/backend/sqlite/libsql.cjs +14 -14
- package/dist/backend/sqlite/libsql.cjs.map +1 -1
- package/dist/backend/sqlite/libsql.d.cts +3 -3
- package/dist/backend/sqlite/libsql.d.ts +3 -3
- package/dist/backend/sqlite/libsql.js +10 -10
- package/dist/backend/sqlite/libsql.js.map +1 -1
- package/dist/backend/sqlite/local-store.cjs +25 -26
- package/dist/backend/sqlite/local-store.cjs.map +1 -1
- package/dist/backend/sqlite/local-store.d.cts +8 -8
- package/dist/backend/sqlite/local-store.d.ts +8 -8
- package/dist/backend/sqlite/local-store.js +21 -22
- package/dist/backend/sqlite/local-store.js.map +1 -1
- package/dist/backend/sqlite/local.cjs +13 -13
- package/dist/backend/sqlite/local.d.cts +3 -3
- package/dist/backend/sqlite/local.d.ts +3 -3
- package/dist/backend/sqlite/local.js +11 -11
- package/dist/{chunk-TVLKA4AY.js → chunk-42PYUGLS.js} +57 -3
- package/dist/chunk-42PYUGLS.js.map +1 -0
- package/dist/{chunk-IJTLXNGJ.js → chunk-4GUBTVPV.js} +3 -4
- package/dist/chunk-4GUBTVPV.js.map +1 -0
- package/dist/{chunk-63KCKSSH.js → chunk-4GUTQPVO.js} +33 -9
- package/dist/chunk-4GUTQPVO.js.map +1 -0
- package/dist/{chunk-FGO5JFVJ.cjs → chunk-4MEWSUVM.cjs} +10 -10
- package/dist/chunk-4MEWSUVM.cjs.map +1 -0
- package/dist/{chunk-FMGEZBAQ.js → chunk-4QIKLIGG.js} +15 -3
- package/dist/chunk-4QIKLIGG.js.map +1 -0
- package/dist/{chunk-FMMIX6N4.js → chunk-55ITBQJI.js} +2 -2
- package/dist/chunk-55ITBQJI.js.map +1 -0
- package/dist/{chunk-TCRIQMBU.js → chunk-5EKPX6QU.js} +4 -4
- package/dist/{chunk-TCRIQMBU.js.map → chunk-5EKPX6QU.js.map} +1 -1
- package/dist/{chunk-GFRGG2US.cjs → chunk-5GAONX5G.cjs} +7 -7
- package/dist/{chunk-GFRGG2US.cjs.map → chunk-5GAONX5G.cjs.map} +1 -1
- package/dist/{chunk-ALFUGRYB.cjs → chunk-6RYPD3NJ.cjs} +29 -29
- package/dist/{chunk-ALFUGRYB.cjs.map → chunk-6RYPD3NJ.cjs.map} +1 -1
- package/dist/{chunk-QGKILWGZ.cjs → chunk-7PF2L3H6.cjs} +4 -4
- package/dist/{chunk-QGKILWGZ.cjs.map → chunk-7PF2L3H6.cjs.map} +1 -1
- package/dist/chunk-B3F2D3SP.cjs +12 -0
- package/dist/{chunk-EPTSMFH7.cjs.map → chunk-B3F2D3SP.cjs.map} +1 -1
- package/dist/{chunk-7G32LIQM.js → chunk-BGYJW37L.js} +5 -5
- package/dist/{chunk-7G32LIQM.js.map → chunk-BGYJW37L.js.map} +1 -1
- package/dist/{chunk-EE7N5XXQ.cjs → chunk-BNS75YNF.cjs} +9 -10
- package/dist/chunk-BNS75YNF.cjs.map +1 -0
- package/dist/{chunk-VITTKBWF.js → chunk-CBKG6HEP.js} +5 -5
- package/dist/{chunk-VITTKBWF.js.map → chunk-CBKG6HEP.js.map} +1 -1
- package/dist/{chunk-A4PBRX4C.cjs → chunk-D54WH24V.cjs} +57 -2
- package/dist/chunk-D54WH24V.cjs.map +1 -0
- package/dist/{chunk-MCHP7RHZ.cjs → chunk-D56XG4EI.cjs} +26 -14
- package/dist/chunk-D56XG4EI.cjs.map +1 -0
- package/dist/{chunk-SQRD2CYF.js → chunk-DXEEHSGN.js} +293 -45
- package/dist/chunk-DXEEHSGN.js.map +1 -0
- package/dist/{chunk-GWEDD3DH.js → chunk-EFEOOCJ3.js} +4 -4
- package/dist/{chunk-GWEDD3DH.js.map → chunk-EFEOOCJ3.js.map} +1 -1
- package/dist/{chunk-3PRKZW6D.cjs → chunk-EKFUG4G7.cjs} +2 -2
- package/dist/chunk-EKFUG4G7.cjs.map +1 -0
- package/dist/{chunk-HJH3RMXG.cjs → chunk-F4NHQHEZ.cjs} +4 -4
- package/dist/{chunk-HJH3RMXG.cjs.map → chunk-F4NHQHEZ.cjs.map} +1 -1
- package/dist/{chunk-46GDII45.js → chunk-FL5UQRES.js} +3 -3
- package/dist/{chunk-46GDII45.js.map → chunk-FL5UQRES.js.map} +1 -1
- package/dist/{chunk-TFMVL4QH.js → chunk-FLEQ2HBK.js} +3 -3
- package/dist/{chunk-TFMVL4QH.js.map → chunk-FLEQ2HBK.js.map} +1 -1
- package/dist/{chunk-BEFM74L2.js → chunk-FQ7ZPOTZ.js} +6 -6
- package/dist/{chunk-BEFM74L2.js.map → chunk-FQ7ZPOTZ.js.map} +1 -1
- package/dist/{chunk-ST3LPB2V.cjs → chunk-H7VE3FL4.cjs} +318 -70
- package/dist/chunk-H7VE3FL4.cjs.map +1 -0
- package/dist/{chunk-BCP7LLOY.js → chunk-ID4WXTKL.js} +367 -41
- package/dist/{chunk-BCP7LLOY.js.map → chunk-ID4WXTKL.js.map} +1 -1
- package/dist/{chunk-EFELJVLA.js → chunk-ISLPNELU.js} +15 -3
- package/dist/chunk-ISLPNELU.js.map +1 -0
- package/dist/{chunk-A2I2XO52.cjs → chunk-IX64T5OL.cjs} +4 -4
- package/dist/{chunk-A2I2XO52.cjs.map → chunk-IX64T5OL.cjs.map} +1 -1
- package/dist/{chunk-QYWINYEA.cjs → chunk-J2ICGNHO.cjs} +5 -6
- package/dist/chunk-J2ICGNHO.cjs.map +1 -0
- package/dist/{chunk-7V2FGGI2.cjs → chunk-J7LXTUTP.cjs} +54 -12
- package/dist/chunk-J7LXTUTP.cjs.map +1 -0
- package/dist/{chunk-WBUFJ7BS.cjs → chunk-JQXSZHF2.cjs} +12 -2
- package/dist/chunk-JQXSZHF2.cjs.map +1 -0
- package/dist/{chunk-OVUUTCPJ.cjs → chunk-JXUTCSXX.cjs} +28 -2
- package/dist/chunk-JXUTCSXX.cjs.map +1 -0
- package/dist/{chunk-66UVLHQA.cjs → chunk-KMXWZLQX.cjs} +14 -14
- package/dist/{chunk-66UVLHQA.cjs.map → chunk-KMXWZLQX.cjs.map} +1 -1
- package/dist/{chunk-STQ3BSED.cjs → chunk-NAAMUYMS.cjs} +23 -11
- package/dist/chunk-NAAMUYMS.cjs.map +1 -0
- package/dist/{chunk-NN3QSOVS.cjs → chunk-OOA273IJ.cjs} +14 -14
- package/dist/{chunk-NN3QSOVS.cjs.map → chunk-OOA273IJ.cjs.map} +1 -1
- package/dist/{chunk-OSZPLZIV.cjs → chunk-P7GTYOLB.cjs} +130 -106
- package/dist/chunk-P7GTYOLB.cjs.map +1 -0
- package/dist/{chunk-K3BUWSFR.js → chunk-PVUI6KGR.js} +28 -2
- package/dist/chunk-PVUI6KGR.js.map +1 -0
- package/dist/{chunk-SBPC5IP3.js → chunk-Q6EDCUXV.js} +242 -10
- package/dist/chunk-Q6EDCUXV.js.map +1 -0
- package/dist/{chunk-2BIG7U6E.cjs → chunk-QC4MCOFV.cjs} +5 -5
- package/dist/{chunk-2BIG7U6E.cjs.map → chunk-QC4MCOFV.cjs.map} +1 -1
- package/dist/{chunk-JRP3VGHS.js → chunk-QLUXRWKL.js} +3 -3
- package/dist/{chunk-JRP3VGHS.js.map → chunk-QLUXRWKL.js.map} +1 -1
- package/dist/{chunk-IIT5K7SK.cjs → chunk-QR24DJDF.cjs} +6 -6
- package/dist/{chunk-IIT5K7SK.cjs.map → chunk-QR24DJDF.cjs.map} +1 -1
- package/dist/{chunk-HOIFFY4M.js → chunk-QRNYDV5Z.js} +48 -21
- package/dist/chunk-QRNYDV5Z.js.map +1 -0
- package/dist/{chunk-FRHHDHKH.js → chunk-RFRM3Q5K.js} +15 -3
- package/dist/chunk-RFRM3Q5K.js.map +1 -0
- package/dist/{chunk-ATLN63JA.js → chunk-RUQS6M7G.js} +5 -5
- package/dist/chunk-RUQS6M7G.js.map +1 -0
- package/dist/{chunk-XMYJY7NI.js → chunk-S3ZRKJHY.js} +3 -3
- package/dist/{chunk-XMYJY7NI.js.map → chunk-S3ZRKJHY.js.map} +1 -1
- package/dist/{chunk-FSXTPBRN.js → chunk-TKORQCG4.js} +49 -7
- package/dist/chunk-TKORQCG4.js.map +1 -0
- package/dist/{chunk-2Y4IFKW7.js → chunk-TKP5T34P.js} +3 -4
- package/dist/chunk-TKP5T34P.js.map +1 -0
- package/dist/{chunk-NCX65HBY.cjs → chunk-UCQ3BFSY.cjs} +301 -68
- package/dist/chunk-UCQ3BFSY.cjs.map +1 -0
- package/dist/{chunk-B75XRV3O.js → chunk-V34A6R5V.js} +12 -3
- package/dist/chunk-V34A6R5V.js.map +1 -0
- package/dist/{chunk-BNUFUFAU.js → chunk-VTN3C3CH.js} +6 -6
- package/dist/chunk-VTN3C3CH.js.map +1 -0
- package/dist/{chunk-5MUSU4ZP.cjs → chunk-VVQM4CZD.cjs} +12 -12
- package/dist/chunk-VVQM4CZD.cjs.map +1 -0
- package/dist/{chunk-IIMQJYAM.js → chunk-WDAVPX46.js} +3 -3
- package/dist/{chunk-IIMQJYAM.js.map → chunk-WDAVPX46.js.map} +1 -1
- package/dist/{chunk-YNULOIR5.cjs → chunk-WDBXJOU5.cjs} +28 -16
- package/dist/chunk-WDBXJOU5.cjs.map +1 -0
- package/dist/{chunk-PAW2XUZN.js → chunk-WUFASQUO.js} +3 -3
- package/dist/{chunk-PAW2XUZN.js.map → chunk-WUFASQUO.js.map} +1 -1
- package/dist/{chunk-PDGEXGS6.cjs → chunk-YDWLUT5V.cjs} +136 -109
- package/dist/chunk-YDWLUT5V.cjs.map +1 -0
- package/dist/{chunk-PHXITZE4.js → chunk-YMTXMPV6.js} +3 -3
- package/dist/{chunk-PHXITZE4.js.map → chunk-YMTXMPV6.js.map} +1 -1
- package/dist/{chunk-XR4YZFKW.cjs → chunk-YOALGKRE.cjs} +690 -364
- package/dist/chunk-YOALGKRE.cjs.map +1 -0
- package/dist/{chunk-6JZUSDY2.cjs → chunk-Z3WO6MND.cjs} +27 -27
- package/dist/{chunk-6JZUSDY2.cjs.map → chunk-Z3WO6MND.cjs.map} +1 -1
- package/dist/{chunk-2VLBGQBY.cjs → chunk-ZI6VQSZA.cjs} +37 -37
- package/dist/{chunk-2VLBGQBY.cjs.map → chunk-ZI6VQSZA.cjs.map} +1 -1
- package/dist/core/index.cjs +10 -11
- package/dist/core/index.d.cts +5 -5
- package/dist/core/index.d.ts +5 -5
- package/dist/core/index.js +3 -4
- package/dist/{ddl-eWg7hx6R.d.cts → ddl-BG4J805L.d.cts} +3 -3
- package/dist/{ddl-D5369kOY.d.ts → ddl-CgiS9QLj.d.ts} +3 -3
- package/dist/{define-graph-SvYXOl78.d.ts → define-graph-BGrJahvp.d.ts} +1 -1
- package/dist/{define-graph-DVF-oN1i.d.cts → define-graph-alREY2wj.d.cts} +1 -1
- package/dist/graph-extension/index.cjs +18 -19
- package/dist/graph-extension/index.d.cts +4 -4
- package/dist/graph-extension/index.d.ts +4 -4
- package/dist/graph-extension/index.js +3 -4
- package/dist/graph-merge/index.cjs +89 -90
- package/dist/graph-merge/index.cjs.map +1 -1
- package/dist/graph-merge/index.d.cts +9 -9
- package/dist/graph-merge/index.d.ts +9 -9
- package/dist/graph-merge/index.js +16 -17
- package/dist/graph-merge/index.js.map +1 -1
- package/dist/{index-By89Sezh.d.ts → index-BBxZCUdu.d.ts} +2 -2
- package/dist/{index-DcQ3Sxs-.d.cts → index-C3y_98iN.d.cts} +2 -2
- package/dist/index.cjs +124 -125
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -13
- package/dist/index.d.ts +13 -13
- package/dist/index.js +23 -24
- package/dist/index.js.map +1 -1
- package/dist/indexes/index.cjs +11 -11
- package/dist/indexes/index.d.cts +4 -4
- package/dist/indexes/index.d.ts +4 -4
- package/dist/indexes/index.js +4 -4
- package/dist/interchange/index.cjs +27 -26
- package/dist/interchange/index.cjs.map +1 -1
- package/dist/interchange/index.d.cts +7 -7
- package/dist/interchange/index.d.ts +7 -7
- package/dist/interchange/index.js +8 -7
- package/dist/interchange/index.js.map +1 -1
- package/dist/{manager-Cn0NFIhN.d.cts → manager-KS7CGQQT.d.cts} +3 -3
- package/dist/{manager-B0KjKE93.d.ts → manager-YoLEfcc1.d.ts} +3 -3
- package/dist/{materialize-indexes-BD4V3svD.d.ts → materialize-indexes-Bhhyb1B3.d.ts} +1 -1
- package/dist/{materialize-indexes-DVRhd5h4.d.cts → materialize-indexes-OHRWypW6.d.cts} +1 -1
- package/dist/{postgres-DaEWvN4x.d.cts → postgres-DpkW3R5Y.d.cts} +1 -1
- package/dist/{postgres-u0a0HN2D.d.ts → postgres-DwqyIniy.d.ts} +1 -1
- package/dist/profiler/index.d.cts +10 -10
- package/dist/profiler/index.d.ts +10 -10
- package/dist/provenance/index.cjs +15 -15
- 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 +3 -3
- package/dist/provenance/index.js.map +1 -1
- package/dist/schema/index.cjs +30 -31
- package/dist/schema/index.d.cts +7 -7
- package/dist/schema/index.d.ts +7 -7
- package/dist/schema/index.js +8 -9
- package/dist/{searchable-BT7j9_IK.d.cts → searchable-CIZL8Hyw.d.cts} +2 -2
- package/dist/{searchable-CnYEancP.d.ts → searchable-DLWEfC4a.d.ts} +2 -2
- package/dist/{sqlite-BrMoSsI7.d.cts → sqlite-DY0WODUK.d.cts} +1 -1
- package/dist/{sqlite-CHhZUyO5.d.ts → sqlite-L-VIRzqA.d.ts} +1 -1
- package/dist/{store-view-Bvdku0Ht.d.ts → store-view-66p92IPi.d.ts} +1887 -1811
- package/dist/{store-view-w-md0nQ4.d.cts → store-view-A85FFRnk.d.cts} +1887 -1811
- package/dist/{temporal-BCORwUau.d.cts → temporal-BNbjXqer.d.cts} +1 -1
- package/dist/{temporal--x9T8K4S.d.ts → temporal-Bob6Nfbp.d.ts} +1 -1
- package/dist/{types-Cjvkj0jA.d.ts → types-Ch9a0Dx6.d.cts} +141 -17
- package/dist/{types-Cjvkj0jA.d.cts → types-Ch9a0Dx6.d.ts} +141 -17
- package/dist/{types-COODtTJU.d.ts → types-ClCzT-dT.d.ts} +1 -1
- package/dist/{types-6-WJmSD4.d.cts → types-DeORZhxn.d.cts} +1 -1
- package/dist/{where-CUQmCR6d.d.cts → where-DPw52ksb.d.cts} +1 -1
- package/dist/{where-5xVawAwL.d.ts → where-kWUZPvEA.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/chunk-2WDD2NO3.js +0 -59
- package/dist/chunk-2WDD2NO3.js.map +0 -1
- package/dist/chunk-2Y4IFKW7.js.map +0 -1
- package/dist/chunk-3PRKZW6D.cjs.map +0 -1
- package/dist/chunk-5MUSU4ZP.cjs.map +0 -1
- package/dist/chunk-63KCKSSH.js.map +0 -1
- package/dist/chunk-7V2FGGI2.cjs.map +0 -1
- package/dist/chunk-A4PBRX4C.cjs.map +0 -1
- package/dist/chunk-ATLN63JA.js.map +0 -1
- package/dist/chunk-B75XRV3O.js.map +0 -1
- package/dist/chunk-BNUFUFAU.js.map +0 -1
- package/dist/chunk-EE7N5XXQ.cjs.map +0 -1
- package/dist/chunk-EFELJVLA.js.map +0 -1
- package/dist/chunk-EPTSMFH7.cjs +0 -12
- package/dist/chunk-FGO5JFVJ.cjs.map +0 -1
- package/dist/chunk-FMGEZBAQ.js.map +0 -1
- package/dist/chunk-FMMIX6N4.js.map +0 -1
- package/dist/chunk-FRHHDHKH.js.map +0 -1
- package/dist/chunk-FSXTPBRN.js.map +0 -1
- package/dist/chunk-HOHAJ2NR.cjs +0 -61
- package/dist/chunk-HOHAJ2NR.cjs.map +0 -1
- package/dist/chunk-HOIFFY4M.js.map +0 -1
- package/dist/chunk-IJTLXNGJ.js.map +0 -1
- package/dist/chunk-K3BUWSFR.js.map +0 -1
- package/dist/chunk-MCHP7RHZ.cjs.map +0 -1
- package/dist/chunk-NCX65HBY.cjs.map +0 -1
- package/dist/chunk-OSZPLZIV.cjs.map +0 -1
- package/dist/chunk-OVUUTCPJ.cjs.map +0 -1
- package/dist/chunk-PDGEXGS6.cjs.map +0 -1
- package/dist/chunk-QYWINYEA.cjs.map +0 -1
- package/dist/chunk-SBPC5IP3.js.map +0 -1
- package/dist/chunk-SQRD2CYF.js.map +0 -1
- package/dist/chunk-ST3LPB2V.cjs.map +0 -1
- package/dist/chunk-STQ3BSED.cjs.map +0 -1
- package/dist/chunk-TVLKA4AY.js.map +0 -1
- package/dist/chunk-WBUFJ7BS.cjs.map +0 -1
- package/dist/chunk-XR4YZFKW.cjs.map +0 -1
- package/dist/chunk-YNULOIR5.cjs.map +0 -1
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkJ7LXTUTP_cjs = require('./chunk-J7LXTUTP.cjs');
|
|
4
4
|
var chunkCPEL3YIR_cjs = require('./chunk-CPEL3YIR.cjs');
|
|
5
|
-
var
|
|
5
|
+
var chunkEKFUG4G7_cjs = require('./chunk-EKFUG4G7.cjs');
|
|
6
6
|
var chunkKKYELPZ2_cjs = require('./chunk-KKYELPZ2.cjs');
|
|
7
7
|
var chunkACSVZPK7_cjs = require('./chunk-ACSVZPK7.cjs');
|
|
8
8
|
var chunkZTAJL4DT_cjs = require('./chunk-ZTAJL4DT.cjs');
|
|
9
|
-
var
|
|
9
|
+
var chunkJXUTCSXX_cjs = require('./chunk-JXUTCSXX.cjs');
|
|
10
10
|
var chunkU5W4LKZV_cjs = require('./chunk-U5W4LKZV.cjs');
|
|
11
11
|
var chunk764JHTLT_cjs = require('./chunk-764JHTLT.cjs');
|
|
12
|
-
var
|
|
12
|
+
var chunkHAHNRASW_cjs = require('./chunk-HAHNRASW.cjs');
|
|
13
|
+
var chunkD54WH24V_cjs = require('./chunk-D54WH24V.cjs');
|
|
13
14
|
var chunkC4F7VJ5D_cjs = require('./chunk-C4F7VJ5D.cjs');
|
|
14
15
|
var chunkTDXIBCGY_cjs = require('./chunk-TDXIBCGY.cjs');
|
|
15
16
|
|
|
@@ -18,8 +19,8 @@ function nullToUndefined(value) {
|
|
|
18
19
|
return value === null ? void 0 : value;
|
|
19
20
|
}
|
|
20
21
|
function rowToNode(row) {
|
|
21
|
-
const rawProps =
|
|
22
|
-
const props =
|
|
22
|
+
const rawProps = chunkEKFUG4G7_cjs.rowPropsToObject(row.props);
|
|
23
|
+
const props = chunkD54WH24V_cjs.filterReservedKeys(rawProps, chunkD54WH24V_cjs.RESERVED_NODE_KEYS);
|
|
23
24
|
return {
|
|
24
25
|
kind: row.kind,
|
|
25
26
|
id: row.id,
|
|
@@ -38,8 +39,8 @@ function rowToNodeMeta(row) {
|
|
|
38
39
|
};
|
|
39
40
|
}
|
|
40
41
|
function rowToEdge(row) {
|
|
41
|
-
const rawProps =
|
|
42
|
-
const props =
|
|
42
|
+
const rawProps = chunkEKFUG4G7_cjs.rowPropsToObject(row.props);
|
|
43
|
+
const props = chunkD54WH24V_cjs.filterReservedKeys(rawProps, chunkD54WH24V_cjs.RESERVED_EDGE_KEYS);
|
|
43
44
|
return {
|
|
44
45
|
id: row.id,
|
|
45
46
|
kind: row.kind,
|
|
@@ -89,14 +90,14 @@ async function lockSchemaVersionForStoreWrite(ctx, backend) {
|
|
|
89
90
|
expectedVersion
|
|
90
91
|
});
|
|
91
92
|
}
|
|
92
|
-
function runInWriteTransaction(ctx, backend, fn) {
|
|
93
|
+
function runInWriteTransaction(ctx, backend, fn, options) {
|
|
93
94
|
const ownsWriteLock = "transaction" in backend && backend.capabilities.transactions;
|
|
94
|
-
return
|
|
95
|
+
return chunkEKFUG4G7_cjs.runOptionallyInTransaction(backend, async (target) => {
|
|
95
96
|
await lockSchemaVersionForStoreWrite(ctx, target);
|
|
96
|
-
const lock = ctx.historyEnabled || ctx.revisionTrackingEnabled ? await
|
|
97
|
+
const lock = ctx.historyEnabled || ctx.revisionTrackingEnabled ? await chunkJ7LXTUTP_cjs.lockRecordedGraphWrite(target, ctx.graphId) : chunkJ7LXTUTP_cjs.uncapturedGraphWriteLock();
|
|
97
98
|
const result = await fn(target, lock);
|
|
98
|
-
if (ctx.revisionTrackingEnabled && !ctx.historyEnabled) {
|
|
99
|
-
await
|
|
99
|
+
if (ctx.revisionTrackingEnabled && !ctx.historyEnabled && (options?.didWrite?.(result) ?? true)) {
|
|
100
|
+
await chunkJ7LXTUTP_cjs.advanceRevisionClock(
|
|
100
101
|
target,
|
|
101
102
|
ctx.revisionSchema,
|
|
102
103
|
ctx.graphId,
|
|
@@ -119,7 +120,7 @@ async function checkDisjointnessConstraint(ctx, kind, id) {
|
|
|
119
120
|
for (const disjointKind of disjointKinds) {
|
|
120
121
|
const existing = await ctx.backend.getNode(ctx.graphId, disjointKind, id);
|
|
121
122
|
if (existing && !existing.deleted_at) {
|
|
122
|
-
const error =
|
|
123
|
+
const error = chunkJ7LXTUTP_cjs.checkDisjointness(id, kind, [disjointKind], ctx.registry);
|
|
123
124
|
if (error) throw error;
|
|
124
125
|
}
|
|
125
126
|
}
|
|
@@ -136,7 +137,7 @@ async function checkCardinalityConstraint(ctx, edgeKind, cardinality, fromKind,
|
|
|
136
137
|
fromKind,
|
|
137
138
|
fromId
|
|
138
139
|
});
|
|
139
|
-
const error =
|
|
140
|
+
const error = chunkJ7LXTUTP_cjs.checkCardinality(
|
|
140
141
|
edgeKind,
|
|
141
142
|
fromKind,
|
|
142
143
|
fromId,
|
|
@@ -156,7 +157,7 @@ async function checkCardinalityConstraint(ctx, edgeKind, cardinality, fromKind,
|
|
|
156
157
|
toKind,
|
|
157
158
|
toId
|
|
158
159
|
});
|
|
159
|
-
const error =
|
|
160
|
+
const error = chunkJ7LXTUTP_cjs.checkUniqueEdge(
|
|
160
161
|
edgeKind,
|
|
161
162
|
fromKind,
|
|
162
163
|
fromId,
|
|
@@ -178,7 +179,7 @@ async function checkCardinalityConstraint(ctx, edgeKind, cardinality, fromKind,
|
|
|
178
179
|
fromId,
|
|
179
180
|
activeOnly: true
|
|
180
181
|
});
|
|
181
|
-
const error =
|
|
182
|
+
const error = chunkJ7LXTUTP_cjs.checkCardinality(
|
|
182
183
|
edgeKind,
|
|
183
184
|
fromKind,
|
|
184
185
|
fromId,
|
|
@@ -308,8 +309,8 @@ function createNodeBatchValidationBackend(graphId, registry, backend) {
|
|
|
308
309
|
}
|
|
309
310
|
function registerPendingUniqueEntries(kind, id, props, constraints) {
|
|
310
311
|
for (const constraint of constraints) {
|
|
311
|
-
if (!
|
|
312
|
-
const key =
|
|
312
|
+
if (!chunkJ7LXTUTP_cjs.checkWherePredicate(constraint, props)) continue;
|
|
313
|
+
const key = chunkJ7LXTUTP_cjs.computeUniqueKey(
|
|
313
314
|
props,
|
|
314
315
|
constraint.fields,
|
|
315
316
|
constraint.collation
|
|
@@ -322,7 +323,7 @@ function createNodeBatchValidationBackend(graphId, registry, backend) {
|
|
|
322
323
|
);
|
|
323
324
|
pendingUniqueOwners.set(concreteEntryKey, id);
|
|
324
325
|
if (constraint.scope !== "kind") {
|
|
325
|
-
const kindsToCheck =
|
|
326
|
+
const kindsToCheck = chunkJ7LXTUTP_cjs.getKindsForUniquenessCheck(
|
|
326
327
|
kind,
|
|
327
328
|
constraint.scope,
|
|
328
329
|
registry
|
|
@@ -341,12 +342,12 @@ function createNodeBatchValidationBackend(graphId, registry, backend) {
|
|
|
341
342
|
}
|
|
342
343
|
function registerAppliedNodeUpdate(kind, id, oldProps, newProps, constraints) {
|
|
343
344
|
for (const constraint of constraints) {
|
|
344
|
-
const oldApplies =
|
|
345
|
-
const newApplies =
|
|
346
|
-
const oldKey = oldApplies ?
|
|
347
|
-
const newKey = newApplies ?
|
|
345
|
+
const oldApplies = chunkJ7LXTUTP_cjs.checkWherePredicate(constraint, oldProps);
|
|
346
|
+
const newApplies = chunkJ7LXTUTP_cjs.checkWherePredicate(constraint, newProps);
|
|
347
|
+
const oldKey = oldApplies ? chunkJ7LXTUTP_cjs.computeUniqueKey(oldProps, constraint.fields, constraint.collation) : void 0;
|
|
348
|
+
const newKey = newApplies ? chunkJ7LXTUTP_cjs.computeUniqueKey(newProps, constraint.fields, constraint.collation) : void 0;
|
|
348
349
|
if (oldKey === newKey) continue;
|
|
349
|
-
const kindsToCheck =
|
|
350
|
+
const kindsToCheck = chunkJ7LXTUTP_cjs.getKindsForUniquenessCheck(
|
|
350
351
|
kind,
|
|
351
352
|
constraint.scope,
|
|
352
353
|
registry
|
|
@@ -386,7 +387,7 @@ function createNodeBatchValidationBackend(graphId, registry, backend) {
|
|
|
386
387
|
if (uniqueCache.has(cacheKey)) return;
|
|
387
388
|
uniqueCache.set(cacheKey, row);
|
|
388
389
|
}
|
|
389
|
-
const validationBackend =
|
|
390
|
+
const validationBackend = chunkEKFUG4G7_cjs.createBackendOverlay(backend, {
|
|
390
391
|
getNode: getNodeCached,
|
|
391
392
|
checkUnique: checkUniqueCached
|
|
392
393
|
});
|
|
@@ -429,8 +430,8 @@ async function finishNodeCreatePreparation(ctx, draft, backend) {
|
|
|
429
430
|
backend
|
|
430
431
|
};
|
|
431
432
|
await checkDisjointnessConstraint(constraintContext, kind, id);
|
|
432
|
-
await
|
|
433
|
-
|
|
433
|
+
await chunkJ7LXTUTP_cjs.checkUniquenessConstraints(
|
|
434
|
+
chunkJ7LXTUTP_cjs.createUniquenessContext(ctx.graphId, ctx.registry, backend),
|
|
434
435
|
kind,
|
|
435
436
|
id,
|
|
436
437
|
validatedProps,
|
|
@@ -460,8 +461,8 @@ async function validateAndPrepareNodeCreate(ctx, input, id, backend, options) {
|
|
|
460
461
|
);
|
|
461
462
|
}
|
|
462
463
|
async function finalizeNodeCreateBatch(ctx, preparedCreates, backend, lock) {
|
|
463
|
-
await
|
|
464
|
-
|
|
464
|
+
await chunkJ7LXTUTP_cjs.applyNodeInsertSideEffectsBatch(
|
|
465
|
+
chunkJ7LXTUTP_cjs.createNodeWriteContext(ctx.graphId, ctx.registry, lock),
|
|
465
466
|
preparedCreates.map((prepared) => ({
|
|
466
467
|
kind: prepared.kind,
|
|
467
468
|
id: prepared.id,
|
|
@@ -473,8 +474,8 @@ async function finalizeNodeCreateBatch(ctx, preparedCreates, backend, lock) {
|
|
|
473
474
|
);
|
|
474
475
|
}
|
|
475
476
|
async function finalizeNodeCreate(ctx, prepared, backend, lock) {
|
|
476
|
-
await
|
|
477
|
-
|
|
477
|
+
await chunkJ7LXTUTP_cjs.applyNodeInsertSideEffects(
|
|
478
|
+
chunkJ7LXTUTP_cjs.createNodeWriteContext(ctx.graphId, ctx.registry, lock),
|
|
478
479
|
{
|
|
479
480
|
kind: prepared.kind,
|
|
480
481
|
id: prepared.id,
|
|
@@ -495,7 +496,7 @@ function computeNodeUpdate(ctx, kind, id, existingProps, inputProps) {
|
|
|
495
496
|
return { registration, validatedProps };
|
|
496
497
|
}
|
|
497
498
|
function resolveNodeUpdateProps(ctx, existing, inputProps) {
|
|
498
|
-
const existingProps =
|
|
499
|
+
const existingProps = chunkEKFUG4G7_cjs.rowPropsToObject(existing.props);
|
|
499
500
|
const { registration, validatedProps } = computeNodeUpdate(
|
|
500
501
|
ctx,
|
|
501
502
|
existing.kind,
|
|
@@ -529,7 +530,7 @@ async function performNodeUpdate(ctx, input, backend, lock, options) {
|
|
|
529
530
|
);
|
|
530
531
|
const nodeKind = registration.type;
|
|
531
532
|
const validTo = chunkZTAJL4DT_cjs.validateOptionalCanonicalIsoDate(input.validTo, "validTo");
|
|
532
|
-
const writeContext =
|
|
533
|
+
const writeContext = chunkJ7LXTUTP_cjs.createNodeWriteContext(ctx.graphId, ctx.registry, lock);
|
|
533
534
|
const shared = {
|
|
534
535
|
schema: nodeKind.schema,
|
|
535
536
|
validatedProps,
|
|
@@ -537,15 +538,15 @@ async function performNodeUpdate(ctx, input, backend, lock, options) {
|
|
|
537
538
|
...validTo !== void 0 && { validTo }
|
|
538
539
|
};
|
|
539
540
|
if (options?.clearDeleted) {
|
|
540
|
-
const row2 = await
|
|
541
|
+
const row2 = await chunkJ7LXTUTP_cjs.applyNodeUpdate(
|
|
541
542
|
writeContext,
|
|
542
543
|
{ ...shared, existing, clearDeleted: true },
|
|
543
544
|
backend
|
|
544
545
|
);
|
|
545
546
|
return rowToNode(row2);
|
|
546
547
|
}
|
|
547
|
-
if (!
|
|
548
|
-
const row = await
|
|
548
|
+
if (!chunkEKFUG4G7_cjs.isLiveNodeRow(existing)) throw new chunkC4F7VJ5D_cjs.NodeNotFoundError(kind, id);
|
|
549
|
+
const row = await chunkJ7LXTUTP_cjs.applyNodeUpdate(
|
|
549
550
|
writeContext,
|
|
550
551
|
{ ...shared, existing },
|
|
551
552
|
backend
|
|
@@ -573,13 +574,13 @@ async function primeBatchValidationCaches(ctx, drafts, backend, seams) {
|
|
|
573
574
|
const groups = /* @__PURE__ */ new Map();
|
|
574
575
|
for (const draft of drafts) {
|
|
575
576
|
for (const constraint of draft.uniqueConstraints) {
|
|
576
|
-
if (!
|
|
577
|
-
const key =
|
|
577
|
+
if (!chunkJ7LXTUTP_cjs.checkWherePredicate(constraint, draft.validatedProps)) continue;
|
|
578
|
+
const key = chunkJ7LXTUTP_cjs.computeUniqueKey(
|
|
578
579
|
draft.validatedProps,
|
|
579
580
|
constraint.fields,
|
|
580
581
|
constraint.collation
|
|
581
582
|
);
|
|
582
|
-
const kindsToCheck =
|
|
583
|
+
const kindsToCheck = chunkJ7LXTUTP_cjs.getKindsForUniquenessCheck(
|
|
583
584
|
draft.kind,
|
|
584
585
|
constraint.scope,
|
|
585
586
|
ctx.registry
|
|
@@ -625,7 +626,7 @@ async function prepareBatchCreates(ctx, inputs, backend, options) {
|
|
|
625
626
|
seedUniqueRow
|
|
626
627
|
} = createNodeBatchValidationBackend(ctx.graphId, ctx.registry, backend);
|
|
627
628
|
const drafts = inputs.map(
|
|
628
|
-
(input) => draftNodeCreate(ctx, input, input.id ??
|
|
629
|
+
(input) => draftNodeCreate(ctx, input, input.id ?? chunkJ7LXTUTP_cjs.generateId(), options)
|
|
629
630
|
);
|
|
630
631
|
await primeBatchValidationCaches(ctx, drafts, backend, {
|
|
631
632
|
seedNodeRow,
|
|
@@ -701,7 +702,7 @@ async function batchCheckUniqueAcrossKinds(backend, graphId, constraintName, uni
|
|
|
701
702
|
}
|
|
702
703
|
async function executeNodeCreateInternal(ctx, input, backend, options) {
|
|
703
704
|
const kind = input.kind;
|
|
704
|
-
const id = input.id ??
|
|
705
|
+
const id = input.id ?? chunkJ7LXTUTP_cjs.generateId();
|
|
705
706
|
const opContext = ctx.createOperationContext("create", "node", kind, id);
|
|
706
707
|
const shouldReturnRow = options?.returnRow ?? true;
|
|
707
708
|
return runHookedWriteOperation(
|
|
@@ -720,8 +721,8 @@ async function executeNodeCreateInternal(ctx, input, backend, options) {
|
|
|
720
721
|
if (shouldReturnRow) {
|
|
721
722
|
row = await target.insertNode(prepared.insertParams);
|
|
722
723
|
} else {
|
|
723
|
-
await
|
|
724
|
-
|
|
724
|
+
await chunkJ7LXTUTP_cjs.runInsertNoReturn(
|
|
725
|
+
chunkJ7LXTUTP_cjs.nodeInsertDispatch(target),
|
|
725
726
|
prepared.insertParams
|
|
726
727
|
);
|
|
727
728
|
}
|
|
@@ -752,7 +753,7 @@ async function executeNodeCreateNoReturnBatch(ctx, inputs, backend) {
|
|
|
752
753
|
inputs,
|
|
753
754
|
target
|
|
754
755
|
);
|
|
755
|
-
await
|
|
756
|
+
await chunkJ7LXTUTP_cjs.runInsertBatch(chunkJ7LXTUTP_cjs.nodeInsertDispatch(target), batchInsertParams);
|
|
756
757
|
await finalizeNodeCreateBatch(ctx, preparedCreates, target, lock);
|
|
757
758
|
});
|
|
758
759
|
}
|
|
@@ -765,8 +766,8 @@ async function executeNodeCreateBatch(ctx, inputs, backend, options) {
|
|
|
765
766
|
target,
|
|
766
767
|
options
|
|
767
768
|
);
|
|
768
|
-
const rows = await
|
|
769
|
-
|
|
769
|
+
const rows = await chunkJ7LXTUTP_cjs.runInsertBatchReturning(
|
|
770
|
+
chunkJ7LXTUTP_cjs.nodeInsertDispatch(target),
|
|
770
771
|
batchInsertParams
|
|
771
772
|
);
|
|
772
773
|
await finalizeNodeCreateBatch(ctx, preparedCreates, target, lock);
|
|
@@ -787,6 +788,237 @@ async function executeNodeUpdate(ctx, input, backend, options) {
|
|
|
787
788
|
(target, lock) => performNodeUpdate(ctx, input, target, lock, options)
|
|
788
789
|
);
|
|
789
790
|
}
|
|
791
|
+
async function executeNodeUpdateWhere(ctx, kind, inputPatch, candidateIds, candidateIdColumn, backend) {
|
|
792
|
+
const registration = getNodeRegistration(ctx.graph, kind);
|
|
793
|
+
const schema = registration.type.schema;
|
|
794
|
+
const uniqueConstraints = registration.unique ?? [];
|
|
795
|
+
if (!backend.capabilities.transactions) {
|
|
796
|
+
throw new chunkC4F7VJ5D_cjs.ConfigurationError(
|
|
797
|
+
"updateWhere() requires a transactional backend so validation and sidecars are atomic",
|
|
798
|
+
{ code: "SET_UPDATE_TRANSACTIONS_REQUIRED", kind }
|
|
799
|
+
);
|
|
800
|
+
}
|
|
801
|
+
if (backend.updateNodeSet === void 0) {
|
|
802
|
+
throw new chunkC4F7VJ5D_cjs.ConfigurationError(
|
|
803
|
+
"This backend does not support set-based node updates",
|
|
804
|
+
{ code: "SET_UPDATE_UNSUPPORTED", kind }
|
|
805
|
+
);
|
|
806
|
+
}
|
|
807
|
+
if (Object.keys(inputPatch).length === 0) {
|
|
808
|
+
throw new chunkC4F7VJ5D_cjs.ValidationError("updateWhere() patch must not be empty", {
|
|
809
|
+
entityType: "node",
|
|
810
|
+
kind,
|
|
811
|
+
operation: "update",
|
|
812
|
+
issues: [{ path: "patch", message: "Provide at least one property" }]
|
|
813
|
+
});
|
|
814
|
+
}
|
|
815
|
+
const unknownProperty = Object.keys(inputPatch).find(
|
|
816
|
+
(property) => !Object.hasOwn(schema.shape, property)
|
|
817
|
+
);
|
|
818
|
+
if (unknownProperty !== void 0) {
|
|
819
|
+
throw new chunkC4F7VJ5D_cjs.ValidationError(
|
|
820
|
+
`Unknown ${kind} property in updateWhere() patch: ${unknownProperty}`,
|
|
821
|
+
{
|
|
822
|
+
entityType: "node",
|
|
823
|
+
kind,
|
|
824
|
+
operation: "update",
|
|
825
|
+
issues: [
|
|
826
|
+
{
|
|
827
|
+
path: unknownProperty,
|
|
828
|
+
message: "Property is not declared by the node schema"
|
|
829
|
+
}
|
|
830
|
+
]
|
|
831
|
+
}
|
|
832
|
+
);
|
|
833
|
+
}
|
|
834
|
+
const parsedPatch = chunkKKYELPZ2_cjs.validateNodeProps(schema.partial(), inputPatch, {
|
|
835
|
+
kind,
|
|
836
|
+
operation: "update"
|
|
837
|
+
});
|
|
838
|
+
const patch = {};
|
|
839
|
+
const unsetProperties = [];
|
|
840
|
+
for (const [property, value] of Object.entries(parsedPatch)) {
|
|
841
|
+
if (value === void 0) {
|
|
842
|
+
unsetProperties.push(property);
|
|
843
|
+
continue;
|
|
844
|
+
}
|
|
845
|
+
chunkD54WH24V_cjs.assertJsonValue(value, property, `Node "${kind}" updateWhere patch`);
|
|
846
|
+
patch[property] = value;
|
|
847
|
+
}
|
|
848
|
+
if (Object.keys(patch).length === 0 && unsetProperties.length === 0) {
|
|
849
|
+
throw new chunkC4F7VJ5D_cjs.ValidationError(
|
|
850
|
+
"updateWhere() patch has no recognized properties",
|
|
851
|
+
{
|
|
852
|
+
entityType: "node",
|
|
853
|
+
kind,
|
|
854
|
+
operation: "update",
|
|
855
|
+
issues: [
|
|
856
|
+
{ path: "patch", message: "Provide a declared node property" }
|
|
857
|
+
]
|
|
858
|
+
}
|
|
859
|
+
);
|
|
860
|
+
}
|
|
861
|
+
if (uniqueConstraints.length > 0 && (backend.hardDeleteUniquesByNodeIds === void 0 || backend.insertUniqueBatch === void 0 || backend.checkUniqueBatch === void 0)) {
|
|
862
|
+
throw new chunkC4F7VJ5D_cjs.ConfigurationError(
|
|
863
|
+
"updateWhere() requires batched uniqueness sidecar operations for constrained nodes",
|
|
864
|
+
{ code: "SET_UPDATE_UNIQUENESS_UNSUPPORTED", kind }
|
|
865
|
+
);
|
|
866
|
+
}
|
|
867
|
+
if (chunkHAHNRASW_cjs.getSearchableFields(schema).length > 0 && (backend.upsertFulltext === void 0 || backend.deleteFulltext === void 0 || backend.upsertFulltextBatch === void 0 || backend.deleteFulltextBatch === void 0)) {
|
|
868
|
+
throw new chunkC4F7VJ5D_cjs.ConfigurationError(
|
|
869
|
+
"updateWhere() requires batched fulltext sidecar operations for searchable nodes",
|
|
870
|
+
{ code: "SET_UPDATE_FULLTEXT_UNSUPPORTED", kind }
|
|
871
|
+
);
|
|
872
|
+
}
|
|
873
|
+
if (chunkJ7LXTUTP_cjs.getEmbeddingFields(schema).length > 0 && (backend.upsertEmbedding === void 0 || backend.deleteEmbedding === void 0 || backend.upsertEmbeddingBatch === void 0 || backend.deleteEmbeddingBatch === void 0)) {
|
|
874
|
+
throw new chunkC4F7VJ5D_cjs.ConfigurationError(
|
|
875
|
+
"updateWhere() requires batched vector sidecar operations for embedded nodes",
|
|
876
|
+
{ code: "SET_UPDATE_VECTOR_UNSUPPORTED", kind }
|
|
877
|
+
);
|
|
878
|
+
}
|
|
879
|
+
const hookContext = ctx.createBulkOperationContext("updateWhere", kind);
|
|
880
|
+
return ctx.withBulkOperationHooks(
|
|
881
|
+
hookContext,
|
|
882
|
+
() => runInWriteTransaction(
|
|
883
|
+
ctx,
|
|
884
|
+
backend,
|
|
885
|
+
async (target, lock) => {
|
|
886
|
+
const updateNodeSet = target.updateNodeSet;
|
|
887
|
+
if (updateNodeSet === void 0) {
|
|
888
|
+
throw new chunkC4F7VJ5D_cjs.ConfigurationError(
|
|
889
|
+
"The transaction backend does not support set-based node updates",
|
|
890
|
+
{ code: "SET_UPDATE_UNSUPPORTED", kind }
|
|
891
|
+
);
|
|
892
|
+
}
|
|
893
|
+
const hardDeleteUniquesByNodeIds = target.hardDeleteUniquesByNodeIds;
|
|
894
|
+
if (uniqueConstraints.length > 0 && (hardDeleteUniquesByNodeIds === void 0 || target.insertUniqueBatch === void 0 || target.checkUniqueBatch === void 0)) {
|
|
895
|
+
throw new chunkC4F7VJ5D_cjs.ConfigurationError(
|
|
896
|
+
"The transaction backend lacks batched uniqueness operations",
|
|
897
|
+
{ code: "SET_UPDATE_UNIQUENESS_UNSUPPORTED", kind }
|
|
898
|
+
);
|
|
899
|
+
}
|
|
900
|
+
if (chunkHAHNRASW_cjs.getSearchableFields(schema).length > 0 && (target.upsertFulltext === void 0 || target.deleteFulltext === void 0 || target.upsertFulltextBatch === void 0 || target.deleteFulltextBatch === void 0)) {
|
|
901
|
+
throw new chunkC4F7VJ5D_cjs.ConfigurationError(
|
|
902
|
+
"The transaction backend lacks batched fulltext operations",
|
|
903
|
+
{ code: "SET_UPDATE_FULLTEXT_UNSUPPORTED", kind }
|
|
904
|
+
);
|
|
905
|
+
}
|
|
906
|
+
if (chunkJ7LXTUTP_cjs.getEmbeddingFields(schema).length > 0 && (target.upsertEmbedding === void 0 || target.deleteEmbedding === void 0 || target.upsertEmbeddingBatch === void 0 || target.deleteEmbeddingBatch === void 0)) {
|
|
907
|
+
throw new chunkC4F7VJ5D_cjs.ConfigurationError(
|
|
908
|
+
"The transaction backend lacks batched vector operations",
|
|
909
|
+
{ code: "SET_UPDATE_VECTOR_UNSUPPORTED", kind }
|
|
910
|
+
);
|
|
911
|
+
}
|
|
912
|
+
const result = await updateNodeSet({
|
|
913
|
+
graphId: ctx.graphId,
|
|
914
|
+
kind,
|
|
915
|
+
patch,
|
|
916
|
+
unsetProperties,
|
|
917
|
+
candidateIds,
|
|
918
|
+
candidateIdColumn
|
|
919
|
+
});
|
|
920
|
+
if (result.affectedCount === 0) return { affectedCount: 0 };
|
|
921
|
+
const sidecarItems = result.rows.map((row) => {
|
|
922
|
+
const props = chunkEKFUG4G7_cjs.rowPropsToObject(row.props);
|
|
923
|
+
const validatedProps = chunkKKYELPZ2_cjs.validateNodeProps(schema, props, {
|
|
924
|
+
kind,
|
|
925
|
+
operation: "update",
|
|
926
|
+
id: row.id
|
|
927
|
+
});
|
|
928
|
+
if (!chunkACSVZPK7_cjs.canonicalEqual(validatedProps, props)) {
|
|
929
|
+
throw new chunkC4F7VJ5D_cjs.ValidationError(
|
|
930
|
+
`Set update would persist a non-canonical ${kind} row`,
|
|
931
|
+
{
|
|
932
|
+
entityType: "node",
|
|
933
|
+
kind,
|
|
934
|
+
operation: "update",
|
|
935
|
+
id: row.id,
|
|
936
|
+
issues: [
|
|
937
|
+
{
|
|
938
|
+
path: "props",
|
|
939
|
+
message: "The complete row requires schema normalization"
|
|
940
|
+
}
|
|
941
|
+
]
|
|
942
|
+
}
|
|
943
|
+
);
|
|
944
|
+
}
|
|
945
|
+
return {
|
|
946
|
+
kind,
|
|
947
|
+
id: row.id,
|
|
948
|
+
schema,
|
|
949
|
+
props: validatedProps,
|
|
950
|
+
uniqueConstraints
|
|
951
|
+
};
|
|
952
|
+
});
|
|
953
|
+
if (uniqueConstraints.length > 0) {
|
|
954
|
+
const affectedIds = new Set(result.rows.map((row) => row.id));
|
|
955
|
+
for (const constraint of uniqueConstraints) {
|
|
956
|
+
const keyToId = /* @__PURE__ */ new Map();
|
|
957
|
+
for (const item of sidecarItems) {
|
|
958
|
+
if (!chunkJ7LXTUTP_cjs.checkWherePredicate(constraint, item.props)) continue;
|
|
959
|
+
const key = chunkJ7LXTUTP_cjs.computeUniqueKey(
|
|
960
|
+
item.props,
|
|
961
|
+
constraint.fields,
|
|
962
|
+
constraint.collation
|
|
963
|
+
);
|
|
964
|
+
const priorId = keyToId.get(key);
|
|
965
|
+
if (priorId !== void 0 && priorId !== item.id) {
|
|
966
|
+
throw new chunkC4F7VJ5D_cjs.UniquenessError({
|
|
967
|
+
constraintName: constraint.name,
|
|
968
|
+
kind,
|
|
969
|
+
existingId: priorId,
|
|
970
|
+
newId: item.id,
|
|
971
|
+
fields: constraint.fields
|
|
972
|
+
});
|
|
973
|
+
}
|
|
974
|
+
keyToId.set(key, item.id);
|
|
975
|
+
}
|
|
976
|
+
const keys = [...keyToId.keys()];
|
|
977
|
+
if (keys.length === 0) continue;
|
|
978
|
+
for (const kindToCheck of chunkJ7LXTUTP_cjs.getKindsForUniquenessCheck(
|
|
979
|
+
kind,
|
|
980
|
+
constraint.scope,
|
|
981
|
+
ctx.registry
|
|
982
|
+
)) {
|
|
983
|
+
const existingRows = await chunk764JHTLT_cjs.requireDefined(
|
|
984
|
+
target.checkUniqueBatch
|
|
985
|
+
)({
|
|
986
|
+
graphId: ctx.graphId,
|
|
987
|
+
nodeKind: kindToCheck,
|
|
988
|
+
constraintName: constraint.name,
|
|
989
|
+
keys
|
|
990
|
+
});
|
|
991
|
+
for (const existing of existingRows) {
|
|
992
|
+
if (existing.concrete_kind === kind && affectedIds.has(existing.node_id)) {
|
|
993
|
+
continue;
|
|
994
|
+
}
|
|
995
|
+
throw new chunkC4F7VJ5D_cjs.UniquenessError({
|
|
996
|
+
constraintName: constraint.name,
|
|
997
|
+
kind: kindToCheck,
|
|
998
|
+
existingId: existing.node_id,
|
|
999
|
+
newId: chunk764JHTLT_cjs.requireDefined(keyToId.get(existing.key)),
|
|
1000
|
+
fields: constraint.fields
|
|
1001
|
+
});
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
1005
|
+
await chunk764JHTLT_cjs.requireDefined(hardDeleteUniquesByNodeIds)({
|
|
1006
|
+
graphId: ctx.graphId,
|
|
1007
|
+
concreteKind: kind,
|
|
1008
|
+
nodeIds: result.rows.map((row) => row.id)
|
|
1009
|
+
});
|
|
1010
|
+
}
|
|
1011
|
+
await chunkJ7LXTUTP_cjs.applyNodeInsertSideEffectsBatch(
|
|
1012
|
+
chunkJ7LXTUTP_cjs.createNodeWriteContext(ctx.graphId, ctx.registry, lock),
|
|
1013
|
+
sidecarItems,
|
|
1014
|
+
target
|
|
1015
|
+
);
|
|
1016
|
+
return { affectedCount: result.affectedCount };
|
|
1017
|
+
},
|
|
1018
|
+
{ didWrite: (result) => result.affectedCount > 0 }
|
|
1019
|
+
)
|
|
1020
|
+
);
|
|
1021
|
+
}
|
|
790
1022
|
async function executeNodeUpsertUpdate(ctx, input, backend, options) {
|
|
791
1023
|
return runInWriteTransaction(
|
|
792
1024
|
ctx,
|
|
@@ -805,9 +1037,9 @@ async function executeNodeDelete(ctx, kind, id, backend) {
|
|
|
805
1037
|
async (target, lock) => {
|
|
806
1038
|
const registration = getNodeRegistration(ctx.graph, kind);
|
|
807
1039
|
const preflight = await target.getNode(ctx.graphId, kind, id);
|
|
808
|
-
if (!preflight || !
|
|
809
|
-
await
|
|
810
|
-
|
|
1040
|
+
if (!preflight || !chunkEKFUG4G7_cjs.isLiveNodeRow(preflight)) return;
|
|
1041
|
+
await chunkJ7LXTUTP_cjs.applyNodeSoftDelete(
|
|
1042
|
+
chunkJ7LXTUTP_cjs.createNodeWriteContext(ctx.graphId, ctx.registry, lock),
|
|
811
1043
|
{
|
|
812
1044
|
existing: preflight,
|
|
813
1045
|
schema: registration.type.schema,
|
|
@@ -829,8 +1061,8 @@ async function executeNodeHardDelete(ctx, kind, id, backend) {
|
|
|
829
1061
|
backend,
|
|
830
1062
|
async (target, lock) => {
|
|
831
1063
|
const registration = getNodeRegistration(ctx.graph, kind);
|
|
832
|
-
await
|
|
833
|
-
|
|
1064
|
+
await chunkJ7LXTUTP_cjs.applyNodeHardDelete(
|
|
1065
|
+
chunkJ7LXTUTP_cjs.createNodeWriteContext(ctx.graphId, ctx.registry, lock),
|
|
834
1066
|
{
|
|
835
1067
|
kind,
|
|
836
1068
|
id,
|
|
@@ -851,7 +1083,7 @@ async function executeNodeGetOrCreateByConstraint(ctx, kind, constraintName, pro
|
|
|
851
1083
|
operation: "create"
|
|
852
1084
|
});
|
|
853
1085
|
const constraint = resolveConstraint(ctx.graph, kind, constraintName);
|
|
854
|
-
if (!
|
|
1086
|
+
if (!chunkJ7LXTUTP_cjs.checkWherePredicate(constraint, validatedProps)) {
|
|
855
1087
|
const node = await executeNodeCreate(
|
|
856
1088
|
ctx,
|
|
857
1089
|
{ kind, props: validatedProps },
|
|
@@ -860,12 +1092,12 @@ async function executeNodeGetOrCreateByConstraint(ctx, kind, constraintName, pro
|
|
|
860
1092
|
);
|
|
861
1093
|
return { node, action: "created" };
|
|
862
1094
|
}
|
|
863
|
-
const key =
|
|
1095
|
+
const key = chunkJ7LXTUTP_cjs.computeUniqueKey(
|
|
864
1096
|
validatedProps,
|
|
865
1097
|
constraint.fields,
|
|
866
1098
|
constraint.collation
|
|
867
1099
|
);
|
|
868
|
-
const kindsToCheck =
|
|
1100
|
+
const kindsToCheck = chunkJ7LXTUTP_cjs.getKindsForUniquenessCheck(
|
|
869
1101
|
kind,
|
|
870
1102
|
constraint.scope,
|
|
871
1103
|
ctx.registry
|
|
@@ -934,13 +1166,13 @@ async function executeNodeFindByConstraint(ctx, kind, constraintName, props, bac
|
|
|
934
1166
|
operation: "create"
|
|
935
1167
|
});
|
|
936
1168
|
const constraint = resolveConstraint(ctx.graph, kind, constraintName);
|
|
937
|
-
if (!
|
|
938
|
-
const key =
|
|
1169
|
+
if (!chunkJ7LXTUTP_cjs.checkWherePredicate(constraint, validatedProps)) return void 0;
|
|
1170
|
+
const key = chunkJ7LXTUTP_cjs.computeUniqueKey(
|
|
939
1171
|
validatedProps,
|
|
940
1172
|
constraint.fields,
|
|
941
1173
|
constraint.collation
|
|
942
1174
|
);
|
|
943
|
-
const kindsToCheck =
|
|
1175
|
+
const kindsToCheck = chunkJ7LXTUTP_cjs.getKindsForUniquenessCheck(
|
|
944
1176
|
kind,
|
|
945
1177
|
constraint.scope,
|
|
946
1178
|
ctx.registry
|
|
@@ -970,8 +1202,8 @@ function validateAndComputeKeys(nodeKind, kind, constraint, items) {
|
|
|
970
1202
|
kind,
|
|
971
1203
|
operation: "create"
|
|
972
1204
|
});
|
|
973
|
-
const applies =
|
|
974
|
-
const key = applies ?
|
|
1205
|
+
const applies = chunkJ7LXTUTP_cjs.checkWherePredicate(constraint, validatedProps);
|
|
1206
|
+
const key = applies ? chunkJ7LXTUTP_cjs.computeUniqueKey(
|
|
975
1207
|
validatedProps,
|
|
976
1208
|
constraint.fields,
|
|
977
1209
|
constraint.collation
|
|
@@ -994,7 +1226,7 @@ async function executeNodeBulkFindByConstraint(ctx, kind, constraintName, items,
|
|
|
994
1226
|
const constraint = resolveConstraint(ctx.graph, kind, constraintName);
|
|
995
1227
|
const validated = validateAndComputeKeys(nodeKind, kind, constraint, items);
|
|
996
1228
|
const uniqueKeys = collectUniqueKeys(validated);
|
|
997
|
-
const kindsToCheck =
|
|
1229
|
+
const kindsToCheck = chunkJ7LXTUTP_cjs.getKindsForUniquenessCheck(
|
|
998
1230
|
kind,
|
|
999
1231
|
constraint.scope,
|
|
1000
1232
|
ctx.registry
|
|
@@ -1153,7 +1385,7 @@ async function executeNodeBulkFindByIndex(ctx, kind, indexName, items, backend,
|
|
|
1153
1385
|
}
|
|
1154
1386
|
);
|
|
1155
1387
|
}
|
|
1156
|
-
const adapter =
|
|
1388
|
+
const adapter = chunkJXUTCSXX_cjs.getDialect(backend.dialect);
|
|
1157
1389
|
const probes = items.map(
|
|
1158
1390
|
(item) => index.fields.map((pointer, position) => {
|
|
1159
1391
|
const value = chunkTDXIBCGY_cjs.resolveJsonPointer(item.props, pointer);
|
|
@@ -1186,7 +1418,7 @@ async function executeNodeBulkFindByIndex(ctx, kind, indexName, items, backend,
|
|
|
1186
1418
|
propsColumn: chunkU5W4LKZV_cjs.sql.raw(`"props"`),
|
|
1187
1419
|
systemColumn: (column) => chunkU5W4LKZV_cjs.sql.raw(`"${column}"`)
|
|
1188
1420
|
};
|
|
1189
|
-
const fieldKeys =
|
|
1421
|
+
const fieldKeys = chunkJXUTCSXX_cjs.compileNodeIndexFieldKeys(index, compileContext);
|
|
1190
1422
|
const groupPredicates = groupProbes.map(
|
|
1191
1423
|
(probe) => chunkU5W4LKZV_cjs.sql`(${chunkU5W4LKZV_cjs.sql.join(
|
|
1192
1424
|
fieldKeys.map((fieldKey, position) => {
|
|
@@ -1212,7 +1444,7 @@ async function executeNodeBulkFindByIndex(ctx, kind, indexName, items, backend,
|
|
|
1212
1444
|
chunkU5W4LKZV_cjs.sql`"deleted_at" IS NULL`
|
|
1213
1445
|
];
|
|
1214
1446
|
if (index.where !== void 0) {
|
|
1215
|
-
conditions.push(
|
|
1447
|
+
conditions.push(chunkJXUTCSXX_cjs.compileIndexWhere(compileContext, index.where));
|
|
1216
1448
|
}
|
|
1217
1449
|
conditions.push(chunkU5W4LKZV_cjs.sql`(${chunkU5W4LKZV_cjs.sql.join(groupPredicates, chunkU5W4LKZV_cjs.sql` OR `)})`);
|
|
1218
1450
|
const whereClause = chunkU5W4LKZV_cjs.sql.join(conditions, chunkU5W4LKZV_cjs.sql` AND `);
|
|
@@ -1253,7 +1485,7 @@ function capMatchesPerGroup(matches, limitPerInput) {
|
|
|
1253
1485
|
return capped;
|
|
1254
1486
|
}
|
|
1255
1487
|
async function hydrateNodesById(backend, graphId, kind, ids) {
|
|
1256
|
-
const rowsById = await
|
|
1488
|
+
const rowsById = await chunkJ7LXTUTP_cjs.getNodeRowsByIds(backend, graphId, kind, ids);
|
|
1257
1489
|
const nodesById = /* @__PURE__ */ new Map();
|
|
1258
1490
|
for (const [id, row] of rowsById) {
|
|
1259
1491
|
if (row.deleted_at !== void 0) continue;
|
|
@@ -1269,7 +1501,7 @@ async function executeNodeBulkGetOrCreateByConstraint(ctx, kind, constraintName,
|
|
|
1269
1501
|
const constraint = resolveConstraint(ctx.graph, kind, constraintName);
|
|
1270
1502
|
const validated = validateAndComputeKeys(nodeKind, kind, constraint, items);
|
|
1271
1503
|
const uniqueKeys = collectUniqueKeys(validated);
|
|
1272
|
-
const kindsToCheck =
|
|
1504
|
+
const kindsToCheck = chunkJ7LXTUTP_cjs.getKindsForUniquenessCheck(
|
|
1273
1505
|
kind,
|
|
1274
1506
|
constraint.scope,
|
|
1275
1507
|
ctx.registry
|
|
@@ -1382,6 +1614,7 @@ exports.executeNodeFindByConstraint = executeNodeFindByConstraint;
|
|
|
1382
1614
|
exports.executeNodeGetOrCreateByConstraint = executeNodeGetOrCreateByConstraint;
|
|
1383
1615
|
exports.executeNodeHardDelete = executeNodeHardDelete;
|
|
1384
1616
|
exports.executeNodeUpdate = executeNodeUpdate;
|
|
1617
|
+
exports.executeNodeUpdateWhere = executeNodeUpdateWhere;
|
|
1385
1618
|
exports.executeNodeUpsertUpdate = executeNodeUpsertUpdate;
|
|
1386
1619
|
exports.lockSchemaVersionForStoreWrite = lockSchemaVersionForStoreWrite;
|
|
1387
1620
|
exports.nodeUpsertDirtyCheck = nodeUpsertDirtyCheck;
|
|
@@ -1392,5 +1625,5 @@ exports.rowToNode = rowToNode;
|
|
|
1392
1625
|
exports.rowToNodeMeta = rowToNodeMeta;
|
|
1393
1626
|
exports.runHookedWriteOperation = runHookedWriteOperation;
|
|
1394
1627
|
exports.runInWriteTransaction = runInWriteTransaction;
|
|
1395
|
-
//# sourceMappingURL=chunk-
|
|
1396
|
-
//# sourceMappingURL=chunk-
|
|
1628
|
+
//# sourceMappingURL=chunk-UCQ3BFSY.cjs.map
|
|
1629
|
+
//# sourceMappingURL=chunk-UCQ3BFSY.cjs.map
|