@nicia-ai/typegraph 0.50.0 → 0.51.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/README.md +12 -0
- package/dist/backend/drizzle/indexes.cjs +10 -8
- package/dist/backend/drizzle/indexes.d.cts +1 -1
- package/dist/backend/drizzle/indexes.d.ts +1 -1
- package/dist/backend/drizzle/indexes.js +6 -4
- package/dist/backend/index.cjs +183 -50
- package/dist/backend/index.d.cts +90 -4
- package/dist/backend/index.d.ts +90 -4
- package/dist/backend/index.js +6 -9
- package/dist/backend/postgres/index.cjs +30 -28
- package/dist/backend/postgres/index.d.cts +7 -7
- package/dist/backend/postgres/index.d.ts +7 -7
- package/dist/backend/postgres/index.js +16 -14
- package/dist/backend/postgres/pglite-store.cjs +6 -62
- package/dist/backend/postgres/pglite-store.cjs.map +1 -1
- package/dist/backend/postgres/pglite-store.d.cts +8 -8
- package/dist/backend/postgres/pglite-store.d.ts +8 -8
- package/dist/backend/postgres/pglite-store.js +6 -62
- package/dist/backend/postgres/pglite-store.js.map +1 -1
- package/dist/backend/postgres/pglite.cjs +18 -16
- package/dist/backend/postgres/pglite.d.cts +3 -3
- package/dist/backend/postgres/pglite.d.ts +3 -3
- package/dist/backend/postgres/pglite.js +17 -15
- package/dist/backend/sqlite/index.cjs +27 -25
- package/dist/backend/sqlite/index.d.cts +7 -7
- package/dist/backend/sqlite/index.d.ts +7 -7
- package/dist/backend/sqlite/index.js +14 -12
- package/dist/backend/sqlite/libsql.cjs +21 -19
- 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 +16 -14
- package/dist/backend/sqlite/libsql.js.map +1 -1
- package/dist/backend/sqlite/local-store.cjs +8 -64
- 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 +7 -64
- package/dist/backend/sqlite/local-store.js.map +1 -1
- package/dist/backend/sqlite/local.cjs +22 -19
- package/dist/backend/sqlite/local.d.cts +3 -3
- package/dist/backend/sqlite/local.d.ts +3 -3
- package/dist/backend/sqlite/local.js +18 -15
- package/dist/{chunk-TUVD4DFR.cjs → chunk-2CVDZCXH.cjs} +122 -51
- package/dist/chunk-2CVDZCXH.cjs.map +1 -0
- package/dist/{chunk-I5C6OTKR.js → chunk-2DWTBNSH.js} +3 -3
- package/dist/{chunk-I5C6OTKR.js.map → chunk-2DWTBNSH.js.map} +1 -1
- package/dist/{chunk-C76WFIVZ.cjs → chunk-2KCTP3U2.cjs} +180 -127
- package/dist/chunk-2KCTP3U2.cjs.map +1 -0
- package/dist/{chunk-BYBDM423.cjs → chunk-322TBTOQ.cjs} +48 -48
- package/dist/{chunk-BYBDM423.cjs.map → chunk-322TBTOQ.cjs.map} +1 -1
- package/dist/chunk-36SX6QXP.cjs +186 -0
- package/dist/chunk-36SX6QXP.cjs.map +1 -0
- package/dist/{chunk-H3XP6BAV.js → chunk-36VYWVQU.js} +3 -3
- package/dist/{chunk-H3XP6BAV.js.map → chunk-36VYWVQU.js.map} +1 -1
- package/dist/{chunk-VTJVMP4I.js → chunk-4DKY6RIU.js} +102 -31
- package/dist/chunk-4DKY6RIU.js.map +1 -0
- package/dist/chunk-4QKOZYMV.js +9 -0
- package/dist/chunk-4QKOZYMV.js.map +1 -0
- package/dist/{chunk-U3Z7XKAG.js → chunk-57JM6NW3.js} +8 -18
- package/dist/chunk-57JM6NW3.js.map +1 -0
- package/dist/{chunk-XMY2SXOH.cjs → chunk-5WWEYV4H.cjs} +2208 -579
- package/dist/chunk-5WWEYV4H.cjs.map +1 -0
- package/dist/{chunk-WQBAQZHR.js → chunk-6NLYIMJO.js} +4 -4
- package/dist/{chunk-WQBAQZHR.js.map → chunk-6NLYIMJO.js.map} +1 -1
- package/dist/{chunk-G2TLHH6T.cjs → chunk-7B7I7YAW.cjs} +6 -6
- package/dist/{chunk-G2TLHH6T.cjs.map → chunk-7B7I7YAW.cjs.map} +1 -1
- package/dist/{chunk-EDLKIQRI.js → chunk-7G5IYROL.js} +6 -548
- package/dist/chunk-7G5IYROL.js.map +1 -0
- package/dist/{chunk-46UGOVRW.js → chunk-7QFRK6PU.js} +3 -7
- package/dist/chunk-7QFRK6PU.js.map +1 -0
- package/dist/chunk-A4C4NJ5U.cjs +12 -0
- package/dist/chunk-A4C4NJ5U.cjs.map +1 -0
- package/dist/{chunk-TYGGUWMS.cjs → chunk-B3MN7EJR.cjs} +177 -137
- package/dist/chunk-B3MN7EJR.cjs.map +1 -0
- package/dist/{chunk-K6VKTBST.cjs → chunk-BZ5MVITP.cjs} +4 -4
- package/dist/{chunk-K6VKTBST.cjs.map → chunk-BZ5MVITP.cjs.map} +1 -1
- package/dist/{chunk-R7MRFE5P.js → chunk-CAI6SMP6.js} +3 -3
- package/dist/{chunk-R7MRFE5P.js.map → chunk-CAI6SMP6.js.map} +1 -1
- package/dist/{chunk-ZAQUKCUC.js → chunk-CBOD7TXH.js} +5 -5
- package/dist/{chunk-ZAQUKCUC.js.map → chunk-CBOD7TXH.js.map} +1 -1
- package/dist/{chunk-LLVOQOWE.cjs → chunk-CRZ56SZU.cjs} +6 -5
- package/dist/chunk-CRZ56SZU.cjs.map +1 -0
- package/dist/{chunk-ON47CBE4.cjs → chunk-D3GWARN7.cjs} +47 -47
- package/dist/{chunk-ON47CBE4.cjs.map → chunk-D3GWARN7.cjs.map} +1 -1
- package/dist/{chunk-W5SOCUBL.js → chunk-D3OUDFU7.js} +5 -5
- package/dist/{chunk-W5SOCUBL.js.map → chunk-D3OUDFU7.js.map} +1 -1
- package/dist/chunk-EKG2UXNX.cjs +23 -0
- package/dist/chunk-EKG2UXNX.cjs.map +1 -0
- package/dist/{chunk-7PRMDZIA.cjs → chunk-FMMW3KX7.cjs} +21 -55
- package/dist/chunk-FMMW3KX7.cjs.map +1 -0
- package/dist/chunk-H2VWDQWC.cjs +571 -0
- package/dist/chunk-H2VWDQWC.cjs.map +1 -0
- package/dist/chunk-H4FY6OZK.js +13 -0
- package/dist/chunk-H4FY6OZK.js.map +1 -0
- package/dist/{chunk-OJHD3LXJ.cjs → chunk-H5IJSROF.cjs} +2 -8
- package/dist/chunk-H5IJSROF.cjs.map +1 -0
- package/dist/{chunk-U5EL6JUV.js → chunk-I5IOSA27.js} +101 -103
- package/dist/chunk-I5IOSA27.js.map +1 -0
- package/dist/{chunk-SHC7BCG5.cjs → chunk-I7YAY2VQ.cjs} +7 -7
- package/dist/{chunk-SHC7BCG5.cjs.map → chunk-I7YAY2VQ.cjs.map} +1 -1
- package/dist/chunk-IRCWIA3R.js +20 -0
- package/dist/chunk-IRCWIA3R.js.map +1 -0
- package/dist/chunk-IVQBLXBK.cjs +55 -0
- package/dist/chunk-IVQBLXBK.cjs.map +1 -0
- package/dist/{chunk-5PP4KRPV.js → chunk-IZD4HTCP.js} +5 -5
- package/dist/{chunk-5PP4KRPV.js.map → chunk-IZD4HTCP.js.map} +1 -1
- package/dist/{chunk-7CCMCMJO.cjs → chunk-JHRUZ73O.cjs} +75 -66
- package/dist/chunk-JHRUZ73O.cjs.map +1 -0
- package/dist/{chunk-RDP6ZRSM.cjs → chunk-JQKMEKKW.cjs} +261 -204
- package/dist/chunk-JQKMEKKW.cjs.map +1 -0
- package/dist/chunk-JVA3KDEA.cjs +691 -0
- package/dist/chunk-JVA3KDEA.cjs.map +1 -0
- package/dist/{chunk-JG5XIJDY.js → chunk-K67P5DLL.js} +62 -22
- package/dist/chunk-K67P5DLL.js.map +1 -0
- package/dist/{chunk-CS6JTQQ2.cjs → chunk-KACEYDYV.cjs} +94 -62
- package/dist/chunk-KACEYDYV.cjs.map +1 -0
- package/dist/{chunk-5OWHU7Z7.cjs → chunk-L6EVYIID.cjs} +248 -210
- package/dist/chunk-L6EVYIID.cjs.map +1 -0
- package/dist/{chunk-7OWE7WD6.js → chunk-LI4K2KEJ.js} +4 -4
- package/dist/{chunk-7OWE7WD6.js.map → chunk-LI4K2KEJ.js.map} +1 -1
- package/dist/chunk-LKZDQ2B4.js +1581 -0
- package/dist/chunk-LKZDQ2B4.js.map +1 -0
- package/dist/{chunk-45YZXI6X.cjs → chunk-LLFPQOBA.cjs} +27 -27
- package/dist/{chunk-45YZXI6X.cjs.map → chunk-LLFPQOBA.cjs.map} +1 -1
- package/dist/{chunk-ZRJTM7MT.js → chunk-LZMQ3SFK.js} +3 -3
- package/dist/{chunk-ZRJTM7MT.js.map → chunk-LZMQ3SFK.js.map} +1 -1
- package/dist/{chunk-DI6VC62F.js → chunk-M3VTS3F6.js} +3 -3
- package/dist/{chunk-DI6VC62F.js.map → chunk-M3VTS3F6.js.map} +1 -1
- package/dist/{chunk-MZ34E2GN.js → chunk-NBOS7BY3.js} +60 -21
- package/dist/chunk-NBOS7BY3.js.map +1 -0
- package/dist/{chunk-YA36ABIL.js → chunk-NGQDGL5X.js} +14 -48
- package/dist/chunk-NGQDGL5X.js.map +1 -0
- package/dist/{chunk-ZBFZGLZE.cjs → chunk-NLX5OWK7.cjs} +6 -2
- package/dist/chunk-NLX5OWK7.cjs.map +1 -0
- package/dist/chunk-NUQ2YFFH.cjs +1637 -0
- package/dist/chunk-NUQ2YFFH.cjs.map +1 -0
- package/dist/{chunk-TTCOPKUL.cjs → chunk-OGL4X4PH.cjs} +182 -184
- package/dist/chunk-OGL4X4PH.cjs.map +1 -0
- package/dist/{chunk-HY5BNOUN.cjs → chunk-OTNTGEXR.cjs} +4 -4
- package/dist/{chunk-HY5BNOUN.cjs.map → chunk-OTNTGEXR.cjs.map} +1 -1
- package/dist/chunk-OTWE63BW.js +53 -0
- package/dist/chunk-OTWE63BW.js.map +1 -0
- package/dist/chunk-PC5NGH5A.js +549 -0
- package/dist/chunk-PC5NGH5A.js.map +1 -0
- package/dist/{chunk-IPRP6TDL.cjs → chunk-PS3TUWJM.cjs} +7 -7
- package/dist/{chunk-IPRP6TDL.cjs.map → chunk-PS3TUWJM.cjs.map} +1 -1
- package/dist/{chunk-V76FGHY3.js → chunk-PVFFH7TL.js} +5 -5
- package/dist/{chunk-V76FGHY3.js.map → chunk-PVFFH7TL.js.map} +1 -1
- package/dist/chunk-QCD5JKU4.cjs +15 -0
- package/dist/chunk-QCD5JKU4.cjs.map +1 -0
- package/dist/{chunk-IRPYOHRC.js → chunk-QG5VEOKX.js} +6 -2
- package/dist/chunk-QG5VEOKX.js.map +1 -0
- package/dist/{chunk-MM3JHVKZ.cjs → chunk-QLLZM5I3.cjs} +4 -4
- package/dist/{chunk-MM3JHVKZ.cjs.map → chunk-QLLZM5I3.cjs.map} +1 -1
- package/dist/{chunk-MX7EKQPM.js → chunk-RCBG6YMT.js} +345 -97
- package/dist/chunk-RCBG6YMT.js.map +1 -0
- package/dist/{chunk-2CYI5HRH.js → chunk-RI7RJH4G.js} +49 -17
- package/dist/chunk-RI7RJH4G.js.map +1 -0
- package/dist/{chunk-5LKOVCPP.js → chunk-RVUL2HXY.js} +6 -5
- package/dist/chunk-RVUL2HXY.js.map +1 -0
- package/dist/{chunk-WK23PGTP.cjs → chunk-S5GU4LUN.cjs} +11 -11
- package/dist/{chunk-WK23PGTP.cjs.map → chunk-S5GU4LUN.cjs.map} +1 -1
- package/dist/{chunk-S33YQEL7.js → chunk-SDPWO2Z5.js} +6 -6
- package/dist/{chunk-S33YQEL7.js.map → chunk-SDPWO2Z5.js.map} +1 -1
- package/dist/{chunk-6S3PTHL4.js → chunk-SLGGT2XD.js} +3 -3
- package/dist/{chunk-6S3PTHL4.js.map → chunk-SLGGT2XD.js.map} +1 -1
- package/dist/{chunk-HSEZ7X6Y.cjs → chunk-TIJUA4I6.cjs} +45 -45
- package/dist/{chunk-HSEZ7X6Y.cjs.map → chunk-TIJUA4I6.cjs.map} +1 -1
- package/dist/{chunk-CSNOYIB4.cjs → chunk-TM54OBHX.cjs} +13 -13
- package/dist/{chunk-CSNOYIB4.cjs.map → chunk-TM54OBHX.cjs.map} +1 -1
- package/dist/{chunk-2GIV5X4P.js → chunk-TYEYRCXL.js} +86 -33
- package/dist/chunk-TYEYRCXL.js.map +1 -0
- package/dist/{chunk-MJPZNEJZ.js → chunk-UKOVGCRN.js} +2095 -496
- package/dist/chunk-UKOVGCRN.js.map +1 -0
- package/dist/chunk-UYKDYE5D.cjs +12 -0
- package/dist/{chunk-KWNWG4RC.cjs.map → chunk-UYKDYE5D.cjs.map} +1 -1
- package/dist/{chunk-FX5ZW6PN.js → chunk-VAAC7L57.js} +95 -40
- package/dist/chunk-VAAC7L57.js.map +1 -0
- package/dist/{chunk-ISKCIQF2.cjs → chunk-VKHXYVN7.cjs} +14 -25
- package/dist/chunk-VKHXYVN7.cjs.map +1 -0
- package/dist/chunk-VUQZNUHU.js +171 -0
- package/dist/chunk-VUQZNUHU.js.map +1 -0
- package/dist/{chunk-K2XYLVVB.cjs → chunk-WDM5WQK4.cjs} +175 -136
- package/dist/chunk-WDM5WQK4.cjs.map +1 -0
- package/dist/{chunk-GVYVGGPJ.js → chunk-WFSYYU4W.js} +66 -28
- package/dist/chunk-WFSYYU4W.js.map +1 -0
- package/dist/{chunk-WCLMKNQE.cjs → chunk-WRBV2FNH.cjs} +1356 -1108
- package/dist/chunk-WRBV2FNH.cjs.map +1 -0
- package/dist/chunk-XORONCV3.js +202 -0
- package/dist/chunk-XORONCV3.js.map +1 -0
- package/dist/{chunk-2Q45FAIE.js → chunk-YT2IVFAI.js} +26 -17
- package/dist/chunk-YT2IVFAI.js.map +1 -0
- package/dist/chunk-ZGVTNKTX.cjs +217 -0
- package/dist/chunk-ZGVTNKTX.cjs.map +1 -0
- package/dist/core/index.cjs +20 -20
- package/dist/core/index.d.cts +4 -4
- package/dist/core/index.d.ts +4 -4
- package/dist/core/index.js +4 -4
- package/dist/{ddl-B49O7dB_.d.ts → ddl-BvcbgzHo.d.ts} +3 -3
- package/dist/{ddl-DcZG660s.d.cts → ddl-Ufebz5q5.d.cts} +3 -3
- package/dist/graph-extension/index.d.cts +2 -4
- package/dist/graph-extension/index.d.ts +2 -4
- package/dist/graph-merge/index.cjs +140 -125
- package/dist/graph-merge/index.cjs.map +1 -1
- package/dist/graph-merge/index.d.cts +8 -9
- package/dist/graph-merge/index.d.ts +8 -9
- package/dist/graph-merge/index.js +42 -27
- package/dist/graph-merge/index.js.map +1 -1
- package/dist/index.cjs +144 -143
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -12
- package/dist/index.d.ts +11 -12
- package/dist/index.js +30 -29
- package/dist/index.js.map +1 -1
- package/dist/indexes/index.cjs +14 -12
- package/dist/indexes/index.d.cts +4 -4
- package/dist/indexes/index.d.ts +4 -4
- package/dist/indexes/index.js +7 -5
- package/dist/{ingestion-import-target-CI8OWIkM.d.ts → ingestion-import-target-CAs1OX-l.d.cts} +1 -1
- package/dist/{ingestion-import-target-DCpfM1PX.d.cts → ingestion-import-target-DCQSPfNx.d.ts} +1 -1
- package/dist/interchange/index.cjs +41 -39
- package/dist/interchange/index.cjs.map +1 -1
- package/dist/interchange/index.d.cts +8 -8
- package/dist/interchange/index.d.ts +8 -8
- package/dist/interchange/index.js +16 -14
- package/dist/interchange/index.js.map +1 -1
- package/dist/local-store-impl-6DDTFM32.cjs +77 -0
- package/dist/local-store-impl-6DDTFM32.cjs.map +1 -0
- package/dist/local-store-impl-OXTOVU2J.js +75 -0
- package/dist/local-store-impl-OXTOVU2J.js.map +1 -0
- package/dist/{manager-Cfg1ENj1.d.ts → manager-B68OrPR2.d.ts} +1 -2
- package/dist/{manager-D348fa6W.d.cts → manager-D_t7oK69.d.cts} +1 -2
- package/dist/pglite-store-impl-6EMZGL7K.js +73 -0
- package/dist/pglite-store-impl-6EMZGL7K.js.map +1 -0
- package/dist/pglite-store-impl-GJG3Y7RP.cjs +75 -0
- package/dist/pglite-store-impl-GJG3Y7RP.cjs.map +1 -0
- package/dist/{postgres-UStOycLI.d.ts → postgres-BPLSVyHM.d.ts} +1 -1
- package/dist/{postgres-CH1kkM5J.d.cts → postgres-CqvtFC2y.d.cts} +1 -1
- package/dist/profiler/index.d.cts +9 -9
- package/dist/profiler/index.d.ts +9 -9
- package/dist/provenance/index.cjs +33 -20
- 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 +24 -11
- package/dist/provenance/index.js.map +1 -1
- package/dist/{repair-validity-windows-aWX7VNvv.d.cts → repair-validity-windows-DEzCKAdy.d.cts} +7 -3
- package/dist/{repair-validity-windows-BtOEe2pS.d.ts → repair-validity-windows-GMdaS2AH.d.ts} +7 -3
- package/dist/resolve-D_H8MHtq.d.ts +1805 -0
- package/dist/resolve-WEW8gWws.d.cts +1805 -0
- package/dist/schema/index.cjs +42 -40
- package/dist/schema/index.d.cts +4 -6
- package/dist/schema/index.d.ts +4 -6
- package/dist/schema/index.js +15 -13
- package/dist/{searchable-z4BiFfHI.d.ts → searchable-C_UREI9K.d.ts} +1 -1
- package/dist/{searchable-C8-RrL3l.d.cts → searchable-ClgET_i7.d.cts} +1 -1
- package/dist/{sqlite-axLw5Lo5.d.ts → sqlite-D1mXO9Kp.d.cts} +2 -1
- package/dist/{sqlite-Cyx9j9o6.d.cts → sqlite-MZA3oZNB.d.ts} +2 -1
- package/dist/{store-CTfQ9taw.d.ts → store-CuFX7fCx.d.cts} +38 -41
- package/dist/{store-DR9J7JVB.d.cts → store-D-ZjXQpW.d.ts} +38 -41
- package/dist/{temporal-CBOrERz5.d.ts → temporal-CpyEiRY8.d.cts} +1 -1
- package/dist/{temporal-B4Ky4wzh.d.cts → temporal-y0Aep9Su.d.ts} +1 -1
- package/dist/{types-CWg4dTjj.d.ts → types-6yf0Vv-_.d.cts} +1672 -1
- package/dist/{types-CWg4dTjj.d.cts → types-6yf0Vv-_.d.ts} +1672 -1
- package/dist/{types-BScHXVM7.d.ts → types-DzJ4dlzk.d.cts} +1 -1
- package/dist/{types-BE921wRl.d.cts → types-_vVSB9k-.d.ts} +1 -1
- package/dist/{where-BWXUPV3C.d.ts → where-DuG2LCLe.d.ts} +1 -1
- package/dist/{where-CNtx1aLc.d.cts → where-Mhf_yyKX.d.cts} +1 -1
- package/package.json +5 -1
- package/dist/chunk-2CYI5HRH.js.map +0 -1
- package/dist/chunk-2GIV5X4P.js.map +0 -1
- package/dist/chunk-2Q45FAIE.js.map +0 -1
- package/dist/chunk-46UGOVRW.js.map +0 -1
- package/dist/chunk-5LKOVCPP.js.map +0 -1
- package/dist/chunk-5OWHU7Z7.cjs.map +0 -1
- package/dist/chunk-6LEOAIIB.js +0 -1160
- package/dist/chunk-6LEOAIIB.js.map +0 -1
- package/dist/chunk-7CCMCMJO.cjs.map +0 -1
- package/dist/chunk-7PRMDZIA.cjs.map +0 -1
- package/dist/chunk-C76WFIVZ.cjs.map +0 -1
- package/dist/chunk-CS6JTQQ2.cjs.map +0 -1
- package/dist/chunk-EDLKIQRI.js.map +0 -1
- package/dist/chunk-EH3JZJUM.cjs +0 -567
- package/dist/chunk-EH3JZJUM.cjs.map +0 -1
- package/dist/chunk-FX5ZW6PN.js.map +0 -1
- package/dist/chunk-GHZPZNFC.cjs +0 -132
- package/dist/chunk-GHZPZNFC.cjs.map +0 -1
- package/dist/chunk-GVYVGGPJ.js.map +0 -1
- package/dist/chunk-IHK5KA2Q.cjs +0 -262
- package/dist/chunk-IHK5KA2Q.cjs.map +0 -1
- package/dist/chunk-IRPYOHRC.js.map +0 -1
- package/dist/chunk-ISKCIQF2.cjs.map +0 -1
- package/dist/chunk-JG5XIJDY.js.map +0 -1
- package/dist/chunk-K2XYLVVB.cjs.map +0 -1
- package/dist/chunk-KWNWG4RC.cjs +0 -12
- package/dist/chunk-LLVOQOWE.cjs.map +0 -1
- package/dist/chunk-MJPZNEJZ.js.map +0 -1
- package/dist/chunk-MX7EKQPM.js.map +0 -1
- package/dist/chunk-MZ34E2GN.js.map +0 -1
- package/dist/chunk-OJHD3LXJ.cjs.map +0 -1
- package/dist/chunk-PALYTHGM.js +0 -114
- package/dist/chunk-PALYTHGM.js.map +0 -1
- package/dist/chunk-RDP6ZRSM.cjs.map +0 -1
- package/dist/chunk-S3SDEQMC.js +0 -532
- package/dist/chunk-S3SDEQMC.js.map +0 -1
- package/dist/chunk-TEC24ZDA.cjs +0 -1254
- package/dist/chunk-TEC24ZDA.cjs.map +0 -1
- package/dist/chunk-TP4NJTI3.cjs +0 -1192
- package/dist/chunk-TP4NJTI3.cjs.map +0 -1
- package/dist/chunk-TTCOPKUL.cjs.map +0 -1
- package/dist/chunk-TUVD4DFR.cjs.map +0 -1
- package/dist/chunk-TYGGUWMS.cjs.map +0 -1
- package/dist/chunk-U3Z7XKAG.js.map +0 -1
- package/dist/chunk-U5EL6JUV.js.map +0 -1
- package/dist/chunk-VTJVMP4I.js.map +0 -1
- package/dist/chunk-WCLMKNQE.cjs.map +0 -1
- package/dist/chunk-XMY2SXOH.cjs.map +0 -1
- package/dist/chunk-Y55DLLEG.js +0 -247
- package/dist/chunk-Y55DLLEG.js.map +0 -1
- package/dist/chunk-YA36ABIL.js.map +0 -1
- package/dist/chunk-ZBFZGLZE.cjs.map +0 -1
- package/dist/index-B0PrmE3K.d.cts +0 -1146
- package/dist/index-CwcXsL5R.d.ts +0 -1146
- package/dist/materialize-indexes-C9GG3O3C.d.ts +0 -266
- package/dist/materialize-indexes-CrSiW_lT.d.cts +0 -266
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
3
|
+
var chunk2CVDZCXH_cjs = require('./chunk-2CVDZCXH.cjs');
|
|
4
|
+
var chunkFMMW3KX7_cjs = require('./chunk-FMMW3KX7.cjs');
|
|
5
|
+
var chunkL6EVYIID_cjs = require('./chunk-L6EVYIID.cjs');
|
|
6
|
+
var chunkJQKMEKKW_cjs = require('./chunk-JQKMEKKW.cjs');
|
|
7
|
+
var chunkNLX5OWK7_cjs = require('./chunk-NLX5OWK7.cjs');
|
|
8
|
+
var chunkZGVTNKTX_cjs = require('./chunk-ZGVTNKTX.cjs');
|
|
9
|
+
var chunkNUQ2YFFH_cjs = require('./chunk-NUQ2YFFH.cjs');
|
|
10
|
+
var chunkCRZ56SZU_cjs = require('./chunk-CRZ56SZU.cjs');
|
|
11
11
|
var chunkM5MSP3BI_cjs = require('./chunk-M5MSP3BI.cjs');
|
|
12
|
-
var
|
|
13
|
-
var
|
|
12
|
+
var chunkJVA3KDEA_cjs = require('./chunk-JVA3KDEA.cjs');
|
|
13
|
+
var chunkH5IJSROF_cjs = require('./chunk-H5IJSROF.cjs');
|
|
14
14
|
var chunkHAHNRASW_cjs = require('./chunk-HAHNRASW.cjs');
|
|
15
15
|
var chunkVLBTRXA2_cjs = require('./chunk-VLBTRXA2.cjs');
|
|
16
16
|
var chunkX4GDXBOP_cjs = require('./chunk-X4GDXBOP.cjs');
|
|
@@ -22,7 +22,7 @@ function nullToUndefined(value) {
|
|
|
22
22
|
return value === null ? void 0 : value;
|
|
23
23
|
}
|
|
24
24
|
function rowToNode(row) {
|
|
25
|
-
const rawProps =
|
|
25
|
+
const rawProps = chunkNUQ2YFFH_cjs.rowPropsToObject(row.props);
|
|
26
26
|
const props = chunkVLBTRXA2_cjs.filterReservedKeys(rawProps, chunkVLBTRXA2_cjs.RESERVED_NODE_KEYS);
|
|
27
27
|
return {
|
|
28
28
|
kind: row.kind,
|
|
@@ -42,7 +42,7 @@ function rowToNodeMeta(row) {
|
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
44
|
function rowToEdge(row) {
|
|
45
|
-
const rawProps =
|
|
45
|
+
const rawProps = chunkNUQ2YFFH_cjs.rowPropsToObject(row.props);
|
|
46
46
|
const props = chunkVLBTRXA2_cjs.filterReservedKeys(rawProps, chunkVLBTRXA2_cjs.RESERVED_EDGE_KEYS);
|
|
47
47
|
return {
|
|
48
48
|
id: row.id,
|
|
@@ -70,14 +70,14 @@ function edgeWriteNeedsConstraintFence(cardinality) {
|
|
|
70
70
|
return cardinality === "many" ? void 0 : "edgeCardinality";
|
|
71
71
|
}
|
|
72
72
|
function nodeWriteNeedsConstraintFence(registry, kind, uniqueConstraints, operation) {
|
|
73
|
-
return
|
|
73
|
+
return chunk2CVDZCXH_cjs.nodeClaimSites(registry, kind, uniqueConstraints, operation).find(
|
|
74
74
|
(site) => site.needsLockFence
|
|
75
75
|
)?.refusalReason;
|
|
76
76
|
}
|
|
77
77
|
function graphOwesClaims(graph, registry) {
|
|
78
78
|
for (const [kind, registration] of Object.entries(graph.nodes)) {
|
|
79
79
|
for (const operation of ["create", "update"]) {
|
|
80
|
-
const gating =
|
|
80
|
+
const gating = chunk2CVDZCXH_cjs.nodeClaimSites(
|
|
81
81
|
registry,
|
|
82
82
|
kind,
|
|
83
83
|
registration.unique ?? [],
|
|
@@ -99,14 +99,14 @@ async function checkDisjointnessConstraint(ctx, kind, id) {
|
|
|
99
99
|
for (const disjointKind of disjointKinds) {
|
|
100
100
|
const existing = await ctx.backend.getNode(ctx.graphId, disjointKind, id);
|
|
101
101
|
if (existing && !existing.deleted_at) {
|
|
102
|
-
const error =
|
|
102
|
+
const error = chunkCRZ56SZU_cjs.checkDisjointness(id, kind, [disjointKind], ctx.registry);
|
|
103
103
|
if (error) throw error;
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
async function checkCardinalityConstraint(ctx, edgeKind, cardinality, fromKind, fromId, toKind, toId, validTo) {
|
|
108
108
|
if (cardinality === "many") return;
|
|
109
|
-
const spec =
|
|
109
|
+
const spec = chunkFMMW3KX7_cjs.EDGE_CARDINALITY_SPECS[cardinality];
|
|
110
110
|
if (!spec.claimsWhenBornEnded && validTo !== void 0) return;
|
|
111
111
|
if (spec.keyShape === "fromAndTo") {
|
|
112
112
|
const exists = await ctx.backend.edgeExistsBetween({
|
|
@@ -117,7 +117,7 @@ async function checkCardinalityConstraint(ctx, edgeKind, cardinality, fromKind,
|
|
|
117
117
|
toKind,
|
|
118
118
|
toId
|
|
119
119
|
});
|
|
120
|
-
const error2 =
|
|
120
|
+
const error2 = chunkCRZ56SZU_cjs.checkUniqueEdge(
|
|
121
121
|
edgeKind,
|
|
122
122
|
fromKind,
|
|
123
123
|
fromId,
|
|
@@ -135,7 +135,7 @@ async function checkCardinalityConstraint(ctx, edgeKind, cardinality, fromKind,
|
|
|
135
135
|
fromId,
|
|
136
136
|
activeOnly: spec.holderLiveness === "liveAndActive"
|
|
137
137
|
});
|
|
138
|
-
const error =
|
|
138
|
+
const error = chunkCRZ56SZU_cjs.checkCardinality(
|
|
139
139
|
edgeKind,
|
|
140
140
|
fromKind,
|
|
141
141
|
fromId,
|
|
@@ -148,17 +148,17 @@ async function checkCardinalityConstraint(ctx, edgeKind, cardinality, fromKind,
|
|
|
148
148
|
|
|
149
149
|
// src/store/operations/edge-batch-validation.ts
|
|
150
150
|
function buildEdgeEndpointCacheKey(graphId, kind, id) {
|
|
151
|
-
return
|
|
151
|
+
return chunkCRZ56SZU_cjs.encodeTupleKey([graphId, kind, id]);
|
|
152
152
|
}
|
|
153
153
|
function buildEdgeFromCacheKey(graphId, edgeKind, fromKind, fromId) {
|
|
154
|
-
return
|
|
154
|
+
return chunkCRZ56SZU_cjs.encodeTupleKey([graphId, edgeKind, fromKind, fromId]);
|
|
155
155
|
}
|
|
156
156
|
function buildEdgeBetweenCacheKey(graphId, edgeKind, fromKind, fromId, toKind, toId) {
|
|
157
|
-
return
|
|
157
|
+
return chunkCRZ56SZU_cjs.encodeTupleKey([graphId, edgeKind, fromKind, fromId, toKind, toId]);
|
|
158
158
|
}
|
|
159
159
|
function buildCountEdgesFromCacheKey(params) {
|
|
160
160
|
const activeOnly = params.activeOnly === true ? "1" : "0";
|
|
161
|
-
return
|
|
161
|
+
return chunkCRZ56SZU_cjs.encodeTupleKey([
|
|
162
162
|
params.graphId,
|
|
163
163
|
params.edgeKind,
|
|
164
164
|
params.fromKind,
|
|
@@ -255,7 +255,7 @@ function createEdgeBatchValidationBackend(backend) {
|
|
|
255
255
|
pendingUniquePairs.add(uniqueCacheKey);
|
|
256
256
|
}
|
|
257
257
|
}
|
|
258
|
-
const validationBackend =
|
|
258
|
+
const validationBackend = chunkNLX5OWK7_cjs.deriveBackend(backend, {
|
|
259
259
|
getNode: getNodeCached,
|
|
260
260
|
countEdgesFrom: countEdgesFromCached,
|
|
261
261
|
edgeExistsBetween: edgeExistsBetweenCached
|
|
@@ -268,12 +268,14 @@ function createEdgeBatchValidationBackend(backend) {
|
|
|
268
268
|
}
|
|
269
269
|
|
|
270
270
|
// src/store/operations/edge-write-pipeline.ts
|
|
271
|
-
function createEdgeWriteContext(graphId, lock) {
|
|
272
|
-
return { graphId, lock };
|
|
271
|
+
function createEdgeWriteContext(graphId, lock, claimsVerdict) {
|
|
272
|
+
return { graphId, lock, claimsVerdict };
|
|
273
273
|
}
|
|
274
274
|
async function applyEdgeUpdate(ctx, args, backend) {
|
|
275
275
|
const { claim, ...rowWork } = args;
|
|
276
|
-
if (claim !== void 0)
|
|
276
|
+
if (claim !== void 0) {
|
|
277
|
+
await chunkFMMW3KX7_cjs.claimEdgeCardinality(backend, ctx.claimsVerdict(), claim);
|
|
278
|
+
}
|
|
277
279
|
const updateParams = { graphId: ctx.graphId, ...rowWork };
|
|
278
280
|
return backend.updateEdge(updateParams);
|
|
279
281
|
}
|
|
@@ -291,7 +293,7 @@ async function applyEdgeHardDelete(ctx, work, backend) {
|
|
|
291
293
|
kind: work.kind
|
|
292
294
|
});
|
|
293
295
|
if (work.holdsCardinalityClaim) {
|
|
294
|
-
await
|
|
296
|
+
await chunkFMMW3KX7_cjs.purgeEdgeClaims(backend, ctx.claimsVerdict(), ctx.graphId, [work.id]);
|
|
295
297
|
}
|
|
296
298
|
}
|
|
297
299
|
|
|
@@ -358,45 +360,55 @@ function edgeBatchClaims(work) {
|
|
|
358
360
|
return work.flatMap((item) => item.claim === void 0 ? [] : [item.claim]);
|
|
359
361
|
}
|
|
360
362
|
function createWriteSession(ctx, target, lock) {
|
|
361
|
-
const writeContext =
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
363
|
+
const writeContext = chunk2CVDZCXH_cjs.createNodeWriteContext(
|
|
364
|
+
ctx.graphId,
|
|
365
|
+
ctx.registry,
|
|
366
|
+
lock,
|
|
367
|
+
ctx.claimsVerdict,
|
|
368
|
+
ctx.uniqueSidecarBatch
|
|
369
|
+
);
|
|
370
|
+
const dispatch = chunkJQKMEKKW_cjs.nodeInsertDispatch(target);
|
|
371
|
+
const edgeContext = createEdgeWriteContext(
|
|
372
|
+
ctx.graphId,
|
|
373
|
+
lock,
|
|
374
|
+
ctx.claimsVerdict
|
|
375
|
+
);
|
|
376
|
+
const edgeDispatch = chunkJQKMEKKW_cjs.edgeInsertDispatch(target);
|
|
365
377
|
return {
|
|
366
378
|
// The pinned coordination order, spelled once per insert shape:
|
|
367
379
|
// pre-insert claims, the row, post-insert claims, the sync fans. The claim
|
|
368
380
|
// seam owns the two groups and the compensation between them; this surface
|
|
369
381
|
// owns only "the row write it gates is THIS one".
|
|
370
382
|
createNode: async (work) => {
|
|
371
|
-
const row = await
|
|
383
|
+
const row = await chunk2CVDZCXH_cjs.withNodeCreateClaims(
|
|
372
384
|
writeContext,
|
|
373
385
|
work.claim,
|
|
374
386
|
target,
|
|
375
387
|
() => dispatch.one(work.params)
|
|
376
388
|
);
|
|
377
|
-
await
|
|
389
|
+
await chunk2CVDZCXH_cjs.applyNodeInsertSyncFans(writeContext, work.sideEffects, target);
|
|
378
390
|
return row;
|
|
379
391
|
},
|
|
380
392
|
createNodeNoReturn: async (work) => {
|
|
381
|
-
await
|
|
393
|
+
await chunk2CVDZCXH_cjs.withNodeCreateClaims(
|
|
382
394
|
writeContext,
|
|
383
395
|
work.claim,
|
|
384
396
|
target,
|
|
385
|
-
() =>
|
|
397
|
+
() => chunkJQKMEKKW_cjs.runInsertNoReturn(dispatch, work.params)
|
|
386
398
|
);
|
|
387
|
-
await
|
|
399
|
+
await chunk2CVDZCXH_cjs.applyNodeInsertSyncFans(writeContext, work.sideEffects, target);
|
|
388
400
|
},
|
|
389
401
|
createNodes: async (work) => {
|
|
390
|
-
const rows = await
|
|
402
|
+
const rows = await chunk2CVDZCXH_cjs.withNodeCreateClaimsBatch(
|
|
391
403
|
writeContext,
|
|
392
404
|
work.map((item) => item.claim),
|
|
393
405
|
target,
|
|
394
|
-
() =>
|
|
406
|
+
() => chunkJQKMEKKW_cjs.runInsertBatchReturning(
|
|
395
407
|
dispatch,
|
|
396
408
|
work.map((item) => item.params)
|
|
397
409
|
)
|
|
398
410
|
);
|
|
399
|
-
await
|
|
411
|
+
await chunk2CVDZCXH_cjs.applyNodeInsertSyncFansBatch(
|
|
400
412
|
writeContext,
|
|
401
413
|
work.map((item) => item.sideEffects),
|
|
402
414
|
target
|
|
@@ -404,16 +416,16 @@ function createWriteSession(ctx, target, lock) {
|
|
|
404
416
|
return rows;
|
|
405
417
|
},
|
|
406
418
|
createNodesNoReturn: async (work) => {
|
|
407
|
-
await
|
|
419
|
+
await chunk2CVDZCXH_cjs.withNodeCreateClaimsBatch(
|
|
408
420
|
writeContext,
|
|
409
421
|
work.map((item) => item.claim),
|
|
410
422
|
target,
|
|
411
|
-
() =>
|
|
423
|
+
() => chunkJQKMEKKW_cjs.runInsertBatch(
|
|
412
424
|
dispatch,
|
|
413
425
|
work.map((item) => item.params)
|
|
414
426
|
)
|
|
415
427
|
);
|
|
416
|
-
await
|
|
428
|
+
await chunk2CVDZCXH_cjs.applyNodeInsertSyncFansBatch(
|
|
417
429
|
writeContext,
|
|
418
430
|
work.map((item) => item.sideEffects),
|
|
419
431
|
target
|
|
@@ -422,18 +434,18 @@ function createWriteSession(ctx, target, lock) {
|
|
|
422
434
|
reviseNode: (work, fences) => {
|
|
423
435
|
const draft = createWriteParamsDraft();
|
|
424
436
|
applyWriteFences(NODE_UPDATE_FENCE_APPLIERS, fences, draft);
|
|
425
|
-
return
|
|
437
|
+
return chunk2CVDZCXH_cjs.applyNodeUpdate(writeContext, { ...work, ...draft }, target);
|
|
426
438
|
},
|
|
427
|
-
retireNode: (work, policy) =>
|
|
428
|
-
purgeNode: (work) =>
|
|
429
|
-
reviveNode: (work) =>
|
|
439
|
+
retireNode: (work, policy) => chunk2CVDZCXH_cjs.applyNodeSoftDelete(writeContext, work, target, policy),
|
|
440
|
+
purgeNode: (work) => chunk2CVDZCXH_cjs.applyNodeHardDelete(writeContext, work, target),
|
|
441
|
+
reviveNode: (work) => chunk2CVDZCXH_cjs.applyNodeResurrect(writeContext, work, target),
|
|
430
442
|
reviseNodeSet: (work, fences) => {
|
|
431
443
|
applyWriteFences(
|
|
432
444
|
NODE_SET_UPDATE_FENCE_APPLIERS,
|
|
433
445
|
fences,
|
|
434
446
|
createWriteParamsDraft()
|
|
435
447
|
);
|
|
436
|
-
return
|
|
448
|
+
return chunk2CVDZCXH_cjs.applyNodeSetUpdate(writeContext, work, target);
|
|
437
449
|
},
|
|
438
450
|
// An edge write obliges no DERIVED data, so these apply no sync fans — but a
|
|
439
451
|
// constrained kind owes its cardinality claim, at the same PRE-INSERT
|
|
@@ -444,26 +456,34 @@ function createWriteSession(ctx, target, lock) {
|
|
|
444
456
|
// in the same order.
|
|
445
457
|
createEdge: async (work) => {
|
|
446
458
|
if (work.claim !== void 0) {
|
|
447
|
-
await
|
|
459
|
+
await chunkFMMW3KX7_cjs.claimEdgeCardinality(target, ctx.claimsVerdict(), work.claim);
|
|
448
460
|
}
|
|
449
461
|
return edgeDispatch.one(work.params);
|
|
450
462
|
},
|
|
451
463
|
createEdgeNoReturn: async (work) => {
|
|
452
464
|
if (work.claim !== void 0) {
|
|
453
|
-
await
|
|
465
|
+
await chunkFMMW3KX7_cjs.claimEdgeCardinality(target, ctx.claimsVerdict(), work.claim);
|
|
454
466
|
}
|
|
455
|
-
await
|
|
467
|
+
await chunkJQKMEKKW_cjs.runInsertNoReturn(edgeDispatch, work.params);
|
|
456
468
|
},
|
|
457
469
|
createEdges: async (work) => {
|
|
458
|
-
await
|
|
459
|
-
|
|
470
|
+
await chunkFMMW3KX7_cjs.claimEdgeCardinalityBatch(
|
|
471
|
+
target,
|
|
472
|
+
ctx.claimsVerdict(),
|
|
473
|
+
edgeBatchClaims(work)
|
|
474
|
+
);
|
|
475
|
+
return chunkJQKMEKKW_cjs.runInsertBatchReturning(
|
|
460
476
|
edgeDispatch,
|
|
461
477
|
work.map((item) => item.params)
|
|
462
478
|
);
|
|
463
479
|
},
|
|
464
480
|
createEdgesNoReturn: async (work) => {
|
|
465
|
-
await
|
|
466
|
-
|
|
481
|
+
await chunkFMMW3KX7_cjs.claimEdgeCardinalityBatch(
|
|
482
|
+
target,
|
|
483
|
+
ctx.claimsVerdict(),
|
|
484
|
+
edgeBatchClaims(work)
|
|
485
|
+
);
|
|
486
|
+
await chunkJQKMEKKW_cjs.runInsertBatch(
|
|
467
487
|
edgeDispatch,
|
|
468
488
|
work.map((item) => item.params)
|
|
469
489
|
);
|
|
@@ -489,7 +509,7 @@ function planFrame(ctx, plan, rowWork) {
|
|
|
489
509
|
await acquireIdentityLock(target);
|
|
490
510
|
}
|
|
491
511
|
const mintSessionOver = (sessionTarget) => createWriteSession(ctx, sessionTarget, lock);
|
|
492
|
-
const mintOverlaidSession = (reads) => mintSessionOver(
|
|
512
|
+
const mintOverlaidSession = (reads) => mintSessionOver(chunkNLX5OWK7_cjs.deriveBackend(target, reads));
|
|
493
513
|
return rowWork(
|
|
494
514
|
mintSessionOver(target),
|
|
495
515
|
target,
|
|
@@ -501,7 +521,7 @@ function planTransactionOptions(plan, options) {
|
|
|
501
521
|
return { ...options, fencesConstraintProbe: plan.constraintProbe };
|
|
502
522
|
}
|
|
503
523
|
function runWritePlan(ctx, plan, backend, rowWork, options) {
|
|
504
|
-
return
|
|
524
|
+
return chunkJQKMEKKW_cjs.runInWriteTransaction(
|
|
505
525
|
ctx,
|
|
506
526
|
backend,
|
|
507
527
|
planFrame(ctx, plan, rowWork),
|
|
@@ -509,7 +529,7 @@ function runWritePlan(ctx, plan, backend, rowWork, options) {
|
|
|
509
529
|
);
|
|
510
530
|
}
|
|
511
531
|
function runHookedWritePlan(ctx, opContext, plan, backend, rowWork, options) {
|
|
512
|
-
return
|
|
532
|
+
return chunkJQKMEKKW_cjs.runHookedWriteOperation(
|
|
513
533
|
ctx,
|
|
514
534
|
opContext,
|
|
515
535
|
backend,
|
|
@@ -662,10 +682,10 @@ function nodeRequiresIdentityLock(ctx) {
|
|
|
662
682
|
return ctx.identity !== void 0;
|
|
663
683
|
}
|
|
664
684
|
function buildNodeCacheKey(graphId, kind, id) {
|
|
665
|
-
return
|
|
685
|
+
return chunkCRZ56SZU_cjs.encodeTupleKey([graphId, kind, id]);
|
|
666
686
|
}
|
|
667
687
|
function buildUniqueCacheKey(graphId, nodeKind, constraintName, key) {
|
|
668
|
-
return
|
|
688
|
+
return chunkCRZ56SZU_cjs.encodeTupleKey([graphId, nodeKind, constraintName, key]);
|
|
669
689
|
}
|
|
670
690
|
function buildInsertNodeParams(graphId, kind, id, props, validFrom, validTo) {
|
|
671
691
|
const insertParams = {
|
|
@@ -756,7 +776,7 @@ function createNodeBatchValidationSeams(graphId, registry, backend) {
|
|
|
756
776
|
});
|
|
757
777
|
}
|
|
758
778
|
function registerPendingUniqueEntries(kind, id, props, constraints) {
|
|
759
|
-
for (const entry of
|
|
779
|
+
for (const entry of chunk2CVDZCXH_cjs.nodeClaimEntries(
|
|
760
780
|
registry,
|
|
761
781
|
kind,
|
|
762
782
|
id,
|
|
@@ -778,12 +798,12 @@ function createNodeBatchValidationSeams(graphId, registry, backend) {
|
|
|
778
798
|
function registerAppliedNodeUpdate(kind, id, oldProps, newProps, constraints) {
|
|
779
799
|
const owner = { concreteKind: kind, nodeId: id };
|
|
780
800
|
const oldEntries = new Map(
|
|
781
|
-
|
|
801
|
+
chunk2CVDZCXH_cjs.nodeClaimEntries(registry, kind, id, oldProps, constraints, "update").map(
|
|
782
802
|
(entry) => [entry.constraintName, entry]
|
|
783
803
|
)
|
|
784
804
|
);
|
|
785
805
|
const newEntries = new Map(
|
|
786
|
-
|
|
806
|
+
chunk2CVDZCXH_cjs.nodeClaimEntries(registry, kind, id, newProps, constraints, "update").map(
|
|
787
807
|
(entry) => [entry.constraintName, entry]
|
|
788
808
|
)
|
|
789
809
|
);
|
|
@@ -791,7 +811,7 @@ function createNodeBatchValidationSeams(graphId, registry, backend) {
|
|
|
791
811
|
const oldEntry = oldEntries.get(constraint.name);
|
|
792
812
|
const newEntry = newEntries.get(constraint.name);
|
|
793
813
|
if (oldEntry?.key === newEntry?.key) continue;
|
|
794
|
-
const kindsToCheck =
|
|
814
|
+
const kindsToCheck = chunkCRZ56SZU_cjs.uniquenessProbeKinds(
|
|
795
815
|
kind,
|
|
796
816
|
constraint.scope,
|
|
797
817
|
registry
|
|
@@ -842,7 +862,7 @@ function createNodeBatchValidationSeams(graphId, registry, backend) {
|
|
|
842
862
|
};
|
|
843
863
|
return {
|
|
844
864
|
reads,
|
|
845
|
-
reader:
|
|
865
|
+
reader: chunkNLX5OWK7_cjs.deriveBackend(backend, reads),
|
|
846
866
|
registerPendingNode,
|
|
847
867
|
registerPendingUniqueEntries,
|
|
848
868
|
registerAppliedNodeUpdate,
|
|
@@ -854,7 +874,7 @@ function draftNodeCreate(ctx, input, id, options) {
|
|
|
854
874
|
const kind = input.kind;
|
|
855
875
|
const registration = getNodeRegistration(ctx.graph, kind);
|
|
856
876
|
const nodeKind = registration.type;
|
|
857
|
-
const validatedProps = options?.propsPreValidated === true ? input.props :
|
|
877
|
+
const validatedProps = options?.propsPreValidated === true ? input.props : chunkJQKMEKKW_cjs.validateNodeProps(nodeKind.schema, input.props, {
|
|
858
878
|
kind,
|
|
859
879
|
operation: "create"
|
|
860
880
|
});
|
|
@@ -887,8 +907,13 @@ async function finishNodeCreatePreparation(ctx, draft, backend) {
|
|
|
887
907
|
backend
|
|
888
908
|
};
|
|
889
909
|
await checkDisjointnessConstraint(constraintContext, kind, id);
|
|
890
|
-
await
|
|
891
|
-
|
|
910
|
+
await chunk2CVDZCXH_cjs.checkUniquenessConstraints(
|
|
911
|
+
chunk2CVDZCXH_cjs.createUniquenessContext(
|
|
912
|
+
ctx.graphId,
|
|
913
|
+
ctx.registry,
|
|
914
|
+
backend,
|
|
915
|
+
ctx.uniqueSidecarBatch
|
|
916
|
+
),
|
|
892
917
|
kind,
|
|
893
918
|
id,
|
|
894
919
|
validatedProps,
|
|
@@ -948,7 +973,7 @@ function foldReferences(preparedCreates) {
|
|
|
948
973
|
}
|
|
949
974
|
function computeNodeUpdate(ctx, kind, id, existingProps, inputProps) {
|
|
950
975
|
const registration = getNodeRegistration(ctx.graph, kind);
|
|
951
|
-
const validatedProps =
|
|
976
|
+
const validatedProps = chunkJQKMEKKW_cjs.validateNodeProps(
|
|
952
977
|
registration.type.schema,
|
|
953
978
|
{ ...existingProps, ...inputProps },
|
|
954
979
|
{ kind, operation: "update", id }
|
|
@@ -956,7 +981,7 @@ function computeNodeUpdate(ctx, kind, id, existingProps, inputProps) {
|
|
|
956
981
|
return { registration, validatedProps };
|
|
957
982
|
}
|
|
958
983
|
function resolveNodeUpdateProps(ctx, existing, inputProps) {
|
|
959
|
-
const existingProps =
|
|
984
|
+
const existingProps = chunkNUQ2YFFH_cjs.rowPropsToObject(existing.props);
|
|
960
985
|
const { registration, validatedProps } = computeNodeUpdate(
|
|
961
986
|
ctx,
|
|
962
987
|
existing.kind,
|
|
@@ -976,7 +1001,7 @@ function nodeUpsertDirtyCheck(ctx, kind, id, existingProps, inputProps) {
|
|
|
976
1001
|
);
|
|
977
1002
|
return {
|
|
978
1003
|
validatedProps,
|
|
979
|
-
unchanged:
|
|
1004
|
+
unchanged: chunkNLX5OWK7_cjs.canonicalEqual(validatedProps, existingProps)
|
|
980
1005
|
};
|
|
981
1006
|
}
|
|
982
1007
|
async function performNodeUpdate(ctx, input, session, target, options) {
|
|
@@ -1032,7 +1057,7 @@ async function performNodeUpdate(ctx, input, session, target, options) {
|
|
|
1032
1057
|
);
|
|
1033
1058
|
return rowToNode(row2);
|
|
1034
1059
|
}
|
|
1035
|
-
if (!
|
|
1060
|
+
if (!chunkNUQ2YFFH_cjs.isLiveNodeRow(existing)) throw new chunkX4GDXBOP_cjs.NodeNotFoundError(kind, id);
|
|
1036
1061
|
const row = await session.reviseNode(
|
|
1037
1062
|
// An in-place update must not rewrite the stored bound, so it keeps the
|
|
1038
1063
|
// conditional spread: `buildUpdateNode` ignores `validFrom` off the
|
|
@@ -1079,7 +1104,12 @@ function nodeUpdateRaceError(input, error) {
|
|
|
1079
1104
|
);
|
|
1080
1105
|
}
|
|
1081
1106
|
async function primeBatchValidationCaches(ctx, drafts, backend, seams) {
|
|
1082
|
-
|
|
1107
|
+
const boundGetNodes = chunkNUQ2YFFH_cjs.bindExtraIfReachable(
|
|
1108
|
+
backend,
|
|
1109
|
+
ctx.batchPointRead.extras.getNodes,
|
|
1110
|
+
chunkNUQ2YFFH_cjs.BATCH_POINT_READ.id
|
|
1111
|
+
);
|
|
1112
|
+
if (boundGetNodes !== void 0) {
|
|
1083
1113
|
const idsByKind = /* @__PURE__ */ new Map();
|
|
1084
1114
|
for (const draft of drafts) {
|
|
1085
1115
|
const ids = idsByKind.get(draft.kind) ?? /* @__PURE__ */ new Set();
|
|
@@ -1088,17 +1118,22 @@ async function primeBatchValidationCaches(ctx, drafts, backend, seams) {
|
|
|
1088
1118
|
}
|
|
1089
1119
|
for (const [kind, ids] of idsByKind) {
|
|
1090
1120
|
const orderedIds = [...ids];
|
|
1091
|
-
const rows = await
|
|
1121
|
+
const rows = await boundGetNodes.getNodes(ctx.graphId, kind, orderedIds);
|
|
1092
1122
|
const rowsById = new Map(rows.map((row) => [row.id, row]));
|
|
1093
1123
|
for (const id of orderedIds) {
|
|
1094
1124
|
seams.seedNodeRow(kind, id, rowsById.get(id));
|
|
1095
1125
|
}
|
|
1096
1126
|
}
|
|
1097
1127
|
}
|
|
1098
|
-
|
|
1128
|
+
const boundCheckUniqueBatch = chunkNUQ2YFFH_cjs.bindExtraIfReachable(
|
|
1129
|
+
backend,
|
|
1130
|
+
ctx.uniqueSidecarBatch.extras.checkUniqueBatch,
|
|
1131
|
+
chunkNUQ2YFFH_cjs.UNIQUE_SIDECAR_BATCH.id
|
|
1132
|
+
);
|
|
1133
|
+
if (boundCheckUniqueBatch !== void 0) {
|
|
1099
1134
|
const groups = /* @__PURE__ */ new Map();
|
|
1100
1135
|
for (const draft of drafts) {
|
|
1101
|
-
for (const entry of
|
|
1136
|
+
for (const entry of chunk2CVDZCXH_cjs.nodeClaimEntries(
|
|
1102
1137
|
ctx.registry,
|
|
1103
1138
|
draft.kind,
|
|
1104
1139
|
draft.id,
|
|
@@ -1109,13 +1144,13 @@ async function primeBatchValidationCaches(ctx, drafts, backend, seams) {
|
|
|
1109
1144
|
if (entry.refusal.kind !== "uniqueness") continue;
|
|
1110
1145
|
const constraint = entry.refusal.constraint;
|
|
1111
1146
|
const key = entry.key;
|
|
1112
|
-
const kindsToCheck =
|
|
1147
|
+
const kindsToCheck = chunkCRZ56SZU_cjs.uniquenessProbeKinds(
|
|
1113
1148
|
draft.kind,
|
|
1114
1149
|
constraint.scope,
|
|
1115
1150
|
ctx.registry
|
|
1116
1151
|
);
|
|
1117
1152
|
for (const kindToCheck of kindsToCheck) {
|
|
1118
|
-
const groupKey =
|
|
1153
|
+
const groupKey = chunkCRZ56SZU_cjs.encodeTupleKey([kindToCheck, constraint.name]);
|
|
1119
1154
|
const group = groups.get(groupKey) ?? {
|
|
1120
1155
|
nodeKind: kindToCheck,
|
|
1121
1156
|
constraintName: constraint.name,
|
|
@@ -1128,7 +1163,7 @@ async function primeBatchValidationCaches(ctx, drafts, backend, seams) {
|
|
|
1128
1163
|
}
|
|
1129
1164
|
for (const group of groups.values()) {
|
|
1130
1165
|
const orderedKeys = [...group.keys];
|
|
1131
|
-
const rows = await
|
|
1166
|
+
const rows = await boundCheckUniqueBatch.checkUniqueBatch({
|
|
1132
1167
|
graphId: ctx.graphId,
|
|
1133
1168
|
nodeKind: group.nodeKind,
|
|
1134
1169
|
constraintName: group.constraintName,
|
|
@@ -1155,7 +1190,7 @@ async function prepareBatchCreates(ctx, inputs, backend, options) {
|
|
|
1155
1190
|
seedUniqueRow
|
|
1156
1191
|
} = createNodeBatchValidationSeams(ctx.graphId, ctx.registry, backend);
|
|
1157
1192
|
const drafts = inputs.map(
|
|
1158
|
-
(input) => draftNodeCreate(ctx, input, input.id ??
|
|
1193
|
+
(input) => draftNodeCreate(ctx, input, input.id ?? chunkJQKMEKKW_cjs.generateId(), options)
|
|
1159
1194
|
);
|
|
1160
1195
|
await primeBatchValidationCaches(ctx, drafts, backend, {
|
|
1161
1196
|
seedNodeRow,
|
|
@@ -1265,10 +1300,15 @@ async function findUniqueRowAcrossKinds(backend, graphId, constraintName, key, k
|
|
|
1265
1300
|
}
|
|
1266
1301
|
return preferred;
|
|
1267
1302
|
}
|
|
1268
|
-
async function batchCheckUniqueAcrossKinds(backend, graphId, constraintName, uniqueKeys, kindsToCheck, includeDeleted) {
|
|
1303
|
+
async function batchCheckUniqueAcrossKinds(backend, uniqueSidecarBatch, graphId, constraintName, uniqueKeys, kindsToCheck, includeDeleted) {
|
|
1269
1304
|
const existingByKey = /* @__PURE__ */ new Map();
|
|
1305
|
+
const boundCheckUniqueBatch = chunkNUQ2YFFH_cjs.bindExtraIfReachable(
|
|
1306
|
+
backend,
|
|
1307
|
+
uniqueSidecarBatch.extras.checkUniqueBatch,
|
|
1308
|
+
chunkNUQ2YFFH_cjs.UNIQUE_SIDECAR_BATCH.id
|
|
1309
|
+
);
|
|
1270
1310
|
for (const kindToCheck of kindsToCheck) {
|
|
1271
|
-
if (
|
|
1311
|
+
if (boundCheckUniqueBatch === void 0) {
|
|
1272
1312
|
for (const key of uniqueKeys) {
|
|
1273
1313
|
const incumbent = existingByKey.get(key);
|
|
1274
1314
|
if (incumbent !== void 0 && incumbent.deleted_at === void 0) {
|
|
@@ -1286,7 +1326,7 @@ async function batchCheckUniqueAcrossKinds(backend, graphId, constraintName, uni
|
|
|
1286
1326
|
}
|
|
1287
1327
|
}
|
|
1288
1328
|
} else {
|
|
1289
|
-
const rows = await
|
|
1329
|
+
const rows = await boundCheckUniqueBatch.checkUniqueBatch({
|
|
1290
1330
|
graphId,
|
|
1291
1331
|
nodeKind: kindToCheck,
|
|
1292
1332
|
constraintName,
|
|
@@ -1304,7 +1344,7 @@ async function batchCheckUniqueAcrossKinds(backend, graphId, constraintName, uni
|
|
|
1304
1344
|
}
|
|
1305
1345
|
async function executeNodeCreateInternal(ctx, input, backend, options) {
|
|
1306
1346
|
const kind = input.kind;
|
|
1307
|
-
const id = input.id ??
|
|
1347
|
+
const id = input.id ?? chunkJQKMEKKW_cjs.generateId();
|
|
1308
1348
|
const opContext = ctx.createOperationContext("create", "node", kind, id);
|
|
1309
1349
|
const shouldReturnRow = options?.returnRow ?? true;
|
|
1310
1350
|
return runHookedWritePlan(
|
|
@@ -1424,13 +1464,13 @@ async function executeNodeCreateBatch(ctx, inputs, backend, options) {
|
|
|
1424
1464
|
}
|
|
1425
1465
|
const byReference = new Map(
|
|
1426
1466
|
[...inserted, ...resurrected].map((row) => [
|
|
1427
|
-
|
|
1467
|
+
chunkL6EVYIID_cjs.refKey({ kind: row.kind, id: row.id }),
|
|
1428
1468
|
row
|
|
1429
1469
|
])
|
|
1430
1470
|
);
|
|
1431
1471
|
const rows = preparedCreates.map(
|
|
1432
1472
|
(prepared) => chunkN66HCGCY_cjs.requireDefined(
|
|
1433
|
-
byReference.get(
|
|
1473
|
+
byReference.get(chunkL6EVYIID_cjs.refKey({ kind: prepared.kind, id: prepared.id })),
|
|
1434
1474
|
`Missing written row for ${prepared.kind} ${prepared.id}`
|
|
1435
1475
|
)
|
|
1436
1476
|
);
|
|
@@ -1534,7 +1574,7 @@ async function executeNodeUpdateWhere(ctx, kind, inputPatch, candidateIds, candi
|
|
|
1534
1574
|
}
|
|
1535
1575
|
);
|
|
1536
1576
|
}
|
|
1537
|
-
const parsedPatch =
|
|
1577
|
+
const parsedPatch = chunkJQKMEKKW_cjs.validateNodeProps(schema.partial(), inputPatch, {
|
|
1538
1578
|
kind,
|
|
1539
1579
|
operation: "update"
|
|
1540
1580
|
});
|
|
@@ -1561,7 +1601,11 @@ async function executeNodeUpdateWhere(ctx, kind, inputPatch, candidateIds, candi
|
|
|
1561
1601
|
}
|
|
1562
1602
|
);
|
|
1563
1603
|
}
|
|
1564
|
-
if (uniqueConstraints.length > 0 && (
|
|
1604
|
+
if (uniqueConstraints.length > 0 && chunkZGVTNKTX_cjs.missingRequiredExtras(
|
|
1605
|
+
chunkNUQ2YFFH_cjs.UNIQUE_SIDECAR_BATCH,
|
|
1606
|
+
ctx.uniqueSidecarBatch,
|
|
1607
|
+
"set-based node update"
|
|
1608
|
+
).length > 0) {
|
|
1565
1609
|
throw new chunkX4GDXBOP_cjs.ConfigurationError(
|
|
1566
1610
|
"updateWhere() requires batched uniqueness sidecar operations for constrained nodes",
|
|
1567
1611
|
{ code: "SET_UPDATE_UNIQUENESS_UNSUPPORTED", kind }
|
|
@@ -1573,7 +1617,7 @@ async function executeNodeUpdateWhere(ctx, kind, inputPatch, candidateIds, candi
|
|
|
1573
1617
|
{ code: "SET_UPDATE_FULLTEXT_UNSUPPORTED", kind }
|
|
1574
1618
|
);
|
|
1575
1619
|
}
|
|
1576
|
-
if (
|
|
1620
|
+
if (chunk2CVDZCXH_cjs.getEmbeddingFields(schema).length > 0 && (backend.upsertEmbedding === void 0 || backend.deleteEmbedding === void 0 || backend.upsertEmbeddingBatch === void 0 || backend.deleteEmbeddingBatch === void 0)) {
|
|
1577
1621
|
throw new chunkX4GDXBOP_cjs.ConfigurationError(
|
|
1578
1622
|
"updateWhere() requires batched vector sidecar operations for embedded nodes",
|
|
1579
1623
|
{ code: "SET_UPDATE_VECTOR_UNSUPPORTED", kind }
|
|
@@ -1667,7 +1711,7 @@ async function executeNodeDelete(ctx, kind, id, backend) {
|
|
|
1667
1711
|
const identity = ctx.identity;
|
|
1668
1712
|
const registration = getNodeRegistration(ctx.graph, kind);
|
|
1669
1713
|
const preflight = await target.getNode(ctx.graphId, kind, id);
|
|
1670
|
-
if (!preflight || !
|
|
1714
|
+
if (!preflight || !chunkNUQ2YFFH_cjs.isLiveNodeRow(preflight)) return;
|
|
1671
1715
|
await session.retireNode({
|
|
1672
1716
|
existing: preflight,
|
|
1673
1717
|
schema: registration.type.schema,
|
|
@@ -1691,7 +1735,7 @@ async function executeNodeDeleteBatch(ctx, kind, ids, backend) {
|
|
|
1691
1735
|
let affectedCount = 0;
|
|
1692
1736
|
for (const id of ids) {
|
|
1693
1737
|
const preflight = await target.getNode(ctx.graphId, kind, id);
|
|
1694
|
-
if (!preflight || !
|
|
1738
|
+
if (!preflight || !chunkNUQ2YFFH_cjs.isLiveNodeRow(preflight)) continue;
|
|
1695
1739
|
await session.retireNode({
|
|
1696
1740
|
existing: preflight,
|
|
1697
1741
|
schema: registration.type.schema,
|
|
@@ -1736,12 +1780,12 @@ async function executeNodeGetOrCreateByConstraint(ctx, kind, constraintName, pro
|
|
|
1736
1780
|
const ifExists = options?.ifExists ?? "return";
|
|
1737
1781
|
const registration = getNodeRegistration(ctx.graph, kind);
|
|
1738
1782
|
const nodeKind = registration.type;
|
|
1739
|
-
const validatedProps =
|
|
1783
|
+
const validatedProps = chunkJQKMEKKW_cjs.validateNodeProps(nodeKind.schema, props, {
|
|
1740
1784
|
kind,
|
|
1741
1785
|
operation: "create"
|
|
1742
1786
|
});
|
|
1743
1787
|
const constraint = resolveConstraint(ctx.graph, kind, constraintName);
|
|
1744
|
-
if (!
|
|
1788
|
+
if (!chunkCRZ56SZU_cjs.checkWherePredicate(constraint, validatedProps)) {
|
|
1745
1789
|
const node = await executeNodeCreate(
|
|
1746
1790
|
ctx,
|
|
1747
1791
|
{ kind, props: validatedProps },
|
|
@@ -1750,12 +1794,12 @@ async function executeNodeGetOrCreateByConstraint(ctx, kind, constraintName, pro
|
|
|
1750
1794
|
);
|
|
1751
1795
|
return { node, action: "created" };
|
|
1752
1796
|
}
|
|
1753
|
-
const key =
|
|
1797
|
+
const key = chunkCRZ56SZU_cjs.computeUniqueKey(
|
|
1754
1798
|
validatedProps,
|
|
1755
1799
|
constraint.fields,
|
|
1756
1800
|
constraint.collation
|
|
1757
1801
|
);
|
|
1758
|
-
const kindsToCheck =
|
|
1802
|
+
const kindsToCheck = chunkCRZ56SZU_cjs.uniquenessProbeKinds(
|
|
1759
1803
|
kind,
|
|
1760
1804
|
constraint.scope,
|
|
1761
1805
|
ctx.registry
|
|
@@ -1819,18 +1863,18 @@ async function executeNodeGetOrCreateByConstraint(ctx, kind, constraintName, pro
|
|
|
1819
1863
|
async function executeNodeFindByConstraint(ctx, kind, constraintName, props, backend) {
|
|
1820
1864
|
const registration = getNodeRegistration(ctx.graph, kind);
|
|
1821
1865
|
const nodeKind = registration.type;
|
|
1822
|
-
const validatedProps =
|
|
1866
|
+
const validatedProps = chunkJQKMEKKW_cjs.validateNodeProps(nodeKind.schema, props, {
|
|
1823
1867
|
kind,
|
|
1824
1868
|
operation: "create"
|
|
1825
1869
|
});
|
|
1826
1870
|
const constraint = resolveConstraint(ctx.graph, kind, constraintName);
|
|
1827
|
-
if (!
|
|
1828
|
-
const key =
|
|
1871
|
+
if (!chunkCRZ56SZU_cjs.checkWherePredicate(constraint, validatedProps)) return void 0;
|
|
1872
|
+
const key = chunkCRZ56SZU_cjs.computeUniqueKey(
|
|
1829
1873
|
validatedProps,
|
|
1830
1874
|
constraint.fields,
|
|
1831
1875
|
constraint.collation
|
|
1832
1876
|
);
|
|
1833
|
-
const kindsToCheck =
|
|
1877
|
+
const kindsToCheck = chunkCRZ56SZU_cjs.uniquenessProbeKinds(
|
|
1834
1878
|
kind,
|
|
1835
1879
|
constraint.scope,
|
|
1836
1880
|
ctx.registry
|
|
@@ -1856,12 +1900,12 @@ async function executeNodeFindByConstraint(ctx, kind, constraintName, props, bac
|
|
|
1856
1900
|
function validateAndComputeKeys(nodeKind, kind, constraint, items) {
|
|
1857
1901
|
const validated = [];
|
|
1858
1902
|
for (const item of items) {
|
|
1859
|
-
const validatedProps =
|
|
1903
|
+
const validatedProps = chunkJQKMEKKW_cjs.validateNodeProps(nodeKind.schema, item.props, {
|
|
1860
1904
|
kind,
|
|
1861
1905
|
operation: "create"
|
|
1862
1906
|
});
|
|
1863
|
-
const applies =
|
|
1864
|
-
const key = applies ?
|
|
1907
|
+
const applies = chunkCRZ56SZU_cjs.checkWherePredicate(constraint, validatedProps);
|
|
1908
|
+
const key = applies ? chunkCRZ56SZU_cjs.computeUniqueKey(
|
|
1865
1909
|
validatedProps,
|
|
1866
1910
|
constraint.fields,
|
|
1867
1911
|
constraint.collation
|
|
@@ -1884,13 +1928,14 @@ async function executeNodeBulkFindByConstraint(ctx, kind, constraintName, items,
|
|
|
1884
1928
|
const constraint = resolveConstraint(ctx.graph, kind, constraintName);
|
|
1885
1929
|
const validated = validateAndComputeKeys(nodeKind, kind, constraint, items);
|
|
1886
1930
|
const uniqueKeys = collectUniqueKeys(validated);
|
|
1887
|
-
const kindsToCheck =
|
|
1931
|
+
const kindsToCheck = chunkCRZ56SZU_cjs.uniquenessProbeKinds(
|
|
1888
1932
|
kind,
|
|
1889
1933
|
constraint.scope,
|
|
1890
1934
|
ctx.registry
|
|
1891
1935
|
);
|
|
1892
1936
|
const existingByKey = uniqueKeys.length > 0 ? await batchCheckUniqueAcrossKinds(
|
|
1893
1937
|
backend,
|
|
1938
|
+
ctx.uniqueSidecarBatch,
|
|
1894
1939
|
ctx.graphId,
|
|
1895
1940
|
constraint.name,
|
|
1896
1941
|
uniqueKeys,
|
|
@@ -2043,7 +2088,7 @@ async function executeNodeBulkFindByIndex(ctx, kind, indexName, items, backend,
|
|
|
2043
2088
|
}
|
|
2044
2089
|
);
|
|
2045
2090
|
}
|
|
2046
|
-
const adapter =
|
|
2091
|
+
const adapter = chunkJVA3KDEA_cjs.getDialect(backend.dialect);
|
|
2047
2092
|
const probes = items.map(
|
|
2048
2093
|
(item) => index.fields.map((pointer, position) => {
|
|
2049
2094
|
const value = chunkA7J2YDDI_cjs.resolveJsonPointer(item.props, pointer);
|
|
@@ -2070,51 +2115,52 @@ async function executeNodeBulkFindByIndex(ctx, kind, indexName, items, backend,
|
|
|
2070
2115
|
}
|
|
2071
2116
|
groupToInputs[existing]?.push(inputIndex);
|
|
2072
2117
|
}
|
|
2073
|
-
const schema = backend.tableNames ?
|
|
2118
|
+
const schema = backend.tableNames ? chunkNUQ2YFFH_cjs.createSqlSchema(backend.tableNames) : chunkNUQ2YFFH_cjs.DEFAULT_SQL_SCHEMA;
|
|
2074
2119
|
const compileContext = {
|
|
2075
2120
|
dialect: backend.dialect,
|
|
2076
|
-
propsColumn:
|
|
2077
|
-
systemColumn: (column) =>
|
|
2121
|
+
propsColumn: chunkH5IJSROF_cjs.sql.raw(`"props"`),
|
|
2122
|
+
systemColumn: (column) => chunkH5IJSROF_cjs.sql.raw(`"${column}"`)
|
|
2078
2123
|
};
|
|
2079
|
-
const fieldKeys =
|
|
2124
|
+
const fieldKeys = chunkJVA3KDEA_cjs.compileNodeIndexFieldKeys(index, compileContext);
|
|
2080
2125
|
const groupPredicates = groupProbes.map(
|
|
2081
|
-
(probe) =>
|
|
2126
|
+
(probe) => chunkH5IJSROF_cjs.sql`(${chunkH5IJSROF_cjs.sql.join(
|
|
2082
2127
|
fieldKeys.map((fieldKey, position) => {
|
|
2083
2128
|
const value = probe[position];
|
|
2084
2129
|
if (value === void 0 || value === null) {
|
|
2085
|
-
return
|
|
2130
|
+
return chunkH5IJSROF_cjs.sql`${fieldKey} IS NULL`;
|
|
2086
2131
|
}
|
|
2087
2132
|
return adapter.nullSafeEquals(
|
|
2088
2133
|
fieldKey,
|
|
2089
|
-
|
|
2134
|
+
chunkH5IJSROF_cjs.sql`${coerceIndexProbeBind(value, adapter)}`
|
|
2090
2135
|
);
|
|
2091
2136
|
}),
|
|
2092
|
-
|
|
2137
|
+
chunkH5IJSROF_cjs.sql` AND `
|
|
2093
2138
|
)})`
|
|
2094
2139
|
);
|
|
2095
2140
|
const caseBranches = groupPredicates.map(
|
|
2096
|
-
(predicate, group) =>
|
|
2141
|
+
(predicate, group) => chunkH5IJSROF_cjs.sql`WHEN ${predicate} THEN ${chunkH5IJSROF_cjs.sql.raw(String(group))}`
|
|
2097
2142
|
);
|
|
2098
|
-
const probeIndexExpr =
|
|
2143
|
+
const probeIndexExpr = chunkH5IJSROF_cjs.sql`CASE ${chunkH5IJSROF_cjs.sql.join(caseBranches, chunkH5IJSROF_cjs.sql` `)} ELSE NULL END`;
|
|
2099
2144
|
const conditions = [
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2145
|
+
chunkH5IJSROF_cjs.sql`"graph_id" = ${ctx.graphId}`,
|
|
2146
|
+
chunkH5IJSROF_cjs.sql`"kind" = ${kind}`,
|
|
2147
|
+
chunkH5IJSROF_cjs.sql`"deleted_at" IS NULL`
|
|
2103
2148
|
];
|
|
2104
2149
|
if (index.where !== void 0) {
|
|
2105
|
-
conditions.push(
|
|
2150
|
+
conditions.push(chunkJVA3KDEA_cjs.compileIndexWhere(compileContext, index.where));
|
|
2106
2151
|
}
|
|
2107
|
-
conditions.push(
|
|
2108
|
-
const whereClause =
|
|
2109
|
-
const probedSelect =
|
|
2152
|
+
conditions.push(chunkH5IJSROF_cjs.sql`(${chunkH5IJSROF_cjs.sql.join(groupPredicates, chunkH5IJSROF_cjs.sql` OR `)})`);
|
|
2153
|
+
const whereClause = chunkH5IJSROF_cjs.sql.join(conditions, chunkH5IJSROF_cjs.sql` AND `);
|
|
2154
|
+
const probedSelect = chunkH5IJSROF_cjs.sql`SELECT "id", ${probeIndexExpr} AS probe_idx FROM ${schema.nodesTable} WHERE ${whereClause}`;
|
|
2110
2155
|
const capInSql = limitPerInput !== void 0 && backend.capabilities.windowFunctions;
|
|
2111
|
-
const query = capInSql ?
|
|
2156
|
+
const query = capInSql ? chunkH5IJSROF_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"` : chunkH5IJSROF_cjs.sql`${probedSelect} ORDER BY probe_idx, "id"`;
|
|
2112
2157
|
const rawMatches = await backend.execute(
|
|
2113
|
-
|
|
2158
|
+
chunkH5IJSROF_cjs.asCompiledRowsSql(query)
|
|
2114
2159
|
);
|
|
2115
2160
|
const matches = limitPerInput !== void 0 && !capInSql ? capMatchesPerGroup(rawMatches, limitPerInput) : rawMatches;
|
|
2116
2161
|
const nodesById = await hydrateNodesById(
|
|
2117
2162
|
backend,
|
|
2163
|
+
ctx.batchPointRead,
|
|
2118
2164
|
ctx.graphId,
|
|
2119
2165
|
kind,
|
|
2120
2166
|
matches.map((match) => match.id)
|
|
@@ -2142,8 +2188,14 @@ function capMatchesPerGroup(matches, limitPerInput) {
|
|
|
2142
2188
|
}
|
|
2143
2189
|
return capped;
|
|
2144
2190
|
}
|
|
2145
|
-
async function hydrateNodesById(backend, graphId, kind, ids) {
|
|
2146
|
-
const rowsById = await
|
|
2191
|
+
async function hydrateNodesById(backend, batchPointRead, graphId, kind, ids) {
|
|
2192
|
+
const rowsById = await chunkJQKMEKKW_cjs.getNodeRowsByIds(
|
|
2193
|
+
backend,
|
|
2194
|
+
batchPointRead,
|
|
2195
|
+
graphId,
|
|
2196
|
+
kind,
|
|
2197
|
+
ids
|
|
2198
|
+
);
|
|
2147
2199
|
const nodesById = /* @__PURE__ */ new Map();
|
|
2148
2200
|
for (const [id, row] of rowsById) {
|
|
2149
2201
|
if (row.deleted_at !== void 0) continue;
|
|
@@ -2159,7 +2211,7 @@ async function executeNodeBulkGetOrCreateByConstraint(ctx, kind, constraintName,
|
|
|
2159
2211
|
const constraint = resolveConstraint(ctx.graph, kind, constraintName);
|
|
2160
2212
|
const validated = validateAndComputeKeys(nodeKind, kind, constraint, items);
|
|
2161
2213
|
const uniqueKeys = collectUniqueKeys(validated);
|
|
2162
|
-
const kindsToCheck =
|
|
2214
|
+
const kindsToCheck = chunkCRZ56SZU_cjs.uniquenessProbeKinds(
|
|
2163
2215
|
kind,
|
|
2164
2216
|
constraint.scope,
|
|
2165
2217
|
ctx.registry
|
|
@@ -2167,6 +2219,7 @@ async function executeNodeBulkGetOrCreateByConstraint(ctx, kind, constraintName,
|
|
|
2167
2219
|
async function attempt() {
|
|
2168
2220
|
const existingByKey = uniqueKeys.length > 0 ? await batchCheckUniqueAcrossKinds(
|
|
2169
2221
|
backend,
|
|
2222
|
+
ctx.uniqueSidecarBatch,
|
|
2170
2223
|
ctx.graphId,
|
|
2171
2224
|
constraint.name,
|
|
2172
2225
|
uniqueKeys,
|
|
@@ -2303,5 +2356,5 @@ exports.runWritePlan = runWritePlan;
|
|
|
2303
2356
|
exports.unfencedTarget = unfencedTarget;
|
|
2304
2357
|
exports.validityEndAfterMutation = validityEndAfterMutation;
|
|
2305
2358
|
exports.withAlreadyExistsTranslation = withAlreadyExistsTranslation;
|
|
2306
|
-
//# sourceMappingURL=chunk-
|
|
2307
|
-
//# sourceMappingURL=chunk-
|
|
2359
|
+
//# sourceMappingURL=chunk-2KCTP3U2.cjs.map
|
|
2360
|
+
//# sourceMappingURL=chunk-2KCTP3U2.cjs.map
|