@nicia-ai/typegraph 0.37.1 → 0.39.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 -10
- package/dist/backend/drizzle/indexes.cjs +32 -0
- package/dist/backend/drizzle/indexes.cjs.map +1 -0
- package/dist/backend/drizzle/indexes.d.cts +43 -0
- package/dist/backend/drizzle/indexes.d.ts +43 -0
- package/dist/backend/drizzle/indexes.js +11 -0
- package/dist/backend/drizzle/indexes.js.map +1 -0
- package/dist/backend/index.cjs +161 -0
- package/dist/backend/index.cjs.map +1 -0
- package/dist/backend/index.d.cts +3 -0
- package/dist/backend/index.d.ts +3 -0
- package/dist/backend/index.js +8 -0
- package/dist/backend/index.js.map +1 -0
- package/dist/backend/postgres/index.cjs +32 -28
- package/dist/backend/postgres/index.d.cts +13 -12
- package/dist/backend/postgres/index.d.ts +13 -12
- package/dist/backend/postgres/index.js +19 -15
- package/dist/backend/postgres/pglite-store.cjs +67 -0
- package/dist/backend/postgres/pglite-store.cjs.map +1 -0
- package/dist/backend/postgres/pglite-store.d.cts +38 -0
- package/dist/backend/postgres/pglite-store.d.ts +38 -0
- package/dist/backend/postgres/pglite-store.js +65 -0
- package/dist/backend/postgres/pglite-store.js.map +1 -0
- package/dist/backend/postgres/pglite.cjs +25 -50
- package/dist/backend/postgres/pglite.cjs.map +1 -1
- package/dist/backend/postgres/pglite.d.cts +10 -9
- package/dist/backend/postgres/pglite.d.ts +10 -9
- package/dist/backend/postgres/pglite.js +20 -52
- package/dist/backend/postgres/pglite.js.map +1 -1
- package/dist/backend/sqlite/index.cjs +29 -25
- package/dist/backend/sqlite/index.d.cts +11 -11
- package/dist/backend/sqlite/index.d.ts +11 -11
- package/dist/backend/sqlite/index.js +17 -13
- package/dist/backend/sqlite/libsql.cjs +23 -19
- package/dist/backend/sqlite/libsql.cjs.map +1 -1
- package/dist/backend/sqlite/libsql.d.cts +9 -10
- package/dist/backend/sqlite/libsql.d.ts +9 -10
- package/dist/backend/sqlite/libsql.js +19 -15
- package/dist/backend/sqlite/libsql.js.map +1 -1
- package/dist/backend/sqlite/local-store.cjs +72 -0
- package/dist/backend/sqlite/local-store.cjs.map +1 -0
- package/dist/backend/sqlite/local-store.d.cts +42 -0
- package/dist/backend/sqlite/local-store.d.ts +42 -0
- package/dist/backend/sqlite/local-store.js +67 -0
- package/dist/backend/sqlite/local-store.js.map +1 -0
- package/dist/backend/sqlite/local.cjs +28 -183
- package/dist/backend/sqlite/local.cjs.map +1 -1
- package/dist/backend/sqlite/local.d.cts +8 -81
- package/dist/backend/sqlite/local.d.ts +8 -81
- package/dist/backend/sqlite/local.js +20 -180
- package/dist/backend/sqlite/local.js.map +1 -1
- package/dist/chunk-2EBMPJBO.js +16 -0
- package/dist/chunk-2EBMPJBO.js.map +1 -0
- package/dist/chunk-35S6P5ZU.js +27 -0
- package/dist/chunk-35S6P5ZU.js.map +1 -0
- package/dist/chunk-3LKL3S6X.js +50 -0
- package/dist/chunk-3LKL3S6X.js.map +1 -0
- package/dist/{chunk-RCVLFTCT.js → chunk-3SK4SVTW.js} +13 -12
- package/dist/chunk-3SK4SVTW.js.map +1 -0
- package/dist/chunk-3YFDFOYB.cjs +192 -0
- package/dist/chunk-3YFDFOYB.cjs.map +1 -0
- package/dist/{chunk-WOJMKB3N.cjs → chunk-5ELKD2FQ.cjs} +1677 -308
- package/dist/chunk-5ELKD2FQ.cjs.map +1 -0
- package/dist/{chunk-5AVRFNP4.cjs → chunk-6SRLCSAV.cjs} +3012 -1513
- package/dist/chunk-6SRLCSAV.cjs.map +1 -0
- package/dist/chunk-6XDBRDZE.js +312 -0
- package/dist/chunk-6XDBRDZE.js.map +1 -0
- package/dist/chunk-764JHTLT.cjs +15 -0
- package/dist/chunk-764JHTLT.cjs.map +1 -0
- package/dist/chunk-76HE7DJP.js +68 -0
- package/dist/chunk-76HE7DJP.js.map +1 -0
- package/dist/{chunk-VGDDG3XJ.cjs → chunk-7M3NACL3.cjs} +12 -12
- package/dist/{chunk-VGDDG3XJ.cjs.map → chunk-7M3NACL3.cjs.map} +1 -1
- package/dist/chunk-AOL64O4Z.js +165 -0
- package/dist/chunk-AOL64O4Z.js.map +1 -0
- package/dist/{chunk-27SSDCEP.cjs → chunk-B63IFHXR.cjs} +53 -74
- package/dist/chunk-B63IFHXR.cjs.map +1 -0
- package/dist/{chunk-3XXGYU62.cjs → chunk-BKAKAVRW.cjs} +56 -53
- package/dist/chunk-BKAKAVRW.cjs.map +1 -0
- package/dist/{chunk-YTSN73ND.js → chunk-BQITNFQJ.js} +3 -3
- package/dist/{chunk-YTSN73ND.js.map → chunk-BQITNFQJ.js.map} +1 -1
- package/dist/{chunk-GA4TT3DH.js → chunk-CBK2IVI2.js} +1999 -503
- package/dist/chunk-CBK2IVI2.js.map +1 -0
- package/dist/{chunk-6EEO3OVU.cjs → chunk-CWX77JB4.cjs} +22 -59
- package/dist/chunk-CWX77JB4.cjs.map +1 -0
- package/dist/{chunk-UGZUAYAR.js → chunk-D7PG5D5K.js} +4 -3
- package/dist/chunk-D7PG5D5K.js.map +1 -0
- package/dist/chunk-DDCIXXOO.js +9 -0
- package/dist/chunk-DDCIXXOO.js.map +1 -0
- package/dist/chunk-DDCYVIVV.cjs +44 -0
- package/dist/chunk-DDCYVIVV.cjs.map +1 -0
- package/dist/{chunk-UV3WP5WZ.js → chunk-DOKUXLFH.js} +61 -29
- package/dist/chunk-DOKUXLFH.js.map +1 -0
- package/dist/{chunk-XPCZADMT.cjs → chunk-DOVMTPKE.cjs} +89 -27
- package/dist/chunk-DOVMTPKE.cjs.map +1 -0
- package/dist/{chunk-5PNMDJ7J.js → chunk-DPNA466P.js} +14 -9
- package/dist/chunk-DPNA466P.js.map +1 -0
- package/dist/{chunk-BYPOGQWK.js → chunk-DRACN6XG.js} +6 -4
- package/dist/chunk-DRACN6XG.js.map +1 -0
- package/dist/{chunk-TGOMW4MB.cjs → chunk-E2Q7SP2K.cjs} +110 -109
- package/dist/chunk-E2Q7SP2K.cjs.map +1 -0
- package/dist/chunk-E6TXEISH.cjs +175 -0
- package/dist/chunk-E6TXEISH.cjs.map +1 -0
- package/dist/{chunk-3C2RYI6L.cjs → chunk-EOJFGECD.cjs} +11 -11
- package/dist/chunk-EOJFGECD.cjs.map +1 -0
- package/dist/{chunk-XWV4JT34.js → chunk-ERZ4QPQX.js} +27 -22
- package/dist/chunk-ERZ4QPQX.js.map +1 -0
- package/dist/{chunk-DFVLCOP6.js → chunk-EZH7FNUS.js} +3 -3
- package/dist/{chunk-DFVLCOP6.js.map → chunk-EZH7FNUS.js.map} +1 -1
- package/dist/{chunk-WWFHO375.cjs → chunk-FJMPR3OH.cjs} +4 -3
- package/dist/chunk-FJMPR3OH.cjs.map +1 -0
- package/dist/chunk-FMNUSGZ4.cjs +12 -0
- package/dist/chunk-FMNUSGZ4.cjs.map +1 -0
- package/dist/{chunk-EXU3RASM.js → chunk-G3CSQLLT.js} +20 -474
- package/dist/chunk-G3CSQLLT.js.map +1 -0
- package/dist/{chunk-EJYMTO3K.cjs → chunk-GKQU44SQ.cjs} +150 -118
- package/dist/chunk-GKQU44SQ.cjs.map +1 -0
- package/dist/chunk-GNPGGLAE.cjs +212 -0
- package/dist/chunk-GNPGGLAE.cjs.map +1 -0
- package/dist/{chunk-QARBLBXT.cjs → chunk-GUUWKPTK.cjs} +7 -7
- package/dist/{chunk-QARBLBXT.cjs.map → chunk-GUUWKPTK.cjs.map} +1 -1
- package/dist/chunk-GYA4JRP5.js +31 -0
- package/dist/chunk-GYA4JRP5.js.map +1 -0
- package/dist/{chunk-3GH67G4Z.cjs → chunk-HP6LWBLB.cjs} +16 -42
- package/dist/chunk-HP6LWBLB.cjs.map +1 -0
- package/dist/{chunk-NXQFATMF.cjs → chunk-HTQOBY75.cjs} +153 -123
- package/dist/chunk-HTQOBY75.cjs.map +1 -0
- package/dist/chunk-I6FX7AAG.js +39 -0
- package/dist/chunk-I6FX7AAG.js.map +1 -0
- package/dist/{chunk-VKGKDOKR.js → chunk-IFDXG2YJ.js} +1539 -206
- package/dist/chunk-IFDXG2YJ.js.map +1 -0
- package/dist/{chunk-IXGYRP2P.js → chunk-IFRPHG7O.js} +79 -49
- package/dist/chunk-IFRPHG7O.js.map +1 -0
- package/dist/chunk-IMQKXL4E.cjs +12 -0
- package/dist/{chunk-QSXTWU4U.cjs.map → chunk-IMQKXL4E.cjs.map} +1 -1
- package/dist/chunk-J6IJARLG.js +94 -0
- package/dist/chunk-J6IJARLG.js.map +1 -0
- package/dist/{chunk-3DS7Z4T4.cjs → chunk-JD2YC62H.cjs} +44 -43
- package/dist/chunk-JD2YC62H.cjs.map +1 -0
- package/dist/{chunk-W63OVYY4.js → chunk-K34OPSJK.js} +3 -3
- package/dist/{chunk-W63OVYY4.js.map → chunk-K34OPSJK.js.map} +1 -1
- package/dist/chunk-KAFXPB2L.js +184 -0
- package/dist/chunk-KAFXPB2L.js.map +1 -0
- package/dist/chunk-KIZSHRUI.cjs +49 -0
- package/dist/chunk-KIZSHRUI.cjs.map +1 -0
- package/dist/{chunk-K3Q3LJY3.js → chunk-KXFUQNF2.js} +201 -100
- package/dist/chunk-KXFUQNF2.js.map +1 -0
- package/dist/{chunk-UXLSNRYL.js → chunk-MTNEGGM2.js} +4 -4
- package/dist/chunk-MTNEGGM2.js.map +1 -0
- package/dist/{chunk-IP3CGGPA.cjs → chunk-N2V3HJFV.cjs} +92 -185
- package/dist/chunk-N2V3HJFV.cjs.map +1 -0
- package/dist/chunk-NAUA4PW5.cjs +28 -0
- package/dist/chunk-NAUA4PW5.cjs.map +1 -0
- package/dist/chunk-NMQ6C6TS.cjs +61 -0
- package/dist/chunk-NMQ6C6TS.cjs.map +1 -0
- package/dist/{chunk-2N6EOBTH.cjs → chunk-NPWACFQJ.cjs} +58 -53
- package/dist/chunk-NPWACFQJ.cjs.map +1 -0
- package/dist/{chunk-TKT2XHED.js → chunk-NQBYTLPW.js} +13 -12
- package/dist/chunk-NQBYTLPW.js.map +1 -0
- package/dist/{chunk-5KEQ74YU.cjs → chunk-NT6ILURI.cjs} +9 -86
- package/dist/chunk-NT6ILURI.cjs.map +1 -0
- package/dist/{chunk-3SLPDKHQ.js → chunk-PH4IJ3V5.js} +5 -77
- package/dist/chunk-PH4IJ3V5.js.map +1 -0
- package/dist/chunk-PWXGB77L.cjs +56 -0
- package/dist/chunk-PWXGB77L.cjs.map +1 -0
- package/dist/chunk-PZHC5GCD.js +193 -0
- package/dist/chunk-PZHC5GCD.js.map +1 -0
- package/dist/chunk-QMQLUA66.js +12 -0
- package/dist/chunk-QMQLUA66.js.map +1 -0
- package/dist/{chunk-5WWVZMVX.js → chunk-QZ7A6HBM.js} +2 -2
- package/dist/{chunk-5WWVZMVX.js.map → chunk-QZ7A6HBM.js.map} +1 -1
- package/dist/chunk-RW24SAHI.cjs +74 -0
- package/dist/chunk-RW24SAHI.cjs.map +1 -0
- package/dist/{chunk-BVRDGYXQ.cjs → chunk-SAFZ6JTI.cjs} +14 -9
- package/dist/chunk-SAFZ6JTI.cjs.map +1 -0
- package/dist/{chunk-L7HQ2OSI.js → chunk-SCTZRFW5.js} +87 -166
- package/dist/chunk-SCTZRFW5.js.map +1 -0
- package/dist/{chunk-5KPNWT6X.js → chunk-SDHV2MWU.js} +24 -45
- package/dist/chunk-SDHV2MWU.js.map +1 -0
- package/dist/{chunk-3RWZPJKV.js → chunk-SU7VQOJ3.js} +21 -78
- package/dist/chunk-SU7VQOJ3.js.map +1 -0
- package/dist/chunk-SVJ5GEXW.cjs +45 -0
- package/dist/chunk-SVJ5GEXW.cjs.map +1 -0
- package/dist/chunk-SVUKGWSN.cjs +102 -0
- package/dist/chunk-SVUKGWSN.cjs.map +1 -0
- package/dist/chunk-TAUGGLNQ.js +59 -0
- package/dist/chunk-TAUGGLNQ.js.map +1 -0
- package/dist/{chunk-A42GCBGX.cjs → chunk-TRF4EBJT.cjs} +6 -4
- package/dist/chunk-TRF4EBJT.cjs.map +1 -0
- package/dist/{chunk-KQJ54OG5.js → chunk-U4JDJKPD.js} +19 -56
- package/dist/chunk-U4JDJKPD.js.map +1 -0
- package/dist/chunk-UH2USOMG.cjs +627 -0
- package/dist/chunk-UH2USOMG.cjs.map +1 -0
- package/dist/{chunk-XGPUQ56G.js → chunk-UUIBACKJ.js} +15 -38
- package/dist/chunk-UUIBACKJ.js.map +1 -0
- package/dist/{chunk-5VQM6VWP.cjs → chunk-UWG5GX6E.cjs} +2 -2
- package/dist/{chunk-5VQM6VWP.cjs.map → chunk-UWG5GX6E.cjs.map} +1 -1
- package/dist/{chunk-K5UBVGJN.js → chunk-VDYA2HMS.js} +6 -6
- package/dist/{chunk-K5UBVGJN.js.map → chunk-VDYA2HMS.js.map} +1 -1
- package/dist/{chunk-NUIG3BCV.cjs → chunk-VXAFOF6Z.cjs} +93 -155
- package/dist/chunk-VXAFOF6Z.cjs.map +1 -0
- package/dist/chunk-X4PVHAZ6.cjs +83 -0
- package/dist/chunk-X4PVHAZ6.cjs.map +1 -0
- package/dist/{chunk-UYQMBBWJ.js → chunk-X6CNEA32.js} +23 -20
- package/dist/chunk-X6CNEA32.js.map +1 -0
- package/dist/chunk-X6RDQ5NB.cjs +335 -0
- package/dist/chunk-X6RDQ5NB.cjs.map +1 -0
- package/dist/{chunk-DEFQM7JU.cjs → chunk-XRU7V7FF.cjs} +7 -7
- package/dist/{chunk-DEFQM7JU.cjs.map → chunk-XRU7V7FF.cjs.map} +1 -1
- package/dist/{chunk-TPF25IG6.js → chunk-XZA3Y4YH.js} +3 -3
- package/dist/{chunk-TPF25IG6.js.map → chunk-XZA3Y4YH.js.map} +1 -1
- package/dist/{chunk-DIQ3AV5W.cjs → chunk-Y6UA55YS.cjs} +324 -224
- package/dist/chunk-Y6UA55YS.cjs.map +1 -0
- package/dist/chunk-Y7M44XEK.js +462 -0
- package/dist/chunk-Y7M44XEK.js.map +1 -0
- package/dist/{chunk-RRSNR3TP.js → chunk-YIRLBUNN.js} +3 -3
- package/dist/{chunk-RRSNR3TP.js.map → chunk-YIRLBUNN.js.map} +1 -1
- package/dist/chunk-YPUNPG2T.js +47 -0
- package/dist/chunk-YPUNPG2T.js.map +1 -0
- package/dist/{chunk-QERAIDRJ.js → chunk-Z2PPIVOO.js} +82 -22
- package/dist/chunk-Z2PPIVOO.js.map +1 -0
- package/dist/chunk-Z5QHVL5U.cjs +12 -0
- package/dist/chunk-Z5QHVL5U.cjs.map +1 -0
- package/dist/chunk-ZDH3DX3C.cjs +30 -0
- package/dist/chunk-ZDH3DX3C.cjs.map +1 -0
- package/dist/chunk-ZE6NVENI.js +77 -0
- package/dist/chunk-ZE6NVENI.js.map +1 -0
- package/dist/chunk-ZKZAIX42.cjs +479 -0
- package/dist/chunk-ZKZAIX42.cjs.map +1 -0
- package/dist/{chunk-TEDRJXOG.cjs → chunk-ZY4GXIVN.cjs} +5 -5
- package/dist/{chunk-TEDRJXOG.cjs.map → chunk-ZY4GXIVN.cjs.map} +1 -1
- package/dist/core/index.cjs +117 -0
- package/dist/core/index.cjs.map +1 -0
- package/dist/core/index.d.cts +225 -0
- package/dist/core/index.d.ts +225 -0
- package/dist/core/index.js +12 -0
- package/dist/core/index.js.map +1 -0
- package/dist/{ddl-CS0KUVwB.d.ts → ddl-Dx3Z0_WC.d.ts} +3 -3
- package/dist/{ddl-BD-ZfKeX.d.cts → ddl-J6sDyABg.d.cts} +3 -3
- package/dist/define-graph-CzEvA_8F.d.cts +174 -0
- package/dist/define-graph-DRo9xpYN.d.ts +174 -0
- package/dist/{extension-types-BM2ACfYO.d.cts → extension-types-BLEVH4SG.d.cts} +1 -1
- package/dist/{extension-types-BM2ACfYO.d.ts → extension-types-BLEVH4SG.d.ts} +1 -1
- package/dist/graph-extension/index.cjs +21 -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 +6 -4
- package/dist/graph-merge/index.cjs +267 -218
- package/dist/graph-merge/index.cjs.map +1 -1
- package/dist/graph-merge/index.d.cts +17 -93
- package/dist/graph-merge/index.d.ts +17 -93
- package/dist/graph-merge/index.js +143 -94
- package/dist/graph-merge/index.js.map +1 -1
- package/dist/{index-BeacbPoe.d.ts → index-BD_3TCgh.d.ts} +6 -4
- package/dist/{index-BPM59vsg.d.cts → index-BihFPsPu.d.cts} +6 -4
- package/dist/{fulltext-strategy-C27vXaeB.d.cts → index-Bq7vSPHy.d.ts} +3195 -2646
- package/dist/{fulltext-strategy-DebsMrqg.d.ts → index-CrFL_ENI.d.cts} +3195 -2646
- package/dist/index.cjs +326 -315
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +59 -240
- package/dist/index.d.ts +59 -240
- package/dist/index.js +46 -79
- package/dist/index.js.map +1 -1
- package/dist/indexes/index.cjs +26 -38
- package/dist/indexes/index.d.cts +6 -41
- package/dist/indexes/index.d.ts +6 -41
- package/dist/indexes/index.js +14 -10
- package/dist/interchange/index.cjs +48 -39
- package/dist/interchange/index.cjs.map +1 -1
- package/dist/interchange/index.d.cts +7 -8
- package/dist/interchange/index.d.ts +7 -8
- package/dist/interchange/index.js +23 -14
- package/dist/interchange/index.js.map +1 -1
- package/dist/local-options-CZ1BnIoF.d.cts +29 -0
- package/dist/local-options-CZ1BnIoF.d.ts +29 -0
- package/dist/{manager-D00_NXvT.d.ts → manager-CASfhmzV.d.ts} +4 -173
- package/dist/{manager-nU1vTJLy.d.cts → manager-nCEJiYBb.d.cts} +4 -173
- package/dist/{materialize-indexes-zK2J_flP.d.ts → materialize-indexes-D4iei4Kp.d.ts} +1 -1
- package/dist/{materialize-indexes-CuR3gAZb.d.cts → materialize-indexes-ExQ6OrAh.d.cts} +1 -1
- package/dist/{postgres-IaBA4RgE.d.ts → postgres-Cl1ZAN1G.d.ts} +1 -1
- package/dist/{postgres-YrYmPlaU.d.cts → postgres-DMgIKQU-.d.cts} +1 -1
- package/dist/postgres-execution-fKW0qRiN.d.cts +14 -0
- package/dist/postgres-execution-fKW0qRiN.d.ts +14 -0
- package/dist/profiler/index.cjs +9 -8
- package/dist/profiler/index.cjs.map +1 -1
- package/dist/profiler/index.d.cts +9 -17
- package/dist/profiler/index.d.ts +9 -17
- package/dist/profiler/index.js +8 -7
- package/dist/profiler/index.js.map +1 -1
- package/dist/provenance/index.cjs +61 -55
- package/dist/provenance/index.cjs.map +1 -1
- package/dist/provenance/index.d.cts +7 -8
- package/dist/provenance/index.d.ts +7 -8
- package/dist/provenance/index.js +34 -28
- package/dist/provenance/index.js.map +1 -1
- package/dist/schema/index.cjs +46 -37
- package/dist/schema/index.cjs.map +1 -1
- package/dist/schema/index.d.cts +8 -10
- package/dist/schema/index.d.ts +8 -10
- package/dist/schema/index.js +22 -13
- package/dist/schema/index.js.map +1 -1
- package/dist/{sqlite-BUOHPx7p.d.ts → sqlite-BDkW39aa.d.cts} +1 -1
- package/dist/{sqlite-Pp8O19WE.d.cts → sqlite-CYfhvESj.d.ts} +1 -1
- package/dist/sqlite-execution-DwbE2a9y.d.cts +32 -0
- package/dist/sqlite-execution-DwbE2a9y.d.ts +32 -0
- package/dist/{store-view-X96Rd00T.d.cts → store-view-BJd6Vwpt.d.cts} +427 -1404
- package/dist/{store-view-ANL6mTph.d.ts → store-view-CLIhwMMX.d.ts} +427 -1404
- package/dist/temporal-BC_NQV5Y.d.cts +281 -0
- package/dist/temporal-DqtOEo_B.d.ts +281 -0
- package/dist/{types-r-Zyq2Hz.d.cts → types-COq3-vMC.d.cts} +2 -2
- package/dist/{types-wsvuBgPK.d.ts → types-CUevi_D1.d.ts} +2 -2
- package/dist/{where-CJOpJj3a.d.ts → where-BdE_cYtx.d.ts} +5 -5
- package/dist/{where-K3uBP33l.d.cts → where-C92TXCzT.d.cts} +5 -5
- package/package.json +37 -6
- package/dist/chunk-27SSDCEP.cjs.map +0 -1
- package/dist/chunk-2N6EOBTH.cjs.map +0 -1
- package/dist/chunk-3C2RYI6L.cjs.map +0 -1
- package/dist/chunk-3DS7Z4T4.cjs.map +0 -1
- package/dist/chunk-3GH67G4Z.cjs.map +0 -1
- package/dist/chunk-3RWZPJKV.js.map +0 -1
- package/dist/chunk-3SLPDKHQ.js.map +0 -1
- package/dist/chunk-3XXGYU62.cjs.map +0 -1
- package/dist/chunk-44TA22QT.js +0 -1478
- package/dist/chunk-44TA22QT.js.map +0 -1
- package/dist/chunk-5AVRFNP4.cjs.map +0 -1
- package/dist/chunk-5KEQ74YU.cjs.map +0 -1
- package/dist/chunk-5KPNWT6X.js.map +0 -1
- package/dist/chunk-5PNMDJ7J.js.map +0 -1
- package/dist/chunk-6EEO3OVU.cjs.map +0 -1
- package/dist/chunk-7YSP4V4R.cjs +0 -69
- package/dist/chunk-7YSP4V4R.cjs.map +0 -1
- package/dist/chunk-A42GCBGX.cjs.map +0 -1
- package/dist/chunk-BVRDGYXQ.cjs.map +0 -1
- package/dist/chunk-BYPOGQWK.js.map +0 -1
- package/dist/chunk-CUHM5CWJ.cjs +0 -12
- package/dist/chunk-CUHM5CWJ.cjs.map +0 -1
- package/dist/chunk-DIQ3AV5W.cjs.map +0 -1
- package/dist/chunk-EJYMTO3K.cjs.map +0 -1
- package/dist/chunk-EXU3RASM.js.map +0 -1
- package/dist/chunk-GA4TT3DH.js.map +0 -1
- package/dist/chunk-IP3CGGPA.cjs.map +0 -1
- package/dist/chunk-IPSVVTWT.cjs +0 -1540
- package/dist/chunk-IPSVVTWT.cjs.map +0 -1
- package/dist/chunk-IXGYRP2P.js.map +0 -1
- package/dist/chunk-K3Q3LJY3.js.map +0 -1
- package/dist/chunk-KQJ54OG5.js.map +0 -1
- package/dist/chunk-L7HQ2OSI.js.map +0 -1
- package/dist/chunk-M6VES7V6.js +0 -239
- package/dist/chunk-M6VES7V6.js.map +0 -1
- package/dist/chunk-NUIG3BCV.cjs.map +0 -1
- package/dist/chunk-NXQFATMF.cjs.map +0 -1
- package/dist/chunk-OHMP6N2J.js +0 -47
- package/dist/chunk-OHMP6N2J.js.map +0 -1
- package/dist/chunk-QERAIDRJ.js.map +0 -1
- package/dist/chunk-QSXTWU4U.cjs +0 -12
- package/dist/chunk-RCVLFTCT.js.map +0 -1
- package/dist/chunk-TGOMW4MB.cjs.map +0 -1
- package/dist/chunk-TKT2XHED.js.map +0 -1
- package/dist/chunk-UGZUAYAR.js.map +0 -1
- package/dist/chunk-UV3WP5WZ.js.map +0 -1
- package/dist/chunk-UXLSNRYL.js.map +0 -1
- package/dist/chunk-UYQMBBWJ.js.map +0 -1
- package/dist/chunk-VKGKDOKR.js.map +0 -1
- package/dist/chunk-VL2V6PEN.cjs +0 -261
- package/dist/chunk-VL2V6PEN.cjs.map +0 -1
- package/dist/chunk-WOJMKB3N.cjs.map +0 -1
- package/dist/chunk-WWFHO375.cjs.map +0 -1
- package/dist/chunk-XGPUQ56G.js.map +0 -1
- package/dist/chunk-XGU7DZDA.cjs +0 -1095
- package/dist/chunk-XGU7DZDA.cjs.map +0 -1
- package/dist/chunk-XPCZADMT.cjs.map +0 -1
- package/dist/chunk-XWV4JT34.js.map +0 -1
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk5ELKD2FQ_cjs = require('./chunk-5ELKD2FQ.cjs');
|
|
4
|
+
var chunkGNPGGLAE_cjs = require('./chunk-GNPGGLAE.cjs');
|
|
5
|
+
var chunkX4PVHAZ6_cjs = require('./chunk-X4PVHAZ6.cjs');
|
|
4
6
|
var chunkACSVZPK7_cjs = require('./chunk-ACSVZPK7.cjs');
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
7
|
+
var chunkDDCYVIVV_cjs = require('./chunk-DDCYVIVV.cjs');
|
|
8
|
+
var chunkUH2USOMG_cjs = require('./chunk-UH2USOMG.cjs');
|
|
9
|
+
var chunkX6RDQ5NB_cjs = require('./chunk-X6RDQ5NB.cjs');
|
|
10
|
+
var chunk764JHTLT_cjs = require('./chunk-764JHTLT.cjs');
|
|
11
|
+
var chunkXRU7V7FF_cjs = require('./chunk-XRU7V7FF.cjs');
|
|
12
|
+
var chunkSAFZ6JTI_cjs = require('./chunk-SAFZ6JTI.cjs');
|
|
11
13
|
var chunkTDXIBCGY_cjs = require('./chunk-TDXIBCGY.cjs');
|
|
12
|
-
var drizzleOrm = require('drizzle-orm');
|
|
13
14
|
|
|
14
15
|
// src/store/row-mappers.ts
|
|
15
16
|
function nullToUndefined(value) {
|
|
16
17
|
return value === null ? void 0 : value;
|
|
17
18
|
}
|
|
18
19
|
function rowToNode(row) {
|
|
19
|
-
const rawProps =
|
|
20
|
-
const props =
|
|
20
|
+
const rawProps = chunkGNPGGLAE_cjs.rowPropsToObject(row.props);
|
|
21
|
+
const props = chunkXRU7V7FF_cjs.filterReservedKeys(rawProps, chunkXRU7V7FF_cjs.RESERVED_NODE_KEYS);
|
|
21
22
|
return {
|
|
22
23
|
kind: row.kind,
|
|
23
24
|
id: row.id,
|
|
@@ -36,8 +37,8 @@ function rowToNodeMeta(row) {
|
|
|
36
37
|
};
|
|
37
38
|
}
|
|
38
39
|
function rowToEdge(row) {
|
|
39
|
-
const rawProps =
|
|
40
|
-
const props =
|
|
40
|
+
const rawProps = chunkGNPGGLAE_cjs.rowPropsToObject(row.props);
|
|
41
|
+
const props = chunkXRU7V7FF_cjs.filterReservedKeys(rawProps, chunkXRU7V7FF_cjs.RESERVED_EDGE_KEYS);
|
|
41
42
|
return {
|
|
42
43
|
id: row.id,
|
|
43
44
|
kind: row.kind,
|
|
@@ -62,11 +63,11 @@ function rowToEdgeMeta(row) {
|
|
|
62
63
|
// src/store/operations/write-transaction.ts
|
|
63
64
|
function runInWriteTransaction(ctx, backend, fn) {
|
|
64
65
|
const ownsWriteLock = "transaction" in backend && backend.capabilities.transactions;
|
|
65
|
-
return
|
|
66
|
-
const lock = ctx.historyEnabled || ctx.revisionTrackingEnabled ? await
|
|
66
|
+
return chunkGNPGGLAE_cjs.runOptionallyInTransaction(backend, async (target) => {
|
|
67
|
+
const lock = ctx.historyEnabled || ctx.revisionTrackingEnabled ? await chunk5ELKD2FQ_cjs.lockRecordedGraphWrite(target, ctx.graphId) : chunk5ELKD2FQ_cjs.uncapturedGraphWriteLock();
|
|
67
68
|
const result = await fn(target, lock);
|
|
68
69
|
if (ctx.revisionTrackingEnabled && !ctx.historyEnabled) {
|
|
69
|
-
await
|
|
70
|
+
await chunk5ELKD2FQ_cjs.advanceRevisionClock(
|
|
70
71
|
target,
|
|
71
72
|
ctx.revisionSchema,
|
|
72
73
|
ctx.graphId,
|
|
@@ -89,7 +90,7 @@ async function checkDisjointnessConstraint(ctx, kind, id) {
|
|
|
89
90
|
for (const disjointKind of disjointKinds) {
|
|
90
91
|
const existing = await ctx.backend.getNode(ctx.graphId, disjointKind, id);
|
|
91
92
|
if (existing && !existing.deleted_at) {
|
|
92
|
-
const error =
|
|
93
|
+
const error = chunk5ELKD2FQ_cjs.checkDisjointness(id, kind, [disjointKind], ctx.registry);
|
|
93
94
|
if (error) throw error;
|
|
94
95
|
}
|
|
95
96
|
}
|
|
@@ -106,7 +107,7 @@ async function checkCardinalityConstraint(ctx, edgeKind, cardinality, fromKind,
|
|
|
106
107
|
fromKind,
|
|
107
108
|
fromId
|
|
108
109
|
});
|
|
109
|
-
const error =
|
|
110
|
+
const error = chunk5ELKD2FQ_cjs.checkCardinality(
|
|
110
111
|
edgeKind,
|
|
111
112
|
fromKind,
|
|
112
113
|
fromId,
|
|
@@ -126,7 +127,7 @@ async function checkCardinalityConstraint(ctx, edgeKind, cardinality, fromKind,
|
|
|
126
127
|
toKind,
|
|
127
128
|
toId
|
|
128
129
|
});
|
|
129
|
-
const error =
|
|
130
|
+
const error = chunk5ELKD2FQ_cjs.checkUniqueEdge(
|
|
130
131
|
edgeKind,
|
|
131
132
|
fromKind,
|
|
132
133
|
fromId,
|
|
@@ -148,7 +149,7 @@ async function checkCardinalityConstraint(ctx, edgeKind, cardinality, fromKind,
|
|
|
148
149
|
fromId,
|
|
149
150
|
activeOnly: true
|
|
150
151
|
});
|
|
151
|
-
const error =
|
|
152
|
+
const error = chunk5ELKD2FQ_cjs.checkCardinality(
|
|
152
153
|
edgeKind,
|
|
153
154
|
fromKind,
|
|
154
155
|
fromId,
|
|
@@ -165,7 +166,7 @@ async function checkCardinalityConstraint(ctx, edgeKind, cardinality, fromKind,
|
|
|
165
166
|
// src/store/operations/node-operations.ts
|
|
166
167
|
function getNodeRegistration(graph, kind) {
|
|
167
168
|
const registration = graph.nodes[kind];
|
|
168
|
-
if (registration === void 0) throw new
|
|
169
|
+
if (registration === void 0) throw new chunkSAFZ6JTI_cjs.KindNotFoundError(kind, "node");
|
|
169
170
|
return registration;
|
|
170
171
|
}
|
|
171
172
|
var CACHE_KEY_SEPARATOR = "\0";
|
|
@@ -176,7 +177,7 @@ function buildUniqueCacheKey(graphId, nodeKind, constraintName, key) {
|
|
|
176
177
|
return `${graphId}${CACHE_KEY_SEPARATOR}${nodeKind}${CACHE_KEY_SEPARATOR}${constraintName}${CACHE_KEY_SEPARATOR}${key}`;
|
|
177
178
|
}
|
|
178
179
|
function createNodeAlreadyExistsError(kind, id) {
|
|
179
|
-
return new
|
|
180
|
+
return new chunkSAFZ6JTI_cjs.ValidationError(
|
|
180
181
|
`Node already exists: ${kind}/${id}`,
|
|
181
182
|
{
|
|
182
183
|
entityType: "node",
|
|
@@ -217,7 +218,7 @@ function resolveConstraint(graph, kind, constraintName) {
|
|
|
217
218
|
(candidate) => candidate.name === constraintName
|
|
218
219
|
);
|
|
219
220
|
if (constraint === void 0) {
|
|
220
|
-
throw new
|
|
221
|
+
throw new chunkSAFZ6JTI_cjs.NodeConstraintNotFoundError(constraintName, kind);
|
|
221
222
|
}
|
|
222
223
|
return constraint;
|
|
223
224
|
}
|
|
@@ -278,8 +279,8 @@ function createNodeBatchValidationBackend(graphId, registry, backend) {
|
|
|
278
279
|
}
|
|
279
280
|
function registerPendingUniqueEntries(kind, id, props, constraints) {
|
|
280
281
|
for (const constraint of constraints) {
|
|
281
|
-
if (!
|
|
282
|
-
const key =
|
|
282
|
+
if (!chunk5ELKD2FQ_cjs.checkWherePredicate(constraint, props)) continue;
|
|
283
|
+
const key = chunk5ELKD2FQ_cjs.computeUniqueKey(
|
|
283
284
|
props,
|
|
284
285
|
constraint.fields,
|
|
285
286
|
constraint.collation
|
|
@@ -292,7 +293,7 @@ function createNodeBatchValidationBackend(graphId, registry, backend) {
|
|
|
292
293
|
);
|
|
293
294
|
pendingUniqueOwners.set(concreteEntryKey, id);
|
|
294
295
|
if (constraint.scope !== "kind") {
|
|
295
|
-
const kindsToCheck =
|
|
296
|
+
const kindsToCheck = chunk5ELKD2FQ_cjs.getKindsForUniquenessCheck(
|
|
296
297
|
kind,
|
|
297
298
|
constraint.scope,
|
|
298
299
|
registry
|
|
@@ -311,12 +312,12 @@ function createNodeBatchValidationBackend(graphId, registry, backend) {
|
|
|
311
312
|
}
|
|
312
313
|
function registerAppliedNodeUpdate(kind, id, oldProps, newProps, constraints) {
|
|
313
314
|
for (const constraint of constraints) {
|
|
314
|
-
const oldApplies =
|
|
315
|
-
const newApplies =
|
|
316
|
-
const oldKey = oldApplies ?
|
|
317
|
-
const newKey = newApplies ?
|
|
315
|
+
const oldApplies = chunk5ELKD2FQ_cjs.checkWherePredicate(constraint, oldProps);
|
|
316
|
+
const newApplies = chunk5ELKD2FQ_cjs.checkWherePredicate(constraint, newProps);
|
|
317
|
+
const oldKey = oldApplies ? chunk5ELKD2FQ_cjs.computeUniqueKey(oldProps, constraint.fields, constraint.collation) : void 0;
|
|
318
|
+
const newKey = newApplies ? chunk5ELKD2FQ_cjs.computeUniqueKey(newProps, constraint.fields, constraint.collation) : void 0;
|
|
318
319
|
if (oldKey === newKey) continue;
|
|
319
|
-
const kindsToCheck =
|
|
320
|
+
const kindsToCheck = chunk5ELKD2FQ_cjs.getKindsForUniquenessCheck(
|
|
320
321
|
kind,
|
|
321
322
|
constraint.scope,
|
|
322
323
|
registry
|
|
@@ -356,7 +357,7 @@ function createNodeBatchValidationBackend(graphId, registry, backend) {
|
|
|
356
357
|
if (uniqueCache.has(cacheKey)) return;
|
|
357
358
|
uniqueCache.set(cacheKey, row);
|
|
358
359
|
}
|
|
359
|
-
const validationBackend =
|
|
360
|
+
const validationBackend = chunkGNPGGLAE_cjs.createBackendOverlay(backend, {
|
|
360
361
|
getNode: getNodeCached,
|
|
361
362
|
checkUnique: checkUniqueCached
|
|
362
363
|
});
|
|
@@ -373,7 +374,7 @@ function draftNodeCreate(ctx, input, id, options) {
|
|
|
373
374
|
const kind = input.kind;
|
|
374
375
|
const registration = getNodeRegistration(ctx.graph, kind);
|
|
375
376
|
const nodeKind = registration.type;
|
|
376
|
-
const validatedProps = options?.propsPreValidated === true ? input.props :
|
|
377
|
+
const validatedProps = options?.propsPreValidated === true ? input.props : chunkX4PVHAZ6_cjs.validateNodeProps(nodeKind.schema, input.props, {
|
|
377
378
|
kind,
|
|
378
379
|
operation: "create"
|
|
379
380
|
});
|
|
@@ -383,8 +384,8 @@ function draftNodeCreate(ctx, input, id, options) {
|
|
|
383
384
|
nodeKind,
|
|
384
385
|
uniqueConstraints: registration.unique ?? [],
|
|
385
386
|
validatedProps,
|
|
386
|
-
validFrom:
|
|
387
|
-
validTo:
|
|
387
|
+
validFrom: chunkDDCYVIVV_cjs.validateOptionalCanonicalIsoDate(input.validFrom, "validFrom"),
|
|
388
|
+
validTo: chunkDDCYVIVV_cjs.validateOptionalCanonicalIsoDate(input.validTo, "validTo")
|
|
388
389
|
};
|
|
389
390
|
}
|
|
390
391
|
async function finishNodeCreatePreparation(ctx, draft, backend) {
|
|
@@ -399,8 +400,8 @@ async function finishNodeCreatePreparation(ctx, draft, backend) {
|
|
|
399
400
|
backend
|
|
400
401
|
};
|
|
401
402
|
await checkDisjointnessConstraint(constraintContext, kind, id);
|
|
402
|
-
await
|
|
403
|
-
|
|
403
|
+
await chunk5ELKD2FQ_cjs.checkUniquenessConstraints(
|
|
404
|
+
chunk5ELKD2FQ_cjs.createUniquenessContext(ctx.graphId, ctx.registry, backend),
|
|
404
405
|
kind,
|
|
405
406
|
id,
|
|
406
407
|
validatedProps,
|
|
@@ -430,8 +431,8 @@ async function validateAndPrepareNodeCreate(ctx, input, id, backend, options) {
|
|
|
430
431
|
);
|
|
431
432
|
}
|
|
432
433
|
async function finalizeNodeCreateBatch(ctx, preparedCreates, backend, lock) {
|
|
433
|
-
await
|
|
434
|
-
|
|
434
|
+
await chunk5ELKD2FQ_cjs.applyNodeInsertSideEffectsBatch(
|
|
435
|
+
chunk5ELKD2FQ_cjs.createNodeWriteContext(ctx.graphId, ctx.registry, lock),
|
|
435
436
|
preparedCreates.map((prepared) => ({
|
|
436
437
|
kind: prepared.kind,
|
|
437
438
|
id: prepared.id,
|
|
@@ -443,8 +444,8 @@ async function finalizeNodeCreateBatch(ctx, preparedCreates, backend, lock) {
|
|
|
443
444
|
);
|
|
444
445
|
}
|
|
445
446
|
async function finalizeNodeCreate(ctx, prepared, backend, lock) {
|
|
446
|
-
await
|
|
447
|
-
|
|
447
|
+
await chunk5ELKD2FQ_cjs.applyNodeInsertSideEffects(
|
|
448
|
+
chunk5ELKD2FQ_cjs.createNodeWriteContext(ctx.graphId, ctx.registry, lock),
|
|
448
449
|
{
|
|
449
450
|
kind: prepared.kind,
|
|
450
451
|
id: prepared.id,
|
|
@@ -457,7 +458,7 @@ async function finalizeNodeCreate(ctx, prepared, backend, lock) {
|
|
|
457
458
|
}
|
|
458
459
|
function computeNodeUpdate(ctx, kind, id, existingProps, inputProps) {
|
|
459
460
|
const registration = getNodeRegistration(ctx.graph, kind);
|
|
460
|
-
const validatedProps =
|
|
461
|
+
const validatedProps = chunkX4PVHAZ6_cjs.validateNodeProps(
|
|
461
462
|
registration.type.schema,
|
|
462
463
|
{ ...existingProps, ...inputProps },
|
|
463
464
|
{ kind, operation: "update", id }
|
|
@@ -465,7 +466,7 @@ function computeNodeUpdate(ctx, kind, id, existingProps, inputProps) {
|
|
|
465
466
|
return { registration, validatedProps };
|
|
466
467
|
}
|
|
467
468
|
function resolveNodeUpdateProps(ctx, existing, inputProps) {
|
|
468
|
-
const existingProps =
|
|
469
|
+
const existingProps = chunkGNPGGLAE_cjs.rowPropsToObject(existing.props);
|
|
469
470
|
const { registration, validatedProps } = computeNodeUpdate(
|
|
470
471
|
ctx,
|
|
471
472
|
existing.kind,
|
|
@@ -491,15 +492,15 @@ function nodeUpsertDirtyCheck(ctx, kind, id, existingProps, inputProps) {
|
|
|
491
492
|
async function performNodeUpdate(ctx, input, backend, lock, options) {
|
|
492
493
|
const { kind, id } = input;
|
|
493
494
|
const existing = await backend.getNode(ctx.graphId, kind, id);
|
|
494
|
-
if (!existing) throw new
|
|
495
|
+
if (!existing) throw new chunkSAFZ6JTI_cjs.NodeNotFoundError(kind, id);
|
|
495
496
|
const { registration, validatedProps } = resolveNodeUpdateProps(
|
|
496
497
|
ctx,
|
|
497
498
|
existing,
|
|
498
499
|
input.props
|
|
499
500
|
);
|
|
500
501
|
const nodeKind = registration.type;
|
|
501
|
-
const validTo =
|
|
502
|
-
const writeContext =
|
|
502
|
+
const validTo = chunkDDCYVIVV_cjs.validateOptionalCanonicalIsoDate(input.validTo, "validTo");
|
|
503
|
+
const writeContext = chunk5ELKD2FQ_cjs.createNodeWriteContext(ctx.graphId, ctx.registry, lock);
|
|
503
504
|
const shared = {
|
|
504
505
|
schema: nodeKind.schema,
|
|
505
506
|
validatedProps,
|
|
@@ -507,15 +508,15 @@ async function performNodeUpdate(ctx, input, backend, lock, options) {
|
|
|
507
508
|
...validTo !== void 0 && { validTo }
|
|
508
509
|
};
|
|
509
510
|
if (options?.clearDeleted) {
|
|
510
|
-
const row2 = await
|
|
511
|
+
const row2 = await chunk5ELKD2FQ_cjs.applyNodeUpdate(
|
|
511
512
|
writeContext,
|
|
512
513
|
{ ...shared, existing, clearDeleted: true },
|
|
513
514
|
backend
|
|
514
515
|
);
|
|
515
516
|
return rowToNode(row2);
|
|
516
517
|
}
|
|
517
|
-
if (!
|
|
518
|
-
const row = await
|
|
518
|
+
if (!chunkGNPGGLAE_cjs.isLiveNodeRow(existing)) throw new chunkSAFZ6JTI_cjs.NodeNotFoundError(kind, id);
|
|
519
|
+
const row = await chunk5ELKD2FQ_cjs.applyNodeUpdate(
|
|
519
520
|
writeContext,
|
|
520
521
|
{ ...shared, existing },
|
|
521
522
|
backend
|
|
@@ -543,13 +544,13 @@ async function primeBatchValidationCaches(ctx, drafts, backend, seams) {
|
|
|
543
544
|
const groups = /* @__PURE__ */ new Map();
|
|
544
545
|
for (const draft of drafts) {
|
|
545
546
|
for (const constraint of draft.uniqueConstraints) {
|
|
546
|
-
if (!
|
|
547
|
-
const key =
|
|
547
|
+
if (!chunk5ELKD2FQ_cjs.checkWherePredicate(constraint, draft.validatedProps)) continue;
|
|
548
|
+
const key = chunk5ELKD2FQ_cjs.computeUniqueKey(
|
|
548
549
|
draft.validatedProps,
|
|
549
550
|
constraint.fields,
|
|
550
551
|
constraint.collation
|
|
551
552
|
);
|
|
552
|
-
const kindsToCheck =
|
|
553
|
+
const kindsToCheck = chunk5ELKD2FQ_cjs.getKindsForUniquenessCheck(
|
|
553
554
|
draft.kind,
|
|
554
555
|
constraint.scope,
|
|
555
556
|
ctx.registry
|
|
@@ -595,7 +596,7 @@ async function prepareBatchCreates(ctx, inputs, backend, options) {
|
|
|
595
596
|
seedUniqueRow
|
|
596
597
|
} = createNodeBatchValidationBackend(ctx.graphId, ctx.registry, backend);
|
|
597
598
|
const drafts = inputs.map(
|
|
598
|
-
(input) => draftNodeCreate(ctx, input, input.id ??
|
|
599
|
+
(input) => draftNodeCreate(ctx, input, input.id ?? chunk5ELKD2FQ_cjs.generateId(), options)
|
|
599
600
|
);
|
|
600
601
|
await primeBatchValidationCaches(ctx, drafts, backend, {
|
|
601
602
|
seedNodeRow,
|
|
@@ -671,7 +672,7 @@ async function batchCheckUniqueAcrossKinds(backend, graphId, constraintName, uni
|
|
|
671
672
|
}
|
|
672
673
|
async function executeNodeCreateInternal(ctx, input, backend, options) {
|
|
673
674
|
const kind = input.kind;
|
|
674
|
-
const id = input.id ??
|
|
675
|
+
const id = input.id ?? chunk5ELKD2FQ_cjs.generateId();
|
|
675
676
|
const opContext = ctx.createOperationContext("create", "node", kind, id);
|
|
676
677
|
const shouldReturnRow = options?.returnRow ?? true;
|
|
677
678
|
return runHookedWriteOperation(
|
|
@@ -690,8 +691,8 @@ async function executeNodeCreateInternal(ctx, input, backend, options) {
|
|
|
690
691
|
if (shouldReturnRow) {
|
|
691
692
|
row = await target.insertNode(prepared.insertParams);
|
|
692
693
|
} else {
|
|
693
|
-
await
|
|
694
|
-
|
|
694
|
+
await chunk5ELKD2FQ_cjs.runInsertNoReturn(
|
|
695
|
+
chunk5ELKD2FQ_cjs.nodeInsertDispatch(target),
|
|
695
696
|
prepared.insertParams
|
|
696
697
|
);
|
|
697
698
|
}
|
|
@@ -707,7 +708,7 @@ async function executeNodeCreate(ctx, input, backend, options) {
|
|
|
707
708
|
...options
|
|
708
709
|
});
|
|
709
710
|
if (!result) {
|
|
710
|
-
throw new
|
|
711
|
+
throw new chunkSAFZ6JTI_cjs.DatabaseOperationError(
|
|
711
712
|
"Node create failed: expected created node row",
|
|
712
713
|
{ operation: "insert", entity: "node" }
|
|
713
714
|
);
|
|
@@ -722,7 +723,7 @@ async function executeNodeCreateNoReturnBatch(ctx, inputs, backend) {
|
|
|
722
723
|
inputs,
|
|
723
724
|
target
|
|
724
725
|
);
|
|
725
|
-
await
|
|
726
|
+
await chunk5ELKD2FQ_cjs.runInsertBatch(chunk5ELKD2FQ_cjs.nodeInsertDispatch(target), batchInsertParams);
|
|
726
727
|
await finalizeNodeCreateBatch(ctx, preparedCreates, target, lock);
|
|
727
728
|
});
|
|
728
729
|
}
|
|
@@ -735,8 +736,8 @@ async function executeNodeCreateBatch(ctx, inputs, backend, options) {
|
|
|
735
736
|
target,
|
|
736
737
|
options
|
|
737
738
|
);
|
|
738
|
-
const rows = await
|
|
739
|
-
|
|
739
|
+
const rows = await chunk5ELKD2FQ_cjs.runInsertBatchReturning(
|
|
740
|
+
chunk5ELKD2FQ_cjs.nodeInsertDispatch(target),
|
|
740
741
|
batchInsertParams
|
|
741
742
|
);
|
|
742
743
|
await finalizeNodeCreateBatch(ctx, preparedCreates, target, lock);
|
|
@@ -775,9 +776,9 @@ async function executeNodeDelete(ctx, kind, id, backend) {
|
|
|
775
776
|
async (target, lock) => {
|
|
776
777
|
const registration = getNodeRegistration(ctx.graph, kind);
|
|
777
778
|
const preflight = await target.getNode(ctx.graphId, kind, id);
|
|
778
|
-
if (!preflight || !
|
|
779
|
-
await
|
|
780
|
-
|
|
779
|
+
if (!preflight || !chunkGNPGGLAE_cjs.isLiveNodeRow(preflight)) return;
|
|
780
|
+
await chunk5ELKD2FQ_cjs.applyNodeSoftDelete(
|
|
781
|
+
chunk5ELKD2FQ_cjs.createNodeWriteContext(ctx.graphId, ctx.registry, lock),
|
|
781
782
|
{
|
|
782
783
|
existing: preflight,
|
|
783
784
|
schema: registration.type.schema,
|
|
@@ -799,8 +800,8 @@ async function executeNodeHardDelete(ctx, kind, id, backend) {
|
|
|
799
800
|
backend,
|
|
800
801
|
async (target, lock) => {
|
|
801
802
|
const registration = getNodeRegistration(ctx.graph, kind);
|
|
802
|
-
await
|
|
803
|
-
|
|
803
|
+
await chunk5ELKD2FQ_cjs.applyNodeHardDelete(
|
|
804
|
+
chunk5ELKD2FQ_cjs.createNodeWriteContext(ctx.graphId, ctx.registry, lock),
|
|
804
805
|
{
|
|
805
806
|
kind,
|
|
806
807
|
id,
|
|
@@ -816,12 +817,12 @@ async function executeNodeGetOrCreateByConstraint(ctx, kind, constraintName, pro
|
|
|
816
817
|
const ifExists = options?.ifExists ?? "return";
|
|
817
818
|
const registration = getNodeRegistration(ctx.graph, kind);
|
|
818
819
|
const nodeKind = registration.type;
|
|
819
|
-
const validatedProps =
|
|
820
|
+
const validatedProps = chunkX4PVHAZ6_cjs.validateNodeProps(nodeKind.schema, props, {
|
|
820
821
|
kind,
|
|
821
822
|
operation: "create"
|
|
822
823
|
});
|
|
823
824
|
const constraint = resolveConstraint(ctx.graph, kind, constraintName);
|
|
824
|
-
if (!
|
|
825
|
+
if (!chunk5ELKD2FQ_cjs.checkWherePredicate(constraint, validatedProps)) {
|
|
825
826
|
const node = await executeNodeCreate(
|
|
826
827
|
ctx,
|
|
827
828
|
{ kind, props: validatedProps },
|
|
@@ -830,12 +831,12 @@ async function executeNodeGetOrCreateByConstraint(ctx, kind, constraintName, pro
|
|
|
830
831
|
);
|
|
831
832
|
return { node, action: "created" };
|
|
832
833
|
}
|
|
833
|
-
const key =
|
|
834
|
+
const key = chunk5ELKD2FQ_cjs.computeUniqueKey(
|
|
834
835
|
validatedProps,
|
|
835
836
|
constraint.fields,
|
|
836
837
|
constraint.collation
|
|
837
838
|
);
|
|
838
|
-
const kindsToCheck =
|
|
839
|
+
const kindsToCheck = chunk5ELKD2FQ_cjs.getKindsForUniquenessCheck(
|
|
839
840
|
kind,
|
|
840
841
|
constraint.scope,
|
|
841
842
|
ctx.registry
|
|
@@ -892,25 +893,25 @@ async function executeNodeGetOrCreateByConstraint(ctx, kind, constraintName, pro
|
|
|
892
893
|
try {
|
|
893
894
|
return await attempt();
|
|
894
895
|
} catch (error) {
|
|
895
|
-
if (!(error instanceof
|
|
896
|
+
if (!(error instanceof chunkSAFZ6JTI_cjs.UniquenessError)) throw error;
|
|
896
897
|
return attempt();
|
|
897
898
|
}
|
|
898
899
|
}
|
|
899
900
|
async function executeNodeFindByConstraint(ctx, kind, constraintName, props, backend) {
|
|
900
901
|
const registration = getNodeRegistration(ctx.graph, kind);
|
|
901
902
|
const nodeKind = registration.type;
|
|
902
|
-
const validatedProps =
|
|
903
|
+
const validatedProps = chunkX4PVHAZ6_cjs.validateNodeProps(nodeKind.schema, props, {
|
|
903
904
|
kind,
|
|
904
905
|
operation: "create"
|
|
905
906
|
});
|
|
906
907
|
const constraint = resolveConstraint(ctx.graph, kind, constraintName);
|
|
907
|
-
if (!
|
|
908
|
-
const key =
|
|
908
|
+
if (!chunk5ELKD2FQ_cjs.checkWherePredicate(constraint, validatedProps)) return void 0;
|
|
909
|
+
const key = chunk5ELKD2FQ_cjs.computeUniqueKey(
|
|
909
910
|
validatedProps,
|
|
910
911
|
constraint.fields,
|
|
911
912
|
constraint.collation
|
|
912
913
|
);
|
|
913
|
-
const kindsToCheck =
|
|
914
|
+
const kindsToCheck = chunk5ELKD2FQ_cjs.getKindsForUniquenessCheck(
|
|
914
915
|
kind,
|
|
915
916
|
constraint.scope,
|
|
916
917
|
ctx.registry
|
|
@@ -936,12 +937,12 @@ async function executeNodeFindByConstraint(ctx, kind, constraintName, props, bac
|
|
|
936
937
|
function validateAndComputeKeys(nodeKind, kind, constraint, items) {
|
|
937
938
|
const validated = [];
|
|
938
939
|
for (const item of items) {
|
|
939
|
-
const validatedProps =
|
|
940
|
+
const validatedProps = chunkX4PVHAZ6_cjs.validateNodeProps(nodeKind.schema, item.props, {
|
|
940
941
|
kind,
|
|
941
942
|
operation: "create"
|
|
942
943
|
});
|
|
943
|
-
const applies =
|
|
944
|
-
const key = applies ?
|
|
944
|
+
const applies = chunk5ELKD2FQ_cjs.checkWherePredicate(constraint, validatedProps);
|
|
945
|
+
const key = applies ? chunk5ELKD2FQ_cjs.computeUniqueKey(
|
|
945
946
|
validatedProps,
|
|
946
947
|
constraint.fields,
|
|
947
948
|
constraint.collation
|
|
@@ -964,7 +965,7 @@ async function executeNodeBulkFindByConstraint(ctx, kind, constraintName, items,
|
|
|
964
965
|
const constraint = resolveConstraint(ctx.graph, kind, constraintName);
|
|
965
966
|
const validated = validateAndComputeKeys(nodeKind, kind, constraint, items);
|
|
966
967
|
const uniqueKeys = collectUniqueKeys(validated);
|
|
967
|
-
const kindsToCheck =
|
|
968
|
+
const kindsToCheck = chunk5ELKD2FQ_cjs.getKindsForUniquenessCheck(
|
|
968
969
|
kind,
|
|
969
970
|
constraint.scope,
|
|
970
971
|
ctx.registry
|
|
@@ -1014,10 +1015,10 @@ function resolveNodeIndex(graph, kind, indexName) {
|
|
|
1014
1015
|
(candidate) => candidate.entity === "node" && candidate.kind === kind && candidate.name === indexName
|
|
1015
1016
|
);
|
|
1016
1017
|
if (declaration?.entity !== "node") {
|
|
1017
|
-
throw new
|
|
1018
|
+
throw new chunkSAFZ6JTI_cjs.NodeIndexNotFoundError(indexName, kind);
|
|
1018
1019
|
}
|
|
1019
1020
|
if (declaration.method !== void 0) {
|
|
1020
|
-
throw new
|
|
1021
|
+
throw new chunkSAFZ6JTI_cjs.ConfigurationError(
|
|
1021
1022
|
`bulkFindByIndex cannot probe index "${indexName}" (method "${declaration.method}"): only btree indexes serve equality probes.`,
|
|
1022
1023
|
{ indexName, kind, method: declaration.method }
|
|
1023
1024
|
);
|
|
@@ -1055,7 +1056,7 @@ function validateIndexProbeValue(value, valueType, pointer, kind) {
|
|
|
1055
1056
|
}
|
|
1056
1057
|
}
|
|
1057
1058
|
function indexProbeTypeError(pointer, kind, expected, value) {
|
|
1058
|
-
return new
|
|
1059
|
+
return new chunkSAFZ6JTI_cjs.ValidationError(
|
|
1059
1060
|
`Index probe value for "${pointer}" on node kind "${kind}" has an incompatible type`,
|
|
1060
1061
|
{
|
|
1061
1062
|
entityType: "node",
|
|
@@ -1089,7 +1090,7 @@ async function executeNodeBulkFindByIndex(ctx, kind, indexName, items, backend,
|
|
|
1089
1090
|
if (items.length === 0) return [];
|
|
1090
1091
|
const index = resolveNodeIndex(ctx.graph, kind, indexName);
|
|
1091
1092
|
if (index.fields.length === 0) {
|
|
1092
|
-
throw new
|
|
1093
|
+
throw new chunkSAFZ6JTI_cjs.ConfigurationError(
|
|
1093
1094
|
`bulkFindByIndex requires an index with at least one prop-based field on index "${indexName}" (node kind "${kind}")`,
|
|
1094
1095
|
{ indexName, kind },
|
|
1095
1096
|
{
|
|
@@ -1098,7 +1099,7 @@ async function executeNodeBulkFindByIndex(ctx, kind, indexName, items, backend,
|
|
|
1098
1099
|
);
|
|
1099
1100
|
}
|
|
1100
1101
|
if (index.fieldValueTypes.includes("date")) {
|
|
1101
|
-
throw new
|
|
1102
|
+
throw new chunkSAFZ6JTI_cjs.ConfigurationError(
|
|
1102
1103
|
`bulkFindByIndex does not support date-typed key fields on index "${indexName}" (node kind "${kind}")`,
|
|
1103
1104
|
{ indexName, kind },
|
|
1104
1105
|
{
|
|
@@ -1108,7 +1109,7 @@ async function executeNodeBulkFindByIndex(ctx, kind, indexName, items, backend,
|
|
|
1108
1109
|
}
|
|
1109
1110
|
const limitPerInput = options?.limitPerInput;
|
|
1110
1111
|
if (limitPerInput !== void 0 && (!Number.isInteger(limitPerInput) || limitPerInput <= 0)) {
|
|
1111
|
-
throw new
|
|
1112
|
+
throw new chunkSAFZ6JTI_cjs.ValidationError(
|
|
1112
1113
|
"bulkFindByIndex limitPerInput must be a positive integer",
|
|
1113
1114
|
{
|
|
1114
1115
|
entityType: "node",
|
|
@@ -1123,7 +1124,7 @@ async function executeNodeBulkFindByIndex(ctx, kind, indexName, items, backend,
|
|
|
1123
1124
|
}
|
|
1124
1125
|
);
|
|
1125
1126
|
}
|
|
1126
|
-
const adapter =
|
|
1127
|
+
const adapter = chunkUH2USOMG_cjs.getDialect(backend.dialect);
|
|
1127
1128
|
const probes = items.map(
|
|
1128
1129
|
(item) => index.fields.map((pointer, position) => {
|
|
1129
1130
|
const value = chunkTDXIBCGY_cjs.resolveJsonPointer(item.props, pointer);
|
|
@@ -1150,47 +1151,47 @@ async function executeNodeBulkFindByIndex(ctx, kind, indexName, items, backend,
|
|
|
1150
1151
|
}
|
|
1151
1152
|
groupToInputs[existing]?.push(inputIndex);
|
|
1152
1153
|
}
|
|
1153
|
-
const schema = backend.tableNames ?
|
|
1154
|
+
const schema = backend.tableNames ? chunk5ELKD2FQ_cjs.createSqlSchema(backend.tableNames) : chunk5ELKD2FQ_cjs.DEFAULT_SQL_SCHEMA;
|
|
1154
1155
|
const compileContext = {
|
|
1155
1156
|
dialect: backend.dialect,
|
|
1156
|
-
propsColumn:
|
|
1157
|
-
systemColumn: (column) =>
|
|
1157
|
+
propsColumn: chunkX6RDQ5NB_cjs.sql.raw(`"props"`),
|
|
1158
|
+
systemColumn: (column) => chunkX6RDQ5NB_cjs.sql.raw(`"${column}"`)
|
|
1158
1159
|
};
|
|
1159
|
-
const fieldKeys =
|
|
1160
|
+
const fieldKeys = chunkUH2USOMG_cjs.compileNodeIndexFieldKeys(index, compileContext);
|
|
1160
1161
|
const groupPredicates = groupProbes.map(
|
|
1161
|
-
(probe) =>
|
|
1162
|
+
(probe) => chunkX6RDQ5NB_cjs.sql`(${chunkX6RDQ5NB_cjs.sql.join(
|
|
1162
1163
|
fieldKeys.map((fieldKey, position) => {
|
|
1163
1164
|
const value = probe[position];
|
|
1164
1165
|
if (value === void 0 || value === null) {
|
|
1165
|
-
return
|
|
1166
|
+
return chunkX6RDQ5NB_cjs.sql`${fieldKey} IS NULL`;
|
|
1166
1167
|
}
|
|
1167
1168
|
return adapter.nullSafeEquals(
|
|
1168
1169
|
fieldKey,
|
|
1169
|
-
|
|
1170
|
+
chunkX6RDQ5NB_cjs.sql`${coerceIndexProbeBind(value, adapter)}`
|
|
1170
1171
|
);
|
|
1171
1172
|
}),
|
|
1172
|
-
|
|
1173
|
+
chunkX6RDQ5NB_cjs.sql` AND `
|
|
1173
1174
|
)})`
|
|
1174
1175
|
);
|
|
1175
1176
|
const caseBranches = groupPredicates.map(
|
|
1176
|
-
(predicate, group) =>
|
|
1177
|
+
(predicate, group) => chunkX6RDQ5NB_cjs.sql`WHEN ${predicate} THEN ${chunkX6RDQ5NB_cjs.sql.raw(String(group))}`
|
|
1177
1178
|
);
|
|
1178
|
-
const probeIndexExpr =
|
|
1179
|
+
const probeIndexExpr = chunkX6RDQ5NB_cjs.sql`CASE ${chunkX6RDQ5NB_cjs.sql.join(caseBranches, chunkX6RDQ5NB_cjs.sql` `)} ELSE NULL END`;
|
|
1179
1180
|
const conditions = [
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1181
|
+
chunkX6RDQ5NB_cjs.sql`"graph_id" = ${ctx.graphId}`,
|
|
1182
|
+
chunkX6RDQ5NB_cjs.sql`"kind" = ${kind}`,
|
|
1183
|
+
chunkX6RDQ5NB_cjs.sql`"deleted_at" IS NULL`
|
|
1183
1184
|
];
|
|
1184
1185
|
if (index.where !== void 0) {
|
|
1185
|
-
conditions.push(
|
|
1186
|
+
conditions.push(chunkUH2USOMG_cjs.compileIndexWhere(compileContext, index.where));
|
|
1186
1187
|
}
|
|
1187
|
-
conditions.push(
|
|
1188
|
-
const whereClause =
|
|
1189
|
-
const probedSelect =
|
|
1188
|
+
conditions.push(chunkX6RDQ5NB_cjs.sql`(${chunkX6RDQ5NB_cjs.sql.join(groupPredicates, chunkX6RDQ5NB_cjs.sql` OR `)})`);
|
|
1189
|
+
const whereClause = chunkX6RDQ5NB_cjs.sql.join(conditions, chunkX6RDQ5NB_cjs.sql` AND `);
|
|
1190
|
+
const probedSelect = chunkX6RDQ5NB_cjs.sql`SELECT "id", ${probeIndexExpr} AS probe_idx FROM ${schema.nodesTable} WHERE ${whereClause}`;
|
|
1190
1191
|
const capInSql = limitPerInput !== void 0 && backend.capabilities.windowFunctions;
|
|
1191
|
-
const query = capInSql ?
|
|
1192
|
+
const query = capInSql ? chunkX6RDQ5NB_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"` : chunkX6RDQ5NB_cjs.sql`${probedSelect} ORDER BY probe_idx, "id"`;
|
|
1192
1193
|
const rawMatches = await backend.execute(
|
|
1193
|
-
|
|
1194
|
+
chunkX6RDQ5NB_cjs.asCompiledRowsSql(query)
|
|
1194
1195
|
);
|
|
1195
1196
|
const matches = limitPerInput !== void 0 && !capInSql ? capMatchesPerGroup(rawMatches, limitPerInput) : rawMatches;
|
|
1196
1197
|
const nodesById = await hydrateNodesById(
|
|
@@ -1223,7 +1224,7 @@ function capMatchesPerGroup(matches, limitPerInput) {
|
|
|
1223
1224
|
return capped;
|
|
1224
1225
|
}
|
|
1225
1226
|
async function hydrateNodesById(backend, graphId, kind, ids) {
|
|
1226
|
-
const rowsById = await
|
|
1227
|
+
const rowsById = await chunk5ELKD2FQ_cjs.getNodeRowsByIds(backend, graphId, kind, ids);
|
|
1227
1228
|
const nodesById = /* @__PURE__ */ new Map();
|
|
1228
1229
|
for (const [id, row] of rowsById) {
|
|
1229
1230
|
if (row.deleted_at !== void 0) continue;
|
|
@@ -1239,7 +1240,7 @@ async function executeNodeBulkGetOrCreateByConstraint(ctx, kind, constraintName,
|
|
|
1239
1240
|
const constraint = resolveConstraint(ctx.graph, kind, constraintName);
|
|
1240
1241
|
const validated = validateAndComputeKeys(nodeKind, kind, constraint, items);
|
|
1241
1242
|
const uniqueKeys = collectUniqueKeys(validated);
|
|
1242
|
-
const kindsToCheck =
|
|
1243
|
+
const kindsToCheck = chunk5ELKD2FQ_cjs.getKindsForUniquenessCheck(
|
|
1243
1244
|
kind,
|
|
1244
1245
|
constraint.scope,
|
|
1245
1246
|
ctx.registry
|
|
@@ -1291,7 +1292,7 @@ async function executeNodeBulkGetOrCreateByConstraint(ctx, kind, constraintName,
|
|
|
1291
1292
|
);
|
|
1292
1293
|
for (const [batchIndex, entry] of toCreate.entries()) {
|
|
1293
1294
|
results[entry.index] = {
|
|
1294
|
-
node: createdNodes[batchIndex],
|
|
1295
|
+
node: chunk764JHTLT_cjs.requireDefined(createdNodes[batchIndex]),
|
|
1295
1296
|
action: "created"
|
|
1296
1297
|
};
|
|
1297
1298
|
}
|
|
@@ -1333,7 +1334,7 @@ async function executeNodeBulkGetOrCreateByConstraint(ctx, kind, constraintName,
|
|
|
1333
1334
|
}
|
|
1334
1335
|
}
|
|
1335
1336
|
for (const { index, sourceIndex } of duplicateOf) {
|
|
1336
|
-
const sourceResult = results[sourceIndex];
|
|
1337
|
+
const sourceResult = chunk764JHTLT_cjs.requireDefined(results[sourceIndex]);
|
|
1337
1338
|
results[index] = { node: sourceResult.node, action: "found" };
|
|
1338
1339
|
}
|
|
1339
1340
|
return results;
|
|
@@ -1361,5 +1362,5 @@ exports.rowToNode = rowToNode;
|
|
|
1361
1362
|
exports.rowToNodeMeta = rowToNodeMeta;
|
|
1362
1363
|
exports.runHookedWriteOperation = runHookedWriteOperation;
|
|
1363
1364
|
exports.runInWriteTransaction = runInWriteTransaction;
|
|
1364
|
-
//# sourceMappingURL=chunk-
|
|
1365
|
-
//# sourceMappingURL=chunk-
|
|
1365
|
+
//# sourceMappingURL=chunk-E2Q7SP2K.cjs.map
|
|
1366
|
+
//# sourceMappingURL=chunk-E2Q7SP2K.cjs.map
|