@nicia-ai/typegraph 0.44.0 → 0.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/backend/drizzle/indexes.cjs +7 -7
- package/dist/backend/drizzle/indexes.d.cts +1 -1
- package/dist/backend/drizzle/indexes.d.ts +1 -1
- package/dist/backend/drizzle/indexes.js +3 -3
- package/dist/backend/index.cjs +37 -37
- package/dist/backend/index.d.cts +3 -3
- package/dist/backend/index.d.ts +3 -3
- package/dist/backend/index.js +6 -6
- package/dist/backend/postgres/index.cjs +23 -23
- package/dist/backend/postgres/index.d.cts +6 -6
- package/dist/backend/postgres/index.d.ts +6 -6
- package/dist/backend/postgres/index.js +10 -10
- package/dist/backend/postgres/pglite-store.cjs +24 -25
- package/dist/backend/postgres/pglite-store.cjs.map +1 -1
- package/dist/backend/postgres/pglite-store.d.cts +7 -7
- package/dist/backend/postgres/pglite-store.d.ts +7 -7
- package/dist/backend/postgres/pglite-store.js +20 -21
- package/dist/backend/postgres/pglite-store.js.map +1 -1
- package/dist/backend/postgres/pglite.cjs +12 -12
- package/dist/backend/postgres/pglite.d.cts +3 -3
- package/dist/backend/postgres/pglite.d.ts +3 -3
- package/dist/backend/postgres/pglite.js +11 -11
- package/dist/backend/sqlite/index.cjs +21 -21
- package/dist/backend/sqlite/index.d.cts +6 -6
- package/dist/backend/sqlite/index.d.ts +6 -6
- package/dist/backend/sqlite/index.js +9 -9
- package/dist/backend/sqlite/libsql.cjs +14 -14
- package/dist/backend/sqlite/libsql.cjs.map +1 -1
- package/dist/backend/sqlite/libsql.d.cts +3 -3
- package/dist/backend/sqlite/libsql.d.ts +3 -3
- package/dist/backend/sqlite/libsql.js +10 -10
- package/dist/backend/sqlite/libsql.js.map +1 -1
- package/dist/backend/sqlite/local-store.cjs +25 -26
- package/dist/backend/sqlite/local-store.cjs.map +1 -1
- package/dist/backend/sqlite/local-store.d.cts +8 -8
- package/dist/backend/sqlite/local-store.d.ts +8 -8
- package/dist/backend/sqlite/local-store.js +21 -22
- package/dist/backend/sqlite/local-store.js.map +1 -1
- package/dist/backend/sqlite/local.cjs +13 -13
- package/dist/backend/sqlite/local.d.cts +3 -3
- package/dist/backend/sqlite/local.d.ts +3 -3
- package/dist/backend/sqlite/local.js +11 -11
- package/dist/{chunk-TVLKA4AY.js → chunk-42PYUGLS.js} +57 -3
- package/dist/chunk-42PYUGLS.js.map +1 -0
- package/dist/{chunk-IJTLXNGJ.js → chunk-4GUBTVPV.js} +3 -4
- package/dist/chunk-4GUBTVPV.js.map +1 -0
- package/dist/{chunk-63KCKSSH.js → chunk-4GUTQPVO.js} +33 -9
- package/dist/chunk-4GUTQPVO.js.map +1 -0
- package/dist/{chunk-FGO5JFVJ.cjs → chunk-4MEWSUVM.cjs} +10 -10
- package/dist/chunk-4MEWSUVM.cjs.map +1 -0
- package/dist/{chunk-FMGEZBAQ.js → chunk-4QIKLIGG.js} +15 -3
- package/dist/chunk-4QIKLIGG.js.map +1 -0
- package/dist/{chunk-FMMIX6N4.js → chunk-55ITBQJI.js} +2 -2
- package/dist/chunk-55ITBQJI.js.map +1 -0
- package/dist/{chunk-TCRIQMBU.js → chunk-5EKPX6QU.js} +4 -4
- package/dist/{chunk-TCRIQMBU.js.map → chunk-5EKPX6QU.js.map} +1 -1
- package/dist/{chunk-GFRGG2US.cjs → chunk-5GAONX5G.cjs} +7 -7
- package/dist/{chunk-GFRGG2US.cjs.map → chunk-5GAONX5G.cjs.map} +1 -1
- package/dist/{chunk-ALFUGRYB.cjs → chunk-6RYPD3NJ.cjs} +29 -29
- package/dist/{chunk-ALFUGRYB.cjs.map → chunk-6RYPD3NJ.cjs.map} +1 -1
- package/dist/{chunk-QGKILWGZ.cjs → chunk-7PF2L3H6.cjs} +4 -4
- package/dist/{chunk-QGKILWGZ.cjs.map → chunk-7PF2L3H6.cjs.map} +1 -1
- package/dist/chunk-B3F2D3SP.cjs +12 -0
- package/dist/{chunk-EPTSMFH7.cjs.map → chunk-B3F2D3SP.cjs.map} +1 -1
- package/dist/{chunk-7G32LIQM.js → chunk-BGYJW37L.js} +5 -5
- package/dist/{chunk-7G32LIQM.js.map → chunk-BGYJW37L.js.map} +1 -1
- package/dist/{chunk-EE7N5XXQ.cjs → chunk-BNS75YNF.cjs} +9 -10
- package/dist/chunk-BNS75YNF.cjs.map +1 -0
- package/dist/{chunk-VITTKBWF.js → chunk-CBKG6HEP.js} +5 -5
- package/dist/{chunk-VITTKBWF.js.map → chunk-CBKG6HEP.js.map} +1 -1
- package/dist/{chunk-A4PBRX4C.cjs → chunk-D54WH24V.cjs} +57 -2
- package/dist/chunk-D54WH24V.cjs.map +1 -0
- package/dist/{chunk-MCHP7RHZ.cjs → chunk-D56XG4EI.cjs} +26 -14
- package/dist/chunk-D56XG4EI.cjs.map +1 -0
- package/dist/{chunk-SQRD2CYF.js → chunk-DXEEHSGN.js} +293 -45
- package/dist/chunk-DXEEHSGN.js.map +1 -0
- package/dist/{chunk-GWEDD3DH.js → chunk-EFEOOCJ3.js} +4 -4
- package/dist/{chunk-GWEDD3DH.js.map → chunk-EFEOOCJ3.js.map} +1 -1
- package/dist/{chunk-3PRKZW6D.cjs → chunk-EKFUG4G7.cjs} +2 -2
- package/dist/chunk-EKFUG4G7.cjs.map +1 -0
- package/dist/{chunk-HJH3RMXG.cjs → chunk-F4NHQHEZ.cjs} +4 -4
- package/dist/{chunk-HJH3RMXG.cjs.map → chunk-F4NHQHEZ.cjs.map} +1 -1
- package/dist/{chunk-46GDII45.js → chunk-FL5UQRES.js} +3 -3
- package/dist/{chunk-46GDII45.js.map → chunk-FL5UQRES.js.map} +1 -1
- package/dist/{chunk-TFMVL4QH.js → chunk-FLEQ2HBK.js} +3 -3
- package/dist/{chunk-TFMVL4QH.js.map → chunk-FLEQ2HBK.js.map} +1 -1
- package/dist/{chunk-BEFM74L2.js → chunk-FQ7ZPOTZ.js} +6 -6
- package/dist/{chunk-BEFM74L2.js.map → chunk-FQ7ZPOTZ.js.map} +1 -1
- package/dist/{chunk-ST3LPB2V.cjs → chunk-H7VE3FL4.cjs} +318 -70
- package/dist/chunk-H7VE3FL4.cjs.map +1 -0
- package/dist/{chunk-BCP7LLOY.js → chunk-ID4WXTKL.js} +367 -41
- package/dist/{chunk-BCP7LLOY.js.map → chunk-ID4WXTKL.js.map} +1 -1
- package/dist/{chunk-EFELJVLA.js → chunk-ISLPNELU.js} +15 -3
- package/dist/chunk-ISLPNELU.js.map +1 -0
- package/dist/{chunk-A2I2XO52.cjs → chunk-IX64T5OL.cjs} +4 -4
- package/dist/{chunk-A2I2XO52.cjs.map → chunk-IX64T5OL.cjs.map} +1 -1
- package/dist/{chunk-QYWINYEA.cjs → chunk-J2ICGNHO.cjs} +5 -6
- package/dist/chunk-J2ICGNHO.cjs.map +1 -0
- package/dist/{chunk-7V2FGGI2.cjs → chunk-J7LXTUTP.cjs} +54 -12
- package/dist/chunk-J7LXTUTP.cjs.map +1 -0
- package/dist/{chunk-WBUFJ7BS.cjs → chunk-JQXSZHF2.cjs} +12 -2
- package/dist/chunk-JQXSZHF2.cjs.map +1 -0
- package/dist/{chunk-OVUUTCPJ.cjs → chunk-JXUTCSXX.cjs} +28 -2
- package/dist/chunk-JXUTCSXX.cjs.map +1 -0
- package/dist/{chunk-66UVLHQA.cjs → chunk-KMXWZLQX.cjs} +14 -14
- package/dist/{chunk-66UVLHQA.cjs.map → chunk-KMXWZLQX.cjs.map} +1 -1
- package/dist/{chunk-STQ3BSED.cjs → chunk-NAAMUYMS.cjs} +23 -11
- package/dist/chunk-NAAMUYMS.cjs.map +1 -0
- package/dist/{chunk-NN3QSOVS.cjs → chunk-OOA273IJ.cjs} +14 -14
- package/dist/{chunk-NN3QSOVS.cjs.map → chunk-OOA273IJ.cjs.map} +1 -1
- package/dist/{chunk-OSZPLZIV.cjs → chunk-P7GTYOLB.cjs} +130 -106
- package/dist/chunk-P7GTYOLB.cjs.map +1 -0
- package/dist/{chunk-K3BUWSFR.js → chunk-PVUI6KGR.js} +28 -2
- package/dist/chunk-PVUI6KGR.js.map +1 -0
- package/dist/{chunk-SBPC5IP3.js → chunk-Q6EDCUXV.js} +242 -10
- package/dist/chunk-Q6EDCUXV.js.map +1 -0
- package/dist/{chunk-2BIG7U6E.cjs → chunk-QC4MCOFV.cjs} +5 -5
- package/dist/{chunk-2BIG7U6E.cjs.map → chunk-QC4MCOFV.cjs.map} +1 -1
- package/dist/{chunk-JRP3VGHS.js → chunk-QLUXRWKL.js} +3 -3
- package/dist/{chunk-JRP3VGHS.js.map → chunk-QLUXRWKL.js.map} +1 -1
- package/dist/{chunk-IIT5K7SK.cjs → chunk-QR24DJDF.cjs} +6 -6
- package/dist/{chunk-IIT5K7SK.cjs.map → chunk-QR24DJDF.cjs.map} +1 -1
- package/dist/{chunk-HOIFFY4M.js → chunk-QRNYDV5Z.js} +48 -21
- package/dist/chunk-QRNYDV5Z.js.map +1 -0
- package/dist/{chunk-FRHHDHKH.js → chunk-RFRM3Q5K.js} +15 -3
- package/dist/chunk-RFRM3Q5K.js.map +1 -0
- package/dist/{chunk-ATLN63JA.js → chunk-RUQS6M7G.js} +5 -5
- package/dist/chunk-RUQS6M7G.js.map +1 -0
- package/dist/{chunk-XMYJY7NI.js → chunk-S3ZRKJHY.js} +3 -3
- package/dist/{chunk-XMYJY7NI.js.map → chunk-S3ZRKJHY.js.map} +1 -1
- package/dist/{chunk-FSXTPBRN.js → chunk-TKORQCG4.js} +49 -7
- package/dist/chunk-TKORQCG4.js.map +1 -0
- package/dist/{chunk-2Y4IFKW7.js → chunk-TKP5T34P.js} +3 -4
- package/dist/chunk-TKP5T34P.js.map +1 -0
- package/dist/{chunk-NCX65HBY.cjs → chunk-UCQ3BFSY.cjs} +301 -68
- package/dist/chunk-UCQ3BFSY.cjs.map +1 -0
- package/dist/{chunk-B75XRV3O.js → chunk-V34A6R5V.js} +12 -3
- package/dist/chunk-V34A6R5V.js.map +1 -0
- package/dist/{chunk-BNUFUFAU.js → chunk-VTN3C3CH.js} +6 -6
- package/dist/chunk-VTN3C3CH.js.map +1 -0
- package/dist/{chunk-5MUSU4ZP.cjs → chunk-VVQM4CZD.cjs} +12 -12
- package/dist/chunk-VVQM4CZD.cjs.map +1 -0
- package/dist/{chunk-IIMQJYAM.js → chunk-WDAVPX46.js} +3 -3
- package/dist/{chunk-IIMQJYAM.js.map → chunk-WDAVPX46.js.map} +1 -1
- package/dist/{chunk-YNULOIR5.cjs → chunk-WDBXJOU5.cjs} +28 -16
- package/dist/chunk-WDBXJOU5.cjs.map +1 -0
- package/dist/{chunk-PAW2XUZN.js → chunk-WUFASQUO.js} +3 -3
- package/dist/{chunk-PAW2XUZN.js.map → chunk-WUFASQUO.js.map} +1 -1
- package/dist/{chunk-PDGEXGS6.cjs → chunk-YDWLUT5V.cjs} +136 -109
- package/dist/chunk-YDWLUT5V.cjs.map +1 -0
- package/dist/{chunk-PHXITZE4.js → chunk-YMTXMPV6.js} +3 -3
- package/dist/{chunk-PHXITZE4.js.map → chunk-YMTXMPV6.js.map} +1 -1
- package/dist/{chunk-XR4YZFKW.cjs → chunk-YOALGKRE.cjs} +690 -364
- package/dist/chunk-YOALGKRE.cjs.map +1 -0
- package/dist/{chunk-6JZUSDY2.cjs → chunk-Z3WO6MND.cjs} +27 -27
- package/dist/{chunk-6JZUSDY2.cjs.map → chunk-Z3WO6MND.cjs.map} +1 -1
- package/dist/{chunk-2VLBGQBY.cjs → chunk-ZI6VQSZA.cjs} +37 -37
- package/dist/{chunk-2VLBGQBY.cjs.map → chunk-ZI6VQSZA.cjs.map} +1 -1
- package/dist/core/index.cjs +10 -11
- package/dist/core/index.d.cts +5 -5
- package/dist/core/index.d.ts +5 -5
- package/dist/core/index.js +3 -4
- package/dist/{ddl-eWg7hx6R.d.cts → ddl-BG4J805L.d.cts} +3 -3
- package/dist/{ddl-D5369kOY.d.ts → ddl-CgiS9QLj.d.ts} +3 -3
- package/dist/{define-graph-SvYXOl78.d.ts → define-graph-BGrJahvp.d.ts} +1 -1
- package/dist/{define-graph-DVF-oN1i.d.cts → define-graph-alREY2wj.d.cts} +1 -1
- package/dist/graph-extension/index.cjs +18 -19
- package/dist/graph-extension/index.d.cts +4 -4
- package/dist/graph-extension/index.d.ts +4 -4
- package/dist/graph-extension/index.js +3 -4
- package/dist/graph-merge/index.cjs +89 -90
- package/dist/graph-merge/index.cjs.map +1 -1
- package/dist/graph-merge/index.d.cts +9 -9
- package/dist/graph-merge/index.d.ts +9 -9
- package/dist/graph-merge/index.js +16 -17
- package/dist/graph-merge/index.js.map +1 -1
- package/dist/{index-By89Sezh.d.ts → index-BBxZCUdu.d.ts} +2 -2
- package/dist/{index-DcQ3Sxs-.d.cts → index-C3y_98iN.d.cts} +2 -2
- package/dist/index.cjs +124 -125
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -13
- package/dist/index.d.ts +13 -13
- package/dist/index.js +23 -24
- package/dist/index.js.map +1 -1
- package/dist/indexes/index.cjs +11 -11
- package/dist/indexes/index.d.cts +4 -4
- package/dist/indexes/index.d.ts +4 -4
- package/dist/indexes/index.js +4 -4
- package/dist/interchange/index.cjs +27 -26
- package/dist/interchange/index.cjs.map +1 -1
- package/dist/interchange/index.d.cts +7 -7
- package/dist/interchange/index.d.ts +7 -7
- package/dist/interchange/index.js +8 -7
- package/dist/interchange/index.js.map +1 -1
- package/dist/{manager-Cn0NFIhN.d.cts → manager-KS7CGQQT.d.cts} +3 -3
- package/dist/{manager-B0KjKE93.d.ts → manager-YoLEfcc1.d.ts} +3 -3
- package/dist/{materialize-indexes-BD4V3svD.d.ts → materialize-indexes-Bhhyb1B3.d.ts} +1 -1
- package/dist/{materialize-indexes-DVRhd5h4.d.cts → materialize-indexes-OHRWypW6.d.cts} +1 -1
- package/dist/{postgres-DaEWvN4x.d.cts → postgres-DpkW3R5Y.d.cts} +1 -1
- package/dist/{postgres-u0a0HN2D.d.ts → postgres-DwqyIniy.d.ts} +1 -1
- package/dist/profiler/index.d.cts +10 -10
- package/dist/profiler/index.d.ts +10 -10
- package/dist/provenance/index.cjs +15 -15
- package/dist/provenance/index.cjs.map +1 -1
- package/dist/provenance/index.d.cts +7 -7
- package/dist/provenance/index.d.ts +7 -7
- package/dist/provenance/index.js +3 -3
- package/dist/provenance/index.js.map +1 -1
- package/dist/schema/index.cjs +30 -31
- package/dist/schema/index.d.cts +7 -7
- package/dist/schema/index.d.ts +7 -7
- package/dist/schema/index.js +8 -9
- package/dist/{searchable-BT7j9_IK.d.cts → searchable-CIZL8Hyw.d.cts} +2 -2
- package/dist/{searchable-CnYEancP.d.ts → searchable-DLWEfC4a.d.ts} +2 -2
- package/dist/{sqlite-BrMoSsI7.d.cts → sqlite-DY0WODUK.d.cts} +1 -1
- package/dist/{sqlite-CHhZUyO5.d.ts → sqlite-L-VIRzqA.d.ts} +1 -1
- package/dist/{store-view-Bvdku0Ht.d.ts → store-view-66p92IPi.d.ts} +1887 -1811
- package/dist/{store-view-w-md0nQ4.d.cts → store-view-A85FFRnk.d.cts} +1887 -1811
- package/dist/{temporal-BCORwUau.d.cts → temporal-BNbjXqer.d.cts} +1 -1
- package/dist/{temporal--x9T8K4S.d.ts → temporal-Bob6Nfbp.d.ts} +1 -1
- package/dist/{types-Cjvkj0jA.d.ts → types-Ch9a0Dx6.d.cts} +141 -17
- package/dist/{types-Cjvkj0jA.d.cts → types-Ch9a0Dx6.d.ts} +141 -17
- package/dist/{types-COODtTJU.d.ts → types-ClCzT-dT.d.ts} +1 -1
- package/dist/{types-6-WJmSD4.d.cts → types-DeORZhxn.d.cts} +1 -1
- package/dist/{where-CUQmCR6d.d.cts → where-DPw52ksb.d.cts} +1 -1
- package/dist/{where-5xVawAwL.d.ts → where-kWUZPvEA.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/chunk-2WDD2NO3.js +0 -59
- package/dist/chunk-2WDD2NO3.js.map +0 -1
- package/dist/chunk-2Y4IFKW7.js.map +0 -1
- package/dist/chunk-3PRKZW6D.cjs.map +0 -1
- package/dist/chunk-5MUSU4ZP.cjs.map +0 -1
- package/dist/chunk-63KCKSSH.js.map +0 -1
- package/dist/chunk-7V2FGGI2.cjs.map +0 -1
- package/dist/chunk-A4PBRX4C.cjs.map +0 -1
- package/dist/chunk-ATLN63JA.js.map +0 -1
- package/dist/chunk-B75XRV3O.js.map +0 -1
- package/dist/chunk-BNUFUFAU.js.map +0 -1
- package/dist/chunk-EE7N5XXQ.cjs.map +0 -1
- package/dist/chunk-EFELJVLA.js.map +0 -1
- package/dist/chunk-EPTSMFH7.cjs +0 -12
- package/dist/chunk-FGO5JFVJ.cjs.map +0 -1
- package/dist/chunk-FMGEZBAQ.js.map +0 -1
- package/dist/chunk-FMMIX6N4.js.map +0 -1
- package/dist/chunk-FRHHDHKH.js.map +0 -1
- package/dist/chunk-FSXTPBRN.js.map +0 -1
- package/dist/chunk-HOHAJ2NR.cjs +0 -61
- package/dist/chunk-HOHAJ2NR.cjs.map +0 -1
- package/dist/chunk-HOIFFY4M.js.map +0 -1
- package/dist/chunk-IJTLXNGJ.js.map +0 -1
- package/dist/chunk-K3BUWSFR.js.map +0 -1
- package/dist/chunk-MCHP7RHZ.cjs.map +0 -1
- package/dist/chunk-NCX65HBY.cjs.map +0 -1
- package/dist/chunk-OSZPLZIV.cjs.map +0 -1
- package/dist/chunk-OVUUTCPJ.cjs.map +0 -1
- package/dist/chunk-PDGEXGS6.cjs.map +0 -1
- package/dist/chunk-QYWINYEA.cjs.map +0 -1
- package/dist/chunk-SBPC5IP3.js.map +0 -1
- package/dist/chunk-SQRD2CYF.js.map +0 -1
- package/dist/chunk-ST3LPB2V.cjs.map +0 -1
- package/dist/chunk-STQ3BSED.cjs.map +0 -1
- package/dist/chunk-TVLKA4AY.js.map +0 -1
- package/dist/chunk-WBUFJ7BS.cjs.map +0 -1
- package/dist/chunk-XR4YZFKW.cjs.map +0 -1
- package/dist/chunk-YNULOIR5.cjs.map +0 -1
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { formatPostgresTimestamp, coerceNumericScore, nowIso } from './chunk-
|
|
2
|
-
import { runtimeStrategyContributions } from './chunk-
|
|
3
|
-
import { toDrizzleSql } from './chunk-
|
|
1
|
+
import { formatPostgresTimestamp, coerceNumericScore, nowIso } from './chunk-YMTXMPV6.js';
|
|
2
|
+
import { runtimeStrategyContributions } from './chunk-BGYJW37L.js';
|
|
3
|
+
import { toDrizzleSql } from './chunk-EFEOOCJ3.js';
|
|
4
4
|
import { chunk } from './chunk-35S6P5ZU.js';
|
|
5
|
-
import { createBackendOverlay } from './chunk-
|
|
5
|
+
import { createBackendOverlay } from './chunk-55ITBQJI.js';
|
|
6
6
|
import { sortedReplacer } from './chunk-UR7W5YQK.js';
|
|
7
|
-
import { parseDimensionMismatch, isMissingTableError } from './chunk-
|
|
7
|
+
import { parseDimensionMismatch, isMissingTableError } from './chunk-V34A6R5V.js';
|
|
8
8
|
import { sha256Hex } from './chunk-K34OPSJK.js';
|
|
9
|
+
import { getDialect } from './chunk-PVUI6KGR.js';
|
|
9
10
|
import { sql as sql$1, asCompiledStatementSql, isSqlFragment } from './chunk-6DCB664D.js';
|
|
10
11
|
import { isPresent } from './chunk-QMQLUA66.js';
|
|
11
12
|
import { EmbeddingDimensionChangedError, ConfigurationError, StaleVersionError, MigrationError, SchemaContentConflictError, DatabaseOperationError, UniquenessError, TrustedImportError, StoreNotInitializedError } from './chunk-4MB3AQAQ.js';
|
|
@@ -13,23 +14,68 @@ import { sql, is, getTableName } from 'drizzle-orm';
|
|
|
13
14
|
|
|
14
15
|
// src/backend/edge-endpoint-sets.ts
|
|
15
16
|
var FIND_EDGES_ENDPOINT_FIXED_PARAM_COUNT = 6;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
if (limitPerEndpoint
|
|
19
|
-
|
|
20
|
-
`findEdgesByEndpointSet \`limitPerEndpoint\` must be a positive integer, received ${String(limitPerEndpoint)}.`,
|
|
21
|
-
{
|
|
22
|
-
code: "EDGE_ENDPOINT_SET_INVALID",
|
|
23
|
-
graphId: params.graphId,
|
|
24
|
-
kind: params.kind
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
suggestion: "Pass a positive integer to cap each endpoint's rows, or omit it for an unbounded read."
|
|
28
|
-
}
|
|
29
|
-
);
|
|
17
|
+
var FIND_EDGES_HETEROGENEOUS_FIXED_PARAM_COUNT = 4;
|
|
18
|
+
function assertLimitPerEndpoint(operation, graphId, limitPerEndpoint, kind) {
|
|
19
|
+
if (limitPerEndpoint === void 0 || Number.isInteger(limitPerEndpoint) && limitPerEndpoint > 0) {
|
|
20
|
+
return;
|
|
30
21
|
}
|
|
22
|
+
throw new ConfigurationError(
|
|
23
|
+
`${operation} \`limitPerEndpoint\` must be a positive integer, received ${String(limitPerEndpoint)}.`,
|
|
24
|
+
{
|
|
25
|
+
code: "EDGE_ENDPOINT_SET_INVALID",
|
|
26
|
+
graphId,
|
|
27
|
+
...kind === void 0 ? {} : { kind }
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
suggestion: "Pass a positive integer to cap each endpoint's rows, or omit it for an unbounded read."
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
function resolveEdgeEndpointIds(params) {
|
|
35
|
+
assertLimitPerEndpoint(
|
|
36
|
+
"findEdgesByEndpointSet",
|
|
37
|
+
params.graphId,
|
|
38
|
+
params.limitPerEndpoint,
|
|
39
|
+
params.kind
|
|
40
|
+
);
|
|
31
41
|
return [...new Set(params.endpointIds)];
|
|
32
42
|
}
|
|
43
|
+
function endpointKey(endpoint) {
|
|
44
|
+
return `${endpoint.kind}\0${endpoint.id}`;
|
|
45
|
+
}
|
|
46
|
+
function resolveHeterogeneousEdgeRead(params, maxBindParameters) {
|
|
47
|
+
assertLimitPerEndpoint(
|
|
48
|
+
"findEdgesByHeterogeneousEndpointSet",
|
|
49
|
+
params.graphId,
|
|
50
|
+
params.limitPerEndpoint
|
|
51
|
+
);
|
|
52
|
+
const edgeKinds = [...new Set(params.edgeKinds)];
|
|
53
|
+
const endpoints = [
|
|
54
|
+
...new Map(
|
|
55
|
+
params.endpoints.map((endpoint) => [endpointKey(endpoint), endpoint])
|
|
56
|
+
).values()
|
|
57
|
+
];
|
|
58
|
+
if (edgeKinds.length === 0 || endpoints.length === 0) {
|
|
59
|
+
return { edgeKinds, endpoints, endpointChunkSize: 1 };
|
|
60
|
+
}
|
|
61
|
+
const endpointBindBudget = maxBindParameters - FIND_EDGES_HETEROGENEOUS_FIXED_PARAM_COUNT - edgeKinds.length;
|
|
62
|
+
const endpointChunkSize = Math.floor(endpointBindBudget / 2);
|
|
63
|
+
if (endpointChunkSize >= 1) {
|
|
64
|
+
return { edgeKinds, endpoints, endpointChunkSize };
|
|
65
|
+
}
|
|
66
|
+
throw new ConfigurationError(
|
|
67
|
+
"findEdgesByHeterogeneousEndpointSet cannot fit one endpoint and the selected edge kinds within the backend bind-parameter budget.",
|
|
68
|
+
{
|
|
69
|
+
code: "EDGE_HETEROGENEOUS_READ_BIND_BUDGET_EXCEEDED",
|
|
70
|
+
graphId: params.graphId,
|
|
71
|
+
edgeKindCount: edgeKinds.length,
|
|
72
|
+
maxBindParameters
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
suggestion: "Select fewer edge kinds in one call or use a backend with a larger bind-parameter budget."
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
}
|
|
33
79
|
|
|
34
80
|
// src/backend/live-node-candidates.ts
|
|
35
81
|
function buildLiveNodeCandidates(nodesTableName, graphId, nodeKind, now) {
|
|
@@ -159,6 +205,9 @@ function diagnoseContribution(row, signature, tableExists) {
|
|
|
159
205
|
if (row.materializedAt !== void 0) return "orphaned-marker";
|
|
160
206
|
return row.lastError === void 0 ? void 0 : "failed-materialization";
|
|
161
207
|
}
|
|
208
|
+
if (row?.materializedAt !== void 0 && row.signature !== signature) {
|
|
209
|
+
return "stale";
|
|
210
|
+
}
|
|
162
211
|
const state = evaluateContributionState(row, signature);
|
|
163
212
|
switch (state) {
|
|
164
213
|
case "initialized": {
|
|
@@ -354,6 +403,7 @@ function createContributionMaterializer(deps) {
|
|
|
354
403
|
}
|
|
355
404
|
async function ensureContributions(graphId, contributions, options) {
|
|
356
405
|
const force = options?.force === true;
|
|
406
|
+
const bypassCache = options?.bypassCache === true;
|
|
357
407
|
const entries = await Promise.all(
|
|
358
408
|
contributions.map(async (contribution) => {
|
|
359
409
|
const key = contributionKey(graphId, contribution);
|
|
@@ -364,7 +414,13 @@ function createContributionMaterializer(deps) {
|
|
|
364
414
|
};
|
|
365
415
|
})
|
|
366
416
|
);
|
|
367
|
-
|
|
417
|
+
if (bypassCache) {
|
|
418
|
+
for (const entry of entries) {
|
|
419
|
+
uncacheableKeys.add(entry.key);
|
|
420
|
+
initializedSignatures.delete(entry.key);
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
const pending = force || bypassCache ? entries : entries.filter(
|
|
368
424
|
(entry) => uncacheableKeys.has(entry.key) || initializedSignatures.get(entry.key) !== entry.signature
|
|
369
425
|
);
|
|
370
426
|
if (pending.length === 0) return;
|
|
@@ -469,11 +525,11 @@ function createContributionMaterializer(deps) {
|
|
|
469
525
|
await assertContributions(graphId, contributions);
|
|
470
526
|
}
|
|
471
527
|
}
|
|
472
|
-
|
|
473
|
-
const
|
|
528
|
+
function verificationTargetsByGraph(graphId, vectorSlots) {
|
|
529
|
+
const targets = /* @__PURE__ */ new Map();
|
|
474
530
|
function addTarget(id, target) {
|
|
475
|
-
const existing =
|
|
476
|
-
if (existing === void 0)
|
|
531
|
+
const existing = targets.get(id);
|
|
532
|
+
if (existing === void 0) targets.set(id, [target]);
|
|
477
533
|
else existing.push(target);
|
|
478
534
|
}
|
|
479
535
|
for (const contribution of runtimeContributions()) {
|
|
@@ -491,6 +547,10 @@ function createContributionMaterializer(deps) {
|
|
|
491
547
|
}
|
|
492
548
|
}
|
|
493
549
|
}
|
|
550
|
+
return targets;
|
|
551
|
+
}
|
|
552
|
+
async function diagnoseContributions(graphId, vectorSlots) {
|
|
553
|
+
const targetsByGraph = verificationTargetsByGraph(graphId, vectorSlots);
|
|
494
554
|
const probes = /* @__PURE__ */ new Map();
|
|
495
555
|
function tableExists(tableName) {
|
|
496
556
|
const pending = probes.get(tableName);
|
|
@@ -499,7 +559,7 @@ function createContributionMaterializer(deps) {
|
|
|
499
559
|
probes.set(tableName, probe);
|
|
500
560
|
return probe;
|
|
501
561
|
}
|
|
502
|
-
const
|
|
562
|
+
const diagnosed = [];
|
|
503
563
|
for (const [id, targets] of targetsByGraph) {
|
|
504
564
|
const read = await readMarkerRows(id);
|
|
505
565
|
const rows = read.kind === "rows" ? read.rows : /* @__PURE__ */ new Map();
|
|
@@ -512,22 +572,56 @@ function createContributionMaterializer(deps) {
|
|
|
512
572
|
await tableExists(contribution.tableName)
|
|
513
573
|
);
|
|
514
574
|
if (state === void 0) continue;
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
575
|
+
diagnosed.push({
|
|
576
|
+
graphId: id,
|
|
577
|
+
contribution,
|
|
578
|
+
diagnostic: {
|
|
579
|
+
owner: contribution.owner,
|
|
580
|
+
logicalName: contribution.logicalName,
|
|
581
|
+
physicalName: contribution.tableName,
|
|
582
|
+
...kind === void 0 ? {} : { kind },
|
|
583
|
+
...fieldPath === void 0 ? {} : { fieldPath },
|
|
584
|
+
state,
|
|
585
|
+
// The recorded reason, carried through verbatim. `state` folds
|
|
586
|
+
// several marker verdicts together because they share a repair;
|
|
587
|
+
// this is what keeps the fold from also discarding the one thing
|
|
588
|
+
// the catalog can never tell the operator.
|
|
589
|
+
...row?.lastError === void 0 ? {} : { lastError: row.lastError }
|
|
590
|
+
}
|
|
591
|
+
});
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
return diagnosed;
|
|
595
|
+
}
|
|
596
|
+
async function verifyContributions(graphId, vectorSlots) {
|
|
597
|
+
const diagnosed = await diagnoseContributions(graphId, vectorSlots);
|
|
598
|
+
return diagnosed.map((entry) => entry.diagnostic);
|
|
599
|
+
}
|
|
600
|
+
async function repairContributions(graphId, vectorSlots) {
|
|
601
|
+
const diagnosed = await diagnoseContributions(graphId, vectorSlots);
|
|
602
|
+
const results = [];
|
|
603
|
+
for (const { graphId: targetGraphId, contribution, diagnostic } of diagnosed) {
|
|
604
|
+
if (diagnostic.state === "stale" || diagnostic.state === "orphaned-marker") {
|
|
605
|
+
results.push({ diagnostic, status: "requires-rebuild" });
|
|
606
|
+
continue;
|
|
607
|
+
}
|
|
608
|
+
try {
|
|
609
|
+
await ensureContributions(targetGraphId, [contribution], {
|
|
610
|
+
bypassCache: true
|
|
611
|
+
});
|
|
612
|
+
results.push({ diagnostic, status: "repaired" });
|
|
613
|
+
} catch (error) {
|
|
614
|
+
results.push({
|
|
615
|
+
diagnostic,
|
|
616
|
+
status: "failed",
|
|
617
|
+
error: error instanceof Error ? error.message : String(error)
|
|
527
618
|
});
|
|
528
619
|
}
|
|
529
620
|
}
|
|
530
|
-
return
|
|
621
|
+
return {
|
|
622
|
+
results,
|
|
623
|
+
remaining: await verifyContributions(graphId, vectorSlots)
|
|
624
|
+
};
|
|
531
625
|
}
|
|
532
626
|
function evictVectorSlot(slot) {
|
|
533
627
|
if (deps.vectorStrategy === void 0) return;
|
|
@@ -557,7 +651,8 @@ function createContributionMaterializer(deps) {
|
|
|
557
651
|
assertVectorSlots,
|
|
558
652
|
dropVectorSlot,
|
|
559
653
|
evictVectorSlot,
|
|
560
|
-
verifyContributions
|
|
654
|
+
verifyContributions,
|
|
655
|
+
repairContributions
|
|
561
656
|
};
|
|
562
657
|
}
|
|
563
658
|
var SQLITE_INDEX_MAT_TIMESTAMPS = {
|
|
@@ -1007,6 +1102,58 @@ function buildFindEdgesByEndpointSet(tables, params, endpointIds) {
|
|
|
1007
1102
|
ORDER BY ${derivedOrderByClause}
|
|
1008
1103
|
`;
|
|
1009
1104
|
}
|
|
1105
|
+
function buildFindEdgesByHeterogeneousEndpointSet(tables, params, endpoints, edgeKinds) {
|
|
1106
|
+
const { edges } = tables;
|
|
1107
|
+
const fromSide = params.side === "from";
|
|
1108
|
+
const kindColumn = fromSide ? edges.fromKind : edges.toKind;
|
|
1109
|
+
const idColumn = fromSide ? edges.fromId : edges.toId;
|
|
1110
|
+
const requestedKind = sql.raw(`requested_endpoints."endpoint_kind"`);
|
|
1111
|
+
const requestedId = sql.raw(`requested_endpoints."endpoint_id"`);
|
|
1112
|
+
const requestedRows = sql.join(
|
|
1113
|
+
endpoints.map((endpoint) => sql`(${endpoint.kind}, ${endpoint.id})`),
|
|
1114
|
+
sql`, `
|
|
1115
|
+
);
|
|
1116
|
+
const whereClause = sql.join(
|
|
1117
|
+
[
|
|
1118
|
+
sql`${edges.graphId} = ${params.graphId}`,
|
|
1119
|
+
buildIdSetCondition(edges.kind, edgeKinds),
|
|
1120
|
+
...buildTemporalConditions(edges, params)
|
|
1121
|
+
],
|
|
1122
|
+
sql` AND `
|
|
1123
|
+
);
|
|
1124
|
+
const joinClause = sql`
|
|
1125
|
+
FROM ${edges}
|
|
1126
|
+
INNER JOIN requested_endpoints
|
|
1127
|
+
ON ${kindColumn} = ${requestedKind}
|
|
1128
|
+
AND ${idColumn} = ${requestedId}
|
|
1129
|
+
WHERE ${whereClause}
|
|
1130
|
+
`;
|
|
1131
|
+
const { qualified: orderByClause, bare: derivedOrderByClause } = buildEdgeOrdering(tables, void 0);
|
|
1132
|
+
if (params.limitPerEndpoint === void 0) {
|
|
1133
|
+
return sql`
|
|
1134
|
+
WITH requested_endpoints(endpoint_kind, endpoint_id) AS (
|
|
1135
|
+
VALUES ${requestedRows}
|
|
1136
|
+
)
|
|
1137
|
+
SELECT ${edges}.*
|
|
1138
|
+
${joinClause}
|
|
1139
|
+
ORDER BY ${orderByClause}
|
|
1140
|
+
`;
|
|
1141
|
+
}
|
|
1142
|
+
const ranked = sql`
|
|
1143
|
+
SELECT ${edges}.*, ROW_NUMBER() OVER (
|
|
1144
|
+
PARTITION BY ${kindColumn}, ${idColumn} ORDER BY ${orderByClause}
|
|
1145
|
+
) AS endpoint_rank
|
|
1146
|
+
${joinClause}
|
|
1147
|
+
`;
|
|
1148
|
+
return sql`
|
|
1149
|
+
WITH requested_endpoints(endpoint_kind, endpoint_id) AS (
|
|
1150
|
+
VALUES ${requestedRows}
|
|
1151
|
+
)
|
|
1152
|
+
SELECT * FROM (${ranked}) AS ranked_edges
|
|
1153
|
+
WHERE endpoint_rank <= ${params.limitPerEndpoint}
|
|
1154
|
+
ORDER BY ${derivedOrderByClause}
|
|
1155
|
+
`;
|
|
1156
|
+
}
|
|
1010
1157
|
function buildCountEdgesByKind(tables, params) {
|
|
1011
1158
|
const { edges } = tables;
|
|
1012
1159
|
const conditions = [
|
|
@@ -1416,6 +1563,37 @@ function buildUpdateNode(tables, params, timestamp) {
|
|
|
1416
1563
|
RETURNING *
|
|
1417
1564
|
`;
|
|
1418
1565
|
}
|
|
1566
|
+
function buildUpdateNodeSet(tables, dialect, params, timestamp) {
|
|
1567
|
+
const { nodes } = tables;
|
|
1568
|
+
const adapter = getDialect(dialect);
|
|
1569
|
+
const patchedProps = toDrizzleSql(
|
|
1570
|
+
adapter.jsonSetProperties(
|
|
1571
|
+
sql$1.identifier(nodes.props.name),
|
|
1572
|
+
params.patch,
|
|
1573
|
+
params.unsetProperties ?? []
|
|
1574
|
+
),
|
|
1575
|
+
dialect
|
|
1576
|
+
);
|
|
1577
|
+
const candidateIds = toDrizzleSql(params.candidateIds, dialect);
|
|
1578
|
+
const candidateIdColumn = toDrizzleSql(
|
|
1579
|
+
sql$1.identifier(params.candidateIdColumn),
|
|
1580
|
+
dialect
|
|
1581
|
+
);
|
|
1582
|
+
return sql`
|
|
1583
|
+
UPDATE ${nodes}
|
|
1584
|
+
SET ${quotedColumn(nodes.props)} = ${patchedProps},
|
|
1585
|
+
${quotedColumn(nodes.updatedAt)} = ${timestamp},
|
|
1586
|
+
${quotedColumn(nodes.version)} = ${quotedColumn(nodes.version)} + 1
|
|
1587
|
+
WHERE ${nodes.graphId} = ${params.graphId}
|
|
1588
|
+
AND ${nodes.kind} = ${params.kind}
|
|
1589
|
+
AND ${nodes.deletedAt} IS NULL
|
|
1590
|
+
AND ${nodes.id} IN (
|
|
1591
|
+
SELECT ${candidateIdColumn}
|
|
1592
|
+
FROM (${candidateIds}) AS tg_set_candidates
|
|
1593
|
+
)
|
|
1594
|
+
RETURNING *
|
|
1595
|
+
`;
|
|
1596
|
+
}
|
|
1419
1597
|
function buildDeleteNode(tables, params, timestamp) {
|
|
1420
1598
|
const { nodes } = tables;
|
|
1421
1599
|
return sql`
|
|
@@ -1651,12 +1829,23 @@ function buildDeleteUnique(tables, params, timestamp) {
|
|
|
1651
1829
|
AND ${uniques.deletedAt} IS NULL
|
|
1652
1830
|
`;
|
|
1653
1831
|
}
|
|
1654
|
-
function buildHardDeleteUniquesByNode(tables, graphId, nodeId) {
|
|
1832
|
+
function buildHardDeleteUniquesByNode(tables, graphId, concreteKind, nodeId) {
|
|
1833
|
+
return buildHardDeleteUniquesByNodeIds(tables, {
|
|
1834
|
+
graphId,
|
|
1835
|
+
concreteKind,
|
|
1836
|
+
nodeIds: [nodeId]
|
|
1837
|
+
});
|
|
1838
|
+
}
|
|
1839
|
+
function buildHardDeleteUniquesByNodeIds(tables, params) {
|
|
1655
1840
|
const { uniques } = tables;
|
|
1656
1841
|
return sql`
|
|
1657
1842
|
DELETE FROM ${uniques}
|
|
1658
|
-
WHERE ${uniques.graphId} = ${graphId}
|
|
1659
|
-
AND ${uniques.
|
|
1843
|
+
WHERE ${uniques.graphId} = ${params.graphId}
|
|
1844
|
+
AND ${uniques.concreteKind} = ${params.concreteKind}
|
|
1845
|
+
AND ${uniques.nodeId} IN (${sql.join(
|
|
1846
|
+
params.nodeIds.map((nodeId) => sql`${nodeId}`),
|
|
1847
|
+
sql`, `
|
|
1848
|
+
)})
|
|
1660
1849
|
`;
|
|
1661
1850
|
}
|
|
1662
1851
|
function buildCheckUnique(tables, params) {
|
|
@@ -1745,9 +1934,11 @@ var COMMON_TABLE_OPERATION_BUILDERS = {
|
|
|
1745
1934
|
buildCountNodesByKind,
|
|
1746
1935
|
buildFindEdgesByKind,
|
|
1747
1936
|
buildFindEdgesByEndpointSet,
|
|
1937
|
+
buildFindEdgesByHeterogeneousEndpointSet,
|
|
1748
1938
|
buildCountEdgesByKind,
|
|
1749
1939
|
buildDeleteUnique,
|
|
1750
1940
|
buildHardDeleteUniquesByNode,
|
|
1941
|
+
buildHardDeleteUniquesByNodeIds,
|
|
1751
1942
|
buildCheckUnique,
|
|
1752
1943
|
buildCheckUniqueBatch,
|
|
1753
1944
|
buildGetSchemaVersion
|
|
@@ -1837,6 +2028,9 @@ function createCommonOperationStrategy(tables, dialect, fulltextStrategy) {
|
|
|
1837
2028
|
return {
|
|
1838
2029
|
...tableOperations,
|
|
1839
2030
|
...fulltextBuilders,
|
|
2031
|
+
buildUpdateNodeSet(params, timestamp) {
|
|
2032
|
+
return buildUpdateNodeSet(tables, dialect, params, timestamp);
|
|
2033
|
+
},
|
|
1840
2034
|
buildDeleteContributionMaterialization,
|
|
1841
2035
|
buildInsertUnique(params) {
|
|
1842
2036
|
return buildInsertUnique(tables, dialect, params);
|
|
@@ -1967,7 +2161,13 @@ async function commitSchemaVersionIfKindsEmpty(backend, params, probes) {
|
|
|
1967
2161
|
};
|
|
1968
2162
|
}
|
|
1969
2163
|
function createCommonOperationBackend(options) {
|
|
1970
|
-
const {
|
|
2164
|
+
const {
|
|
2165
|
+
batchConfig,
|
|
2166
|
+
execution,
|
|
2167
|
+
maxBindParameters,
|
|
2168
|
+
operationStrategy,
|
|
2169
|
+
rowMappers
|
|
2170
|
+
} = options;
|
|
1971
2171
|
const nowIso2 = options.nowIso ?? nowIso;
|
|
1972
2172
|
const tableExists = createCachedTableExistence(
|
|
1973
2173
|
(tableName) => execution.execGet(
|
|
@@ -2069,6 +2269,25 @@ function createCommonOperationBackend(options) {
|
|
|
2069
2269
|
);
|
|
2070
2270
|
return rowMappers.toNodeRow(row);
|
|
2071
2271
|
},
|
|
2272
|
+
async updateNodeSet(params) {
|
|
2273
|
+
if (Object.keys(params.patch).length === 0 && (params.unsetProperties?.length ?? 0) === 0) {
|
|
2274
|
+
throw new ConfigurationError(
|
|
2275
|
+
"Set-based node update requires at least one property",
|
|
2276
|
+
{ operation: "updateNodeSet", kind: params.kind }
|
|
2277
|
+
);
|
|
2278
|
+
}
|
|
2279
|
+
if (params.candidateIdColumn.length === 0) {
|
|
2280
|
+
throw new ConfigurationError(
|
|
2281
|
+
"Set-based node update requires a candidate id column",
|
|
2282
|
+
{ operation: "updateNodeSet", kind: params.kind }
|
|
2283
|
+
);
|
|
2284
|
+
}
|
|
2285
|
+
const timestamp = nowIso2();
|
|
2286
|
+
const query = operationStrategy.buildUpdateNodeSet(params, timestamp);
|
|
2287
|
+
const rows = await execution.execAll(query);
|
|
2288
|
+
const updatedRows = rows.map((row) => rowMappers.toNodeRow(row));
|
|
2289
|
+
return { affectedCount: updatedRows.length, rows: updatedRows };
|
|
2290
|
+
},
|
|
2072
2291
|
async deleteNode(params) {
|
|
2073
2292
|
const timestamp = nowIso2();
|
|
2074
2293
|
const query = operationStrategy.buildDeleteNode(params, timestamp);
|
|
@@ -2086,6 +2305,7 @@ function createCommonOperationBackend(options) {
|
|
|
2086
2305
|
async hardDeleteNode(params) {
|
|
2087
2306
|
const deleteUniquesQuery = operationStrategy.buildHardDeleteUniquesByNode(
|
|
2088
2307
|
params.graphId,
|
|
2308
|
+
params.kind,
|
|
2089
2309
|
params.id
|
|
2090
2310
|
);
|
|
2091
2311
|
await execution.execRun(deleteUniquesQuery);
|
|
@@ -2260,6 +2480,21 @@ function createCommonOperationBackend(options) {
|
|
|
2260
2480
|
}
|
|
2261
2481
|
return edgeRows;
|
|
2262
2482
|
},
|
|
2483
|
+
async findEdgesByHeterogeneousEndpointSet(params) {
|
|
2484
|
+
const { edgeKinds, endpoints, endpointChunkSize } = resolveHeterogeneousEdgeRead(params, maxBindParameters);
|
|
2485
|
+
if (edgeKinds.length === 0 || endpoints.length === 0) return [];
|
|
2486
|
+
const edgeRows = [];
|
|
2487
|
+
for (const endpointChunk of chunk(endpoints, endpointChunkSize)) {
|
|
2488
|
+
const query = operationStrategy.buildFindEdgesByHeterogeneousEndpointSet(
|
|
2489
|
+
params,
|
|
2490
|
+
endpointChunk,
|
|
2491
|
+
edgeKinds
|
|
2492
|
+
);
|
|
2493
|
+
const rows = await execution.execAll(query);
|
|
2494
|
+
for (const row of rows) edgeRows.push(rowMappers.toEdgeRow(row));
|
|
2495
|
+
}
|
|
2496
|
+
return edgeRows;
|
|
2497
|
+
},
|
|
2263
2498
|
async countEdgesByKind(params) {
|
|
2264
2499
|
const query = operationStrategy.buildCountEdgesByKind(params);
|
|
2265
2500
|
const row = await execution.execGet(query);
|
|
@@ -2330,6 +2565,19 @@ function createCommonOperationBackend(options) {
|
|
|
2330
2565
|
const query = operationStrategy.buildDeleteUnique(params, timestamp);
|
|
2331
2566
|
await execution.execRun(query);
|
|
2332
2567
|
},
|
|
2568
|
+
async hardDeleteUniquesByNodeIds(params) {
|
|
2569
|
+
const nodeIds = [...new Set(params.nodeIds)];
|
|
2570
|
+
for (const chunk2 of chunk(
|
|
2571
|
+
nodeIds,
|
|
2572
|
+
batchConfig.uniqueDeleteChunkSize
|
|
2573
|
+
)) {
|
|
2574
|
+
const query = operationStrategy.buildHardDeleteUniquesByNodeIds({
|
|
2575
|
+
...params,
|
|
2576
|
+
nodeIds: chunk2
|
|
2577
|
+
});
|
|
2578
|
+
await execution.execRun(query);
|
|
2579
|
+
}
|
|
2580
|
+
},
|
|
2333
2581
|
async checkUnique(params) {
|
|
2334
2582
|
const query = operationStrategy.buildCheckUnique(params);
|
|
2335
2583
|
const row = await execution.execGet(query);
|
|
@@ -2731,5 +2979,5 @@ function getOrCreateLru(cache, key, cacheMax, create) {
|
|
|
2731
2979
|
}
|
|
2732
2980
|
|
|
2733
2981
|
export { EMBEDDING_UPSERT_PARAM_COUNT, FIND_EDGES_ENDPOINT_FIXED_PARAM_COUNT, POSTGRES_CONTRIBUTION_MAT_TIMESTAMPS, POSTGRES_INDEX_MAT_TIMESTAMPS, POSTGRES_KIND_REMOVAL_TIMESTAMPS, SQLITE_CONTRIBUTION_MAT_TIMESTAMPS, SQLITE_INDEX_MAT_TIMESTAMPS, SQLITE_KIND_REMOVAL_TIMESTAMPS, analyzeImportedTables, assertActiveSchemaVersion, assertAdoptedDialect, assertTrustedImportDatabaseEmpty, buildContributionInsertValues, buildContributionOnConflictSet, buildKindRemovalInsertValues, buildKindRemovalOnConflictSet, buildLiveNodeCandidates, buildMaterializationInsertValues, buildMaterializationOnConflictSet, commitSchemaVersionIfKindsEmpty, createCachedTableExistence, createCommonOperationBackend, createContributionMaterializer, createPostgresOperationStrategy, createPostgresTrustedImportSession, createSqliteOperationStrategy, createSqliteTrustedImportSession, gateFulltext, gateFulltextMethods, getOrCreateLru, lockPostgresTrustedImportTables, mapContributionMaterializationRow, mapHybridSearchRow, mapKindRemovalRow, mapMaterializationRow, mapVectorWriteError, restoreSecondaryIndexes, suspendPostgresSecondaryIndexes, suspendSqliteSecondaryIndexes, tableExistsFromRow, vectorSlotFromCreateIndexParams, vectorSlotFromDropIndexParams, vectorSlotFromParams };
|
|
2734
|
-
//# sourceMappingURL=chunk-
|
|
2735
|
-
//# sourceMappingURL=chunk-
|
|
2982
|
+
//# sourceMappingURL=chunk-DXEEHSGN.js.map
|
|
2983
|
+
//# sourceMappingURL=chunk-DXEEHSGN.js.map
|