@nicia-ai/typegraph 0.65.0 → 0.66.1
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/CHANGELOG.md +33 -0
- package/dist/{atomic-mutation-program-BznZQ06C.d.ts → atomic-mutation-program-BhP75Qn0.d.ts} +1 -1
- package/dist/{atomic-mutation-program-Bfu5z-je.d.cts → atomic-mutation-program-DMdmc4s0.d.cts} +1 -1
- package/dist/backend/drizzle/engine/index.cjs +13 -13
- package/dist/backend/drizzle/engine/index.d.cts +9 -9
- package/dist/backend/drizzle/engine/index.d.ts +9 -9
- package/dist/backend/drizzle/engine/index.js +8 -8
- package/dist/backend/drizzle/indexes.d.cts +1 -1
- package/dist/backend/drizzle/indexes.d.ts +1 -1
- package/dist/backend/index.cjs +91 -91
- package/dist/backend/index.d.cts +7 -7
- package/dist/backend/index.d.ts +7 -7
- package/dist/backend/index.js +8 -8
- package/dist/backend/postgres/index.cjs +23 -23
- package/dist/backend/postgres/index.d.cts +8 -8
- package/dist/backend/postgres/index.d.ts +8 -8
- package/dist/backend/postgres/index.js +8 -8
- package/dist/backend/postgres/pglite-store.cjs +1 -1
- package/dist/backend/postgres/pglite-store.d.cts +6 -6
- package/dist/backend/postgres/pglite-store.d.ts +6 -6
- package/dist/backend/postgres/pglite-store.js +1 -1
- package/dist/backend/postgres/pglite.cjs +10 -10
- package/dist/backend/postgres/pglite.d.cts +3 -3
- package/dist/backend/postgres/pglite.d.ts +3 -3
- package/dist/backend/postgres/pglite.js +9 -9
- package/dist/backend/sqlite/index.cjs +21 -21
- package/dist/backend/sqlite/index.d.cts +7 -7
- package/dist/backend/sqlite/index.d.ts +7 -7
- package/dist/backend/sqlite/index.js +8 -8
- package/dist/backend/sqlite/libsql.cjs +14 -14
- package/dist/backend/sqlite/libsql.d.cts +3 -3
- package/dist/backend/sqlite/libsql.d.ts +3 -3
- package/dist/backend/sqlite/libsql.js +8 -8
- package/dist/backend/sqlite/local-store.cjs +1 -1
- package/dist/backend/sqlite/local-store.d.cts +6 -6
- package/dist/backend/sqlite/local-store.d.ts +6 -6
- package/dist/backend/sqlite/local-store.js +1 -1
- package/dist/backend/sqlite/local.cjs +10 -10
- package/dist/backend/sqlite/local.d.cts +3 -3
- package/dist/backend/sqlite/local.d.ts +3 -3
- package/dist/backend/sqlite/local.js +9 -9
- package/dist/{chunk-PFXNQFFY.js → chunk-2DJKHZQ4.js} +75 -8
- package/dist/chunk-2DJKHZQ4.js.map +1 -0
- package/dist/{chunk-337ONI2I.js → chunk-3SUZXB5X.js} +146 -80
- package/dist/chunk-3SUZXB5X.js.map +1 -0
- package/dist/{chunk-4VTCIEK3.js → chunk-4TQOIBWH.js} +3 -3
- package/dist/{chunk-4VTCIEK3.js.map → chunk-4TQOIBWH.js.map} +1 -1
- package/dist/{chunk-JRWKRBI5.cjs → chunk-5JOCIMQ3.cjs} +6 -6
- package/dist/{chunk-JRWKRBI5.cjs.map → chunk-5JOCIMQ3.cjs.map} +1 -1
- package/dist/{chunk-BWQA3POT.cjs → chunk-6B3LQUYG.cjs} +206 -138
- package/dist/chunk-6B3LQUYG.cjs.map +1 -0
- package/dist/{chunk-RQPCUHIH.js → chunk-6ECNYQDW.js} +3 -3
- package/dist/{chunk-RQPCUHIH.js.map → chunk-6ECNYQDW.js.map} +1 -1
- package/dist/{chunk-OLB75LRQ.js → chunk-6GKKAQMW.js} +5 -5
- package/dist/{chunk-OLB75LRQ.js.map → chunk-6GKKAQMW.js.map} +1 -1
- package/dist/{chunk-OC5ROP7V.cjs → chunk-6JRVV2SS.cjs} +8 -2
- package/dist/chunk-6JRVV2SS.cjs.map +1 -0
- package/dist/{chunk-DSX3P4S5.cjs → chunk-76OB5RSH.cjs} +6 -6
- package/dist/{chunk-DSX3P4S5.cjs.map → chunk-76OB5RSH.cjs.map} +1 -1
- package/dist/{chunk-DHRLOQLQ.cjs → chunk-7LQTDGV5.cjs} +11 -11
- package/dist/{chunk-DHRLOQLQ.cjs.map → chunk-7LQTDGV5.cjs.map} +1 -1
- package/dist/{chunk-Q25QYSOH.js → chunk-7YJHUY4T.js} +9 -9
- package/dist/{chunk-Q25QYSOH.js.map → chunk-7YJHUY4T.js.map} +1 -1
- package/dist/{chunk-JERQGJKG.cjs → chunk-ANMCKLZQ.cjs} +18 -18
- package/dist/{chunk-JERQGJKG.cjs.map → chunk-ANMCKLZQ.cjs.map} +1 -1
- package/dist/{chunk-BBOMNH44.js → chunk-BABP4D5B.js} +3 -3
- package/dist/{chunk-BBOMNH44.js.map → chunk-BABP4D5B.js.map} +1 -1
- package/dist/{chunk-EVGZ2TRQ.js → chunk-BE75G3M5.js} +3 -3
- package/dist/{chunk-EVGZ2TRQ.js.map → chunk-BE75G3M5.js.map} +1 -1
- package/dist/{chunk-FXGZT3WO.cjs → chunk-BX42F7IJ.cjs} +41 -41
- package/dist/{chunk-FXGZT3WO.cjs.map → chunk-BX42F7IJ.cjs.map} +1 -1
- package/dist/{chunk-G6T23JU7.js → chunk-CDKNGCE7.js} +3 -3
- package/dist/{chunk-G6T23JU7.js.map → chunk-CDKNGCE7.js.map} +1 -1
- package/dist/{chunk-BNTJ5YFO.cjs → chunk-EACDHXJL.cjs} +4 -4
- package/dist/{chunk-BNTJ5YFO.cjs.map → chunk-EACDHXJL.cjs.map} +1 -1
- package/dist/{chunk-SNDJUTMB.cjs → chunk-EBQX7MYL.cjs} +72 -72
- package/dist/{chunk-SNDJUTMB.cjs.map → chunk-EBQX7MYL.cjs.map} +1 -1
- package/dist/{chunk-GKSAEUX6.js → chunk-FXOFJ4FS.js} +7 -7
- package/dist/{chunk-GKSAEUX6.js.map → chunk-FXOFJ4FS.js.map} +1 -1
- package/dist/{chunk-ZOWRACZQ.cjs → chunk-G7OKJDMG.cjs} +5 -5
- package/dist/{chunk-ZOWRACZQ.cjs.map → chunk-G7OKJDMG.cjs.map} +1 -1
- package/dist/{chunk-MKJPBSID.cjs → chunk-I7SBZJI2.cjs} +4 -4
- package/dist/{chunk-MKJPBSID.cjs.map → chunk-I7SBZJI2.cjs.map} +1 -1
- package/dist/{chunk-H346QK3V.cjs → chunk-K7YACILO.cjs} +9 -9
- package/dist/{chunk-H346QK3V.cjs.map → chunk-K7YACILO.cjs.map} +1 -1
- package/dist/{chunk-3KWF25MF.cjs → chunk-MN325MG4.cjs} +313 -246
- package/dist/chunk-MN325MG4.cjs.map +1 -0
- package/dist/{chunk-KDNRACRG.cjs → chunk-MRUOOAIQ.cjs} +4 -4
- package/dist/{chunk-KDNRACRG.cjs.map → chunk-MRUOOAIQ.cjs.map} +1 -1
- package/dist/{chunk-HTSJTWUT.js → chunk-OF63ZHSD.js} +4 -4
- package/dist/{chunk-HTSJTWUT.js.map → chunk-OF63ZHSD.js.map} +1 -1
- package/dist/{chunk-NGA3THGU.cjs → chunk-QR7W37HG.cjs} +14 -14
- package/dist/{chunk-NGA3THGU.cjs.map → chunk-QR7W37HG.cjs.map} +1 -1
- package/dist/{chunk-QFEO4M5W.js → chunk-RTPMG6LQ.js} +11 -11
- package/dist/{chunk-QFEO4M5W.js.map → chunk-RTPMG6LQ.js.map} +1 -1
- package/dist/{chunk-PFD4NUYV.js → chunk-SSDHR2C2.js} +3 -3
- package/dist/{chunk-PFD4NUYV.js.map → chunk-SSDHR2C2.js.map} +1 -1
- package/dist/{chunk-THK3SCQA.js → chunk-SYXTWPX6.js} +5 -5
- package/dist/{chunk-THK3SCQA.js.map → chunk-SYXTWPX6.js.map} +1 -1
- package/dist/{chunk-XSLQYGNR.cjs → chunk-T3VU3YRQ.cjs} +69 -69
- package/dist/{chunk-XSLQYGNR.cjs.map → chunk-T3VU3YRQ.cjs.map} +1 -1
- package/dist/{chunk-MIBWA6HX.js → chunk-TR7QTODF.js} +213 -33
- package/dist/chunk-TR7QTODF.js.map +1 -0
- package/dist/{chunk-AD3NLSV5.js → chunk-TU22BFMP.js} +8 -2
- package/dist/chunk-TU22BFMP.js.map +1 -0
- package/dist/{chunk-WTMSUIRO.js → chunk-UFKYMQJ5.js} +3 -3
- package/dist/{chunk-WTMSUIRO.js.map → chunk-UFKYMQJ5.js.map} +1 -1
- package/dist/{chunk-35LDKSMM.cjs → chunk-VNJMM2QQ.cjs} +30 -30
- package/dist/{chunk-35LDKSMM.cjs.map → chunk-VNJMM2QQ.cjs.map} +1 -1
- package/dist/{chunk-53ZEBIMD.js → chunk-WB55URNM.js} +6 -6
- package/dist/{chunk-53ZEBIMD.js.map → chunk-WB55URNM.js.map} +1 -1
- package/dist/{chunk-L2GBVYRU.cjs → chunk-WWSYGZED.cjs} +11 -11
- package/dist/{chunk-L2GBVYRU.cjs.map → chunk-WWSYGZED.cjs.map} +1 -1
- package/dist/{chunk-D2JPOFRZ.cjs → chunk-WY3IFEKV.cjs} +191 -191
- package/dist/{chunk-D2JPOFRZ.cjs.map → chunk-WY3IFEKV.cjs.map} +1 -1
- package/dist/{chunk-3RSFLZ7A.cjs → chunk-Y4X6ODVY.cjs} +943 -763
- package/dist/chunk-Y4X6ODVY.cjs.map +1 -0
- package/dist/{chunk-VZRXXABW.js → chunk-YHMXF7OZ.js} +5 -5
- package/dist/{chunk-VZRXXABW.js.map → chunk-YHMXF7OZ.js.map} +1 -1
- package/dist/{chunk-VROJKWZ7.js → chunk-ZONDBN6H.js} +5 -5
- package/dist/{chunk-VROJKWZ7.js.map → chunk-ZONDBN6H.js.map} +1 -1
- package/dist/core/index.d.cts +3 -3
- package/dist/core/index.d.ts +3 -3
- package/dist/{ddl-DvW9aobX.d.ts → ddl-2q7xLM1X.d.ts} +3 -3
- package/dist/{ddl-BjuXbPfw.d.cts → ddl-D_09BfbN.d.cts} +3 -3
- package/dist/graph-extension/index.d.cts +2 -2
- package/dist/graph-extension/index.d.ts +2 -2
- package/dist/graph-merge/index.cjs +156 -156
- package/dist/graph-merge/index.d.cts +7 -7
- package/dist/graph-merge/index.d.ts +7 -7
- package/dist/graph-merge/index.js +14 -14
- package/dist/{graph-templates-1vMqlPsu.d.cts → graph-templates-B5Q7oYAA.d.cts} +2 -2
- package/dist/{graph-templates-Y52w16dH.d.ts → graph-templates-D9N-Z9kw.d.ts} +2 -2
- package/dist/index.cjs +99 -99
- package/dist/index.d.cts +10 -10
- package/dist/index.d.ts +10 -10
- package/dist/index.js +18 -18
- package/dist/indexes/index.d.cts +4 -4
- package/dist/indexes/index.d.ts +4 -4
- package/dist/{ingestion-import-target-CCKeXZbW.d.ts → ingestion-import-target-B8EU6ug2.d.ts} +1 -1
- package/dist/{ingestion-import-target-774QRgkF.d.cts → ingestion-import-target-C5sHNFJF.d.cts} +1 -1
- package/dist/interchange/index.cjs +34 -34
- package/dist/interchange/index.d.cts +7 -7
- package/dist/interchange/index.d.ts +7 -7
- package/dist/interchange/index.js +11 -11
- package/dist/{local-store-impl-DFKS7QTV.js → local-store-impl-ERPNYOCL.js} +18 -18
- package/dist/{local-store-impl-DFKS7QTV.js.map → local-store-impl-ERPNYOCL.js.map} +1 -1
- package/dist/{local-store-impl-3E4VLFCI.cjs → local-store-impl-OUINMCYI.cjs} +22 -22
- package/dist/{local-store-impl-3E4VLFCI.cjs.map → local-store-impl-OUINMCYI.cjs.map} +1 -1
- package/dist/{pglite-store-impl-N63GGBU2.js → pglite-store-impl-DUJBQZS5.js} +18 -18
- package/dist/{pglite-store-impl-N63GGBU2.js.map → pglite-store-impl-DUJBQZS5.js.map} +1 -1
- package/dist/{pglite-store-impl-T75O3LVQ.cjs → pglite-store-impl-Z3SOOP75.cjs} +22 -22
- package/dist/{pglite-store-impl-T75O3LVQ.cjs.map → pglite-store-impl-Z3SOOP75.cjs.map} +1 -1
- package/dist/{postgres-C9gitL71.d.ts → postgres-BbTYW3b_.d.ts} +3 -3
- package/dist/{postgres-BONrXHb4.d.cts → postgres-DOBXcZVg.d.cts} +1 -1
- package/dist/{postgres-DAFRdnTr.d.ts → postgres-DhZixg92.d.ts} +1 -1
- package/dist/{postgres-2FYdVYCm.d.cts → postgres-Dp3MpyJt.d.cts} +3 -3
- package/dist/{profile-CAD65CqS.d.ts → profile-Ch5SSewK.d.ts} +8 -8
- package/dist/{profile-Bmcg07Ki.d.cts → profile-DppApFgt.d.cts} +8 -8
- package/dist/profiler/index.d.cts +8 -8
- package/dist/profiler/index.d.ts +8 -8
- package/dist/provenance/index.cjs +22 -22
- package/dist/provenance/index.d.cts +6 -6
- package/dist/provenance/index.d.ts +6 -6
- package/dist/provenance/index.js +6 -6
- package/dist/{repair-validity-windows-CinP91t7.d.cts → repair-validity-windows-CpP_GpIx.d.cts} +1 -1
- package/dist/{repair-validity-windows-BJz4nffP.d.ts → repair-validity-windows-lfe275bY.d.ts} +1 -1
- package/dist/{resolve-DgOSlXx_.d.ts → resolve-CoYqHqno.d.cts} +7 -2
- package/dist/{resolve-DQXSEN_A.d.cts → resolve-DV0Iposp.d.ts} +7 -2
- package/dist/schema/index.cjs +37 -37
- package/dist/schema/index.d.cts +7 -7
- package/dist/schema/index.d.ts +7 -7
- package/dist/schema/index.js +7 -7
- package/dist/{searchable-DMdCwkXO.d.cts → searchable-C7Xt6g45.d.cts} +1 -1
- package/dist/{searchable-BPRF0Bah.d.ts → searchable-KKXrPet3.d.ts} +1 -1
- package/dist/{sqlite-DgbYa-1Y.d.cts → sqlite-BkQM9ZeI.d.cts} +1 -1
- package/dist/{sqlite-Co_uIpfs.d.cts → sqlite-BpRtjC36.d.cts} +3 -3
- package/dist/{sqlite-DcDAAYow.d.ts → sqlite-CH0Zq0Qv.d.ts} +3 -3
- package/dist/{sqlite-UlG5prJQ.d.ts → sqlite-CcCSeXGg.d.ts} +1 -1
- package/dist/{store-HxoFyQMu.d.cts → store-3nfPQK5j.d.cts} +30 -7
- package/dist/{store-C9T1c9Az.d.ts → store-C8ZPl7OW.d.ts} +30 -7
- package/dist/{types-CRCyg1fJ.d.cts → types-BynPp5kU.d.cts} +18 -2
- package/dist/{types-CRCyg1fJ.d.ts → types-BynPp5kU.d.ts} +18 -2
- package/dist/{types-Dg_prBqC.d.ts → types-C9YwrkSe.d.ts} +1 -1
- package/dist/{types-B5AUesS1.d.cts → types-JG-4CG6P.d.cts} +1 -1
- package/dist/{where-gRyc3jj_.d.cts → where-D1gBDqQ_.d.cts} +1 -1
- package/dist/{where-D-NDKMPw.d.ts → where-D2GqMFp-.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/chunk-337ONI2I.js.map +0 -1
- package/dist/chunk-3KWF25MF.cjs.map +0 -1
- package/dist/chunk-3RSFLZ7A.cjs.map +0 -1
- package/dist/chunk-AD3NLSV5.js.map +0 -1
- package/dist/chunk-BWQA3POT.cjs.map +0 -1
- package/dist/chunk-MIBWA6HX.js.map +0 -1
- package/dist/chunk-OC5ROP7V.cjs.map +0 -1
- package/dist/chunk-PFXNQFFY.js.map +0 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { createEdgeRowMapper, createNodeRowMapper, SQLITE_ROW_MAPPER_CONFIG, POSTGRES_ROW_MAPPER_CONFIG, normalizeRowTimestamp, normalizeRequiredRowTimestamp, buildHardDeleteEdgeClaimsByNodeKind, buildHardDeleteUniquesByConcreteKind, buildHardDeleteEdgeClaimsByEdgeKind } from './chunk-
|
|
1
|
+
import { createEdgeRowMapper, createNodeRowMapper, SQLITE_ROW_MAPPER_CONFIG, POSTGRES_ROW_MAPPER_CONFIG, normalizeRowTimestamp, normalizeRequiredRowTimestamp, buildHardDeleteEdgeClaimsByNodeKind, buildHardDeleteUniquesByConcreteKind, buildHardDeleteEdgeClaimsByEdgeKind } from './chunk-OF63ZHSD.js';
|
|
2
2
|
import { assertRecordedInstantOwnershipMatch, resolveRecordedTimeOwnership, requireRecordedTime, isEngineNativeRecordedReadBinding } from './chunk-XELE7ZOX.js';
|
|
3
|
-
import { rowToNode, executeNodeBulkFindByIndex, executeNodeBulkFindByConstraint, executeNodeFindByConstraint, executeNodeBulkGetOrCreateByConstraint, executeNodeGetOrCreateByConstraint, executeNodeHardDelete, executeNodeDeleteBatch, executeNodeDelete, nodeUpsertDirtyCheck, executeNodeReplacementBatch, prepareNodeReplacement, executeNodeResolvedMutationSet, executeNodeUpsertUpdateBatch, executeNodeSetUpdate, executeNodeUpdate, executeNodeCreateNoReturnBatch, executeNodeCreateBatch, executeNodeCreate, rowToEdge, normalizePersistedEdgeMatchProps, assertValidityEndMutation, assertClearValidToSupported, buildEdgeMatchKey, resolveAtomicEdgeConvergenceExecutor, resolveEdgeMatchIdentityStorage, runHookedWritePlan, edgeWritePlan, resolveAtomicEdgeDeleteBatchExecutor, runWritePlan, runAtomicProgramWithHooks, unsupportedResolvedMutationSet, resolveAtomicEdgeResolvedMutationSetExecutor, withAlreadyExistsTranslation, ResolvedMutationSetMoved, appliedResolvedMutationSet, edgeWriteNeedsConstraintFence, writeResultAlwaysChanges, resolveAtomicEdgeBatchExecutor, nestedManagedWriteTarget, runResolvedMutationSetConverging, canonicalPersistedJsonValue, assertAtomicDeleteSchemaFenceMatched, edgeMatchIdentityUpdateRefusal, resolveAtomicEdgeResolvedUpdateBatchExecutor, atomicResolvedUpdateAttemptBudget, createEdgeBatchValidationBackend, canFuseSchemaFenceInFirstWrite, isAutocommitSingleStatementWrite, runAutocommitSingleStatementWritePlan, classifyDurableEdgeBatchOutcomes, rowToEdgeMeta, rowToNodeMeta, checkCardinalityConstraint, validityEndAfterMutation, assertsStoredWindowState, unfencedTarget, AutocommitWriteRequiresTransaction } from './chunk-
|
|
4
|
-
import { applyResolvedNodeClaims, assertFulltextMember, getEmbeddingFields, computeFulltextContent } from './chunk-
|
|
5
|
-
import { isBundledRootAutocommitEligible } from './chunk-
|
|
6
|
-
import { edgeCardinalityClaimTarget, edgeCardinalityClaimRefusal, edgeCardinalityClaim, edgeCardinalityClaimMode, claimEdgeCardinality } from './chunk-
|
|
3
|
+
import { rowToNode, executeNodeBulkFindByIndex, executeNodeBulkFindByConstraint, executeNodeFindByConstraint, executeNodeBulkGetOrCreateByConstraint, executeNodeGetOrCreateByConstraint, executeNodeHardDelete, executeNodeDeleteBatch, executeNodeDelete, nodeUpsertDirtyCheck, executeNodeReplacementBatch, prepareNodeReplacement, executeNodeResolvedMutationSet, executeNodeUpsertUpdateBatch, executeNodeSetUpdate, executeNodeUpdate, executeNodeCreateNoReturnBatch, executeNodeCreateBatch, executeNodeCreate, rowToEdge, normalizePersistedEdgeMatchProps, assertValidityEndMutation, assertClearValidToSupported, buildEdgeMatchKey, resolveAtomicEdgeConvergenceExecutor, resolveEdgeMatchIdentityStorage, runHookedWritePlan, edgeWritePlan, resolveAtomicEdgeDeleteBatchExecutor, runWritePlan, runAtomicProgramWithHooks, unsupportedResolvedMutationSet, resolveAtomicEdgeResolvedMutationSetExecutor, withAlreadyExistsTranslation, ResolvedMutationSetMoved, appliedResolvedMutationSet, edgeWriteNeedsConstraintFence, writeResultAlwaysChanges, resolveAtomicEdgeBatchExecutor, nestedManagedWriteTarget, runResolvedMutationSetConverging, canonicalPersistedJsonValue, assertAtomicDeleteSchemaFenceMatched, edgeMatchIdentityUpdateRefusal, resolveAtomicEdgeResolvedUpdateBatchExecutor, atomicResolvedUpdateAttemptBudget, createEdgeBatchValidationBackend, canFuseSchemaFenceInFirstWrite, isAutocommitSingleStatementWrite, runAutocommitSingleStatementWritePlan, classifyDurableEdgeBatchOutcomes, rowToEdgeMeta, rowToNodeMeta, checkCardinalityConstraint, validityEndAfterMutation, assertsStoredWindowState, unfencedTarget, AutocommitWriteRequiresTransaction } from './chunk-RTPMG6LQ.js';
|
|
4
|
+
import { applyResolvedNodeClaims, assertFulltextMember, getEmbeddingFields, computeFulltextContent } from './chunk-FXOFJ4FS.js';
|
|
5
|
+
import { isBundledRootAutocommitEligible } from './chunk-6ECNYQDW.js';
|
|
6
|
+
import { edgeCardinalityClaimTarget, edgeCardinalityClaimRefusal, edgeCardinalityClaim, edgeCardinalityClaimMode, claimEdgeCardinality } from './chunk-CDKNGCE7.js';
|
|
7
7
|
import { resolveBackendFulltext } from './chunk-N535PWMA.js';
|
|
8
|
-
import { AtomicEdgeBatchEndpointRefusalError, AtomicEdgeConvergenceTombstoneRefusalError, AtomicEdgeDeleteIdentityRefusalError, AtomicEdgeBatchCardinalityRefusalError } from './chunk-
|
|
9
|
-
import { loadAndMergeGraphExtensionDocument, serializeSchema, buildKindRegistry, ensureIdentitySchemaStorage, loadAndVerifyGraph, identitySchemaCommitPreflight, getSchemaChanges, requiresMigration, inspectAdoptedIdentityStorage, parseSerializedSchema, mergeGraphExtension, commitNewSchemaVersion, commitNewSchemaVersionWithPreflight, planRemovals, stripGraphExtension, applyDeprecatedKinds, identityKindCascadeNeeded, ensureSchema, loadActiveSchemaWithBootstrap, extensionKindNames, serializeSchemaProperties, buildGraphExtensionOntologyKeySet, compileTimeOntologyKey, prepareNewSchemaVersion, commitNewSchemaVersionIfKindsEmpty, serializeIndexDeclaration } from './chunk-
|
|
8
|
+
import { AtomicEdgeBatchEndpointRefusalError, AtomicEdgeConvergenceTombstoneRefusalError, AtomicEdgeDeleteIdentityRefusalError, AtomicEdgeBatchCardinalityRefusalError } from './chunk-UFKYMQJ5.js';
|
|
9
|
+
import { loadAndMergeGraphExtensionDocument, serializeSchema, buildKindRegistry, ensureIdentitySchemaStorage, loadAndVerifyGraph, identitySchemaCommitPreflight, getSchemaChanges, requiresMigration, inspectAdoptedIdentityStorage, parseSerializedSchema, mergeGraphExtension, commitNewSchemaVersion, commitNewSchemaVersionWithPreflight, planRemovals, stripGraphExtension, applyDeprecatedKinds, identityKindCascadeNeeded, ensureSchema, loadActiveSchemaWithBootstrap, extensionKindNames, serializeSchemaProperties, buildGraphExtensionOntologyKeySet, compileTimeOntologyKey, prepareNewSchemaVersion, commitNewSchemaVersionIfKindsEmpty, serializeIndexDeclaration } from './chunk-WB55URNM.js';
|
|
10
10
|
import { countSchemaKindRows } from './chunk-RFMSZ7CF.js';
|
|
11
11
|
import { getTypeName } from './chunk-Q2SPDS3B.js';
|
|
12
|
-
import { loadCurrentStructuralClasses, loadAssertionsByIds, toTransferAssertion, liveNodeKindsSharingIds, createIdentityFacade, createIdentityReadFacade, validateIdentityForContext, removeIdentityKindsForContext, readIdentityAssertionsForInterchange, readIdentityAssertionPageAtTarget, lockIdentityGraph, foldIdentityForCreatedNodes, importIdentityAssertionsIntoTarget, assertAffectedIdentityClassesConsistent, applyIdentityChangesForContext, refKey, requireNodeValidityEndCompatible, detachIdentityForNode, rebuildIdentityClosureForContext, assertEdgeMatchIdentityBackendSupport } from './chunk-
|
|
13
|
-
import { storeRuntime, STORE_RUNTIME, assertRevisionTrackableBackend, createRecordedBackend, lockRecordedGraphWrite, refuseEngineNativeRecordedIdentityRead, createRecordedTransactionScope, readRecordedClock, ensureRevisionOrigin, recordedCaptureRequiresCallbackTransactionError, assertRecordedCaptureTransactionIsolation, lockSchemaVersionForStoreWrite, createMutationWitness, registerRecordedIdentityMutationWitness, bindEvolvedTransactionStore,
|
|
14
|
-
import { isParameterRef, resolveParameterValueType, validateAggregateOperand, fieldRef, buildFieldBuilderForTypeInfo, stringField, createFulltextAccessor, CURRENT_READ_INSTANT_PLACEHOLDER, extractFulltextMatchPredicates, extractVectorSimilarityPredicates, withPinnedReadInstant, resolveBatchWriteVerdict, batchRefusalSuffix, batchRefusalDetails, canonicalEqual, runRetriedUnit, baseField, objectField, arrayField, dateField, numberField, isAggregateExpression, sortedReplacer, compilePredicateExpression, assertRecursiveTraversalSupported, compileFieldValue, compileKindFilter, compileTemporalFilter, currentReadInstant, compileFieldValueFromColumn, compileDatabaseExpression, expressionContainsAggregate, chunk, sqlValueList, getNodeKindsForAlias, getFieldPointer, visitExpressionChildren, groupBy, delay, buildPredicateIndex, requireRecursiveTraversalVerdict, isOptimisticRetryTier, OPTIMISTIC_RETRY_ATTEMPTS, currentReadInstantFor, extractTemporalOptions, getPredicatesForAlias, getHybridTargetAlias, compilePredicateClauses, compileLegacyAggregateExpression } from './chunk-
|
|
15
|
-
import { batchPointReadVerdict, statementExecutionVerdict, createClaimsVerdictThunk, endpointSetReadVerdict, uniqueSidecarBatchVerdict, contributionHealthVerdict, recordedRevisionOriginsVerdict, requireExtras, requireCatalog } from './chunk-
|
|
16
|
-
import { assumeRecursiveTraversalSupported, withRecordedRelationsPrecondition, backendDerivationRoot, createSqlSchema, requireSqlSchema, resolveRecursiveTraversal, resolveWriteFencePlan, refuseUnfencedOperationalIdentity, refuseUnfencedClockAllocation, requireExternalRecordedReadSource, createRecordedReadBinding, createEngineRecordedReadBinding, recordedReadSchemaFor, runOptionallyInTransaction, createTransactionReadBackend, bindExtraIfReachable, BATCH_POINT_READ, CONTRIBUTION_HEALTH, bindExtra, projectGraphBackend, deriveBackend, DEFAULT_SQL_SCHEMA, vectorSlotKey, requireRecordedReadBinding, GRAPH_BACKEND_PROJECTION_KEYS, projectBackend, rowPropsToObject, recordedReadSqlSchema, endpointSetReadMembers, INTERNAL_TEMPORARY_WRITES, postgresReadWriteRefusedSqlState, assertGraphCommandConvergenceIsolation, isSchemaFencedInsertEligible, executeAuthoritativeGraphCommand, isMissingTableError, postgresTemporaryTableUnavailableSqlState, assertRecursiveTraversal, isPostgresConcurrentDdlRaceError, ALIAS_CTE_PREFIX, EMBEDDINGS_CTE_ALIAS, FULLTEXT_CTE_ALIAS, HYBRID_CANDIDATES_CTE_ALIAS } from './chunk-
|
|
12
|
+
import { loadCurrentStructuralClasses, loadAssertionsByIds, toTransferAssertion, liveNodeKindsSharingIds, createIdentityFacade, createIdentityReadFacade, validateIdentityForContext, removeIdentityKindsForContext, readIdentityAssertionsForInterchange, readIdentityAssertionPageAtTarget, lockIdentityGraph, foldIdentityForCreatedNodes, importIdentityAssertionsIntoTarget, assertAffectedIdentityClassesConsistent, applyIdentityChangesForContext, refKey, requireNodeValidityEndCompatible, detachIdentityForNode, rebuildIdentityClosureForContext, assertEdgeMatchIdentityBackendSupport } from './chunk-SYXTWPX6.js';
|
|
13
|
+
import { storeRuntime, STORE_RUNTIME, assertRevisionTrackableBackend, createRecordedBackend, lockRecordedGraphWrite, refuseEngineNativeRecordedIdentityRead, createRecordedTransactionScope, readRecordedClock, ensureRevisionOrigin, recordedCaptureRequiresCallbackTransactionError, assertRecordedCaptureTransactionIsolation, lockSchemaVersionForStoreWrite, createMutationWitness, registerRecordedIdentityMutationWitness, bindEvolvedTransactionStore, withPreAcquiredTransactionSchemaFenceLease, validateNodeProps, withRecordedNodeMutationTarget, diagnoseFusedSchemaFenceNoRow, forceRecordedGraphRevision, TRANSACTION_RUNTIME, bindTransactionStore, mintsOriginNamespacedAnchor, ensureRevisionOriginsRelation, generateId, runInWriteTransaction, assertCurrentRecordedSchema, AUTO_REFRESH_STATISTICS_ROW_THRESHOLD, withRecordedFlushObserver, runInTransactionContext, withTransactionSchemaFenceLease, withWriteTransactionSession, resetRevisionOrigin, advanceRevisionClock, validateEdgeProps, getEdgeRowsByIds, memoizeLeasedSchemaFence, inheritRecordedTransactionBindings, getNodeRowsByIds, hasLeasedSchemaFence, closeRecordedHardDeletedKind, recordedBindParamBudget, historicalIdentityPeerClassQuery, IDENTITY_PEER_CLASS_COLUMNS, throwHistoryUnsafeSqlAccess, throwRevisionTrackingUnsafeSqlAccess } from './chunk-3SUZXB5X.js';
|
|
14
|
+
import { isParameterRef, resolveParameterValueType, validateAggregateOperand, fieldRef, buildFieldBuilderForTypeInfo, stringField, createFulltextAccessor, CURRENT_READ_INSTANT_PLACEHOLDER, extractFulltextMatchPredicates, extractVectorSimilarityPredicates, withPinnedReadInstant, resolveBatchWriteVerdict, batchRefusalSuffix, batchRefusalDetails, canonicalEqual, runRetriedUnit, baseField, objectField, arrayField, dateField, numberField, isAggregateExpression, sortedReplacer, compilePredicateExpression, assertRecursiveTraversalSupported, compileFieldValue, compileKindFilter, compileTemporalFilter, currentReadInstant, compileFieldValueFromColumn, compileDatabaseExpression, expressionContainsAggregate, chunk, sqlValueList, getNodeKindsForAlias, getFieldPointer, visitExpressionChildren, groupBy, delay, buildPredicateIndex, requireRecursiveTraversalVerdict, isOptimisticRetryTier, OPTIMISTIC_RETRY_ATTEMPTS, currentReadInstantFor, extractTemporalOptions, getPredicatesForAlias, getHybridTargetAlias, compilePredicateClauses, compileLegacyAggregateExpression } from './chunk-4TQOIBWH.js';
|
|
15
|
+
import { batchPointReadVerdict, statementExecutionVerdict, createClaimsVerdictThunk, endpointSetReadVerdict, uniqueSidecarBatchVerdict, contributionHealthVerdict, recordedRevisionOriginsVerdict, requireExtras, requireCatalog } from './chunk-BE75G3M5.js';
|
|
16
|
+
import { assumeRecursiveTraversalSupported, withRecordedRelationsPrecondition, backendDerivationRoot, createSqlSchema, requireSqlSchema, resolveRecursiveTraversal, resolveWriteFencePlan, refuseUnfencedOperationalIdentity, refuseUnfencedClockAllocation, requireExternalRecordedReadSource, createRecordedReadBinding, createEngineRecordedReadBinding, recordedReadSchemaFor, runOptionallyInTransaction, createTransactionReadBackend, bindExtraIfReachable, BATCH_POINT_READ, CONTRIBUTION_HEALTH, bindExtra, projectGraphBackend, deriveBackend, DEFAULT_SQL_SCHEMA, vectorSlotKey, requireRecordedReadBinding, GRAPH_BACKEND_PROJECTION_KEYS, projectBackend, rowPropsToObject, recordedReadSqlSchema, endpointSetReadMembers, INTERNAL_TEMPORARY_WRITES, postgresReadWriteRefusedSqlState, assertGraphCommandConvergenceIsolation, isSchemaFencedInsertEligible, executeAuthoritativeGraphCommand, isMissingTableError, postgresTemporaryTableUnavailableSqlState, assertRecursiveTraversal, isPostgresConcurrentDdlRaceError, ALIAS_CTE_PREFIX, EMBEDDINGS_CTE_ALIAS, FULLTEXT_CTE_ALIAS, HYBRID_CANDIDATES_CTE_ALIAS } from './chunk-TU22BFMP.js';
|
|
17
17
|
import { isKnownKind } from './chunk-NMRLVAVN.js';
|
|
18
18
|
import { isEdgeTargetMap, projectTargetKinds, validateEdgeEndpoints, compareClaimTargets, encodeTupleKey, uniquenessClaimTarget, subClassComponent, isSameClaimOwner, DISJOINT_CONSTRAINT_NAME, disjointnessClaimAxis } from './chunk-OXJNL2PW.js';
|
|
19
19
|
import { resolveReadCoordinate, withRecordedCoordinate, describeCoordinate, coordinateContext, nowIso, recordedInstantWallTime, asRecordedInstant, createEngineRecordedInstant, validityWindowContainsInstant, validateStatedValidityLowerBound, validateOptionalCanonicalIsoDate, assertOrderedValidityWindow, preservesImmutableLowerBound, parseRecordedInstant, assertWritableValidityWindow, assertValidRecordedInstant, isCanonicalIsoDate, statedBoundMatchesStored, optionalRecordedInstantParts } from './chunk-CY657YYY.js';
|
|
@@ -28,7 +28,7 @@ import { assertVectorMinScore, assertApproximateMetricSupported, vectorScoreExpr
|
|
|
28
28
|
import { createSchemaIntrospector } from './chunk-UL5SIHSR.js';
|
|
29
29
|
import { isPortableCountDistinctValueType } from './chunk-2V2ZQ5BG.js';
|
|
30
30
|
import { asCompiledSelectSql, sql, isSqlPlaceholder, bindSqlValue, isRawExecutable, markAnnIndexScan, renderSql, annIndexScanTypes, asCompiledRowsSql, markForceCustomPlan, asCompiledStatementSql, asCompiledTemporaryStatementSql } from './chunk-XDTDSEAE.js';
|
|
31
|
-
import { resolveEmbeddingFields, resolveGraphVectorSlots, resolveDeclaredFulltextLanguage
|
|
31
|
+
import { resolveEmbeddingFields, getSearchableFields, resolveGraphVectorSlots, resolveDeclaredFulltextLanguage } from './chunk-PC2UBAUB.js';
|
|
32
32
|
import { IncompatibleChangeError } from './chunk-YIB2EVIL.js';
|
|
33
33
|
import { META_EDGE_DISJOINT_WITH, META_EDGE_EQUIVALENT_TO, META_EDGE_SAME_AS, META_EDGE_SUB_CLASS_OF } from './chunk-JXXDZTMN.js';
|
|
34
34
|
import { canonicalAnnotations, validateProjectionField } from './chunk-OTJNUB6M.js';
|
|
@@ -16924,6 +16924,20 @@ function asRawBackend(backend) {
|
|
|
16924
16924
|
return backend;
|
|
16925
16925
|
}
|
|
16926
16926
|
|
|
16927
|
+
// src/backend/heterogeneous-node-upsert-batch.ts
|
|
16928
|
+
var HETEROGENEOUS_NODE_UPSERT_BATCH_FIXED_BIND_COUNT = 5;
|
|
16929
|
+
var HETEROGENEOUS_NODE_UPSERT_BATCH_ENTRY_BIND_COUNT = 6;
|
|
16930
|
+
function heterogeneousNodeUpsertBatchBindParameterCount(entryCount) {
|
|
16931
|
+
if (!Number.isSafeInteger(entryCount) || entryCount < 1) return;
|
|
16932
|
+
return HETEROGENEOUS_NODE_UPSERT_BATCH_FIXED_BIND_COUNT + entryCount * HETEROGENEOUS_NODE_UPSERT_BATCH_ENTRY_BIND_COUNT;
|
|
16933
|
+
}
|
|
16934
|
+
function heterogeneousNodeUpsertBatchFitsBindBudget(entryCount, maxBindParameters) {
|
|
16935
|
+
const parameterCount = heterogeneousNodeUpsertBatchBindParameterCount(entryCount);
|
|
16936
|
+
if (parameterCount === void 0) return false;
|
|
16937
|
+
if (maxBindParameters === void 0) return true;
|
|
16938
|
+
return parameterCount <= maxBindParameters;
|
|
16939
|
+
}
|
|
16940
|
+
|
|
16927
16941
|
// src/graph-extension/classify.ts
|
|
16928
16942
|
function classifyModifications(existing, next) {
|
|
16929
16943
|
const incompatible = [];
|
|
@@ -22017,6 +22031,7 @@ var HISTORY_STORE_BACKEND_KEYS = [
|
|
|
22017
22031
|
"tableNames",
|
|
22018
22032
|
"updateEdge",
|
|
22019
22033
|
"updateNode",
|
|
22034
|
+
"upsertHeterogeneousNodes",
|
|
22020
22035
|
"updateResolvedNodesBatch",
|
|
22021
22036
|
"compareAndSetNode",
|
|
22022
22037
|
"updateNodeSet",
|
|
@@ -26491,6 +26506,15 @@ async function assertEvolvedSchemaRequiredKindsEmpty(backend, graphId, classific
|
|
|
26491
26506
|
if (error !== void 0) throw error;
|
|
26492
26507
|
}
|
|
26493
26508
|
var IDENTITY_FACADES = /* @__PURE__ */ new WeakMap();
|
|
26509
|
+
function callerSuppliedParsedNodeProps(inputProps, parsedCreateProps) {
|
|
26510
|
+
const updateProps = createDataKeyedBag();
|
|
26511
|
+
for (const property of Object.keys(inputProps)) {
|
|
26512
|
+
if (hasOwnKey(parsedCreateProps, property)) {
|
|
26513
|
+
updateProps[property] = parsedCreateProps[property];
|
|
26514
|
+
}
|
|
26515
|
+
}
|
|
26516
|
+
return updateProps;
|
|
26517
|
+
}
|
|
26494
26518
|
var StoreImplementation = class _StoreImplementation {
|
|
26495
26519
|
[STORE_RUNTIME];
|
|
26496
26520
|
#graph;
|
|
@@ -28607,8 +28631,9 @@ var StoreImplementation = class _StoreImplementation {
|
|
|
28607
28631
|
}
|
|
28608
28632
|
const invoke = fn;
|
|
28609
28633
|
const executionScope = originalStore === void 0 ? void 0 : scopeBackendExecution(writeTarget);
|
|
28634
|
+
const contextBackend = executionScope?.backend ?? writeTarget;
|
|
28610
28635
|
const context = this.#buildTransactionContext(
|
|
28611
|
-
|
|
28636
|
+
contextBackend,
|
|
28612
28637
|
externalTx,
|
|
28613
28638
|
void 0,
|
|
28614
28639
|
receiptRecorder
|
|
@@ -28616,24 +28641,36 @@ var StoreImplementation = class _StoreImplementation {
|
|
|
28616
28641
|
if (originalStore !== void 0) {
|
|
28617
28642
|
bindEvolvedTransactionStore(context, originalStore, this);
|
|
28618
28643
|
}
|
|
28619
|
-
const
|
|
28620
|
-
|
|
28621
|
-
|
|
28622
|
-
|
|
28623
|
-
|
|
28624
|
-
|
|
28625
|
-
|
|
28644
|
+
const finish = async () => {
|
|
28645
|
+
const result = await runInTransactionContext(
|
|
28646
|
+
context,
|
|
28647
|
+
async (activeContext) => {
|
|
28648
|
+
try {
|
|
28649
|
+
return await invoke(activeContext);
|
|
28650
|
+
} finally {
|
|
28651
|
+
executionScope?.seal();
|
|
28652
|
+
}
|
|
28626
28653
|
}
|
|
28627
|
-
|
|
28628
|
-
|
|
28629
|
-
|
|
28630
|
-
|
|
28631
|
-
|
|
28632
|
-
|
|
28633
|
-
|
|
28634
|
-
|
|
28635
|
-
|
|
28636
|
-
|
|
28654
|
+
);
|
|
28655
|
+
const recordedByGraph = mutationWitness?.mutated === true ? /* @__PURE__ */ new Map([
|
|
28656
|
+
[this.graphId, await this.#engineRecordedInstant(txBackend)]
|
|
28657
|
+
]) : await scope.flush();
|
|
28658
|
+
if (!this.#captureEnabled) receiptRecorder.seal();
|
|
28659
|
+
return transactionOutcome(
|
|
28660
|
+
result,
|
|
28661
|
+
receiptRecorder,
|
|
28662
|
+
recordedByGraph,
|
|
28663
|
+
this.graphId
|
|
28664
|
+
);
|
|
28665
|
+
};
|
|
28666
|
+
return this.#captureEnabled ? withPreAcquiredTransactionSchemaFenceLease(
|
|
28667
|
+
{
|
|
28668
|
+
graphId: this.graphId,
|
|
28669
|
+
schemaVersion: this.#schemaMetadata.schemaVersion
|
|
28670
|
+
},
|
|
28671
|
+
[txBackend, scope.backend, writeTarget, contextBackend],
|
|
28672
|
+
finish
|
|
28673
|
+
) : finish();
|
|
28637
28674
|
}
|
|
28638
28675
|
/**
|
|
28639
28676
|
* Decorates a receipt-enabled transaction `context` with `measure`.
|
|
@@ -28701,6 +28738,148 @@ var StoreImplementation = class _StoreImplementation {
|
|
|
28701
28738
|
subgraph: (rootId, options) => this.#createSubgraphRead(rootId, options, txBackend, attempt).execute()
|
|
28702
28739
|
};
|
|
28703
28740
|
}
|
|
28741
|
+
/** One CTE-backed upsert envelope for plain history-store node kinds. */
|
|
28742
|
+
async #writeNodeUpsertBatch(txBackend, entries, receiptRecorder) {
|
|
28743
|
+
if (entries.length === 0)
|
|
28744
|
+
return [];
|
|
28745
|
+
if (!this.#captureEnabled) {
|
|
28746
|
+
throw new UnsupportedBackendCapabilityError(
|
|
28747
|
+
"tx.writeNodeUpsertBatch()",
|
|
28748
|
+
"recorded heterogeneous node upserts",
|
|
28749
|
+
{ history: this.#captureEnabled }
|
|
28750
|
+
);
|
|
28751
|
+
}
|
|
28752
|
+
if (this.#coalescesUnchangedUpserts()) {
|
|
28753
|
+
throw new ConfigurationError(
|
|
28754
|
+
"writeNodeUpsertBatch does not support coalesceUnchangedUpserts.",
|
|
28755
|
+
{ code: "HETEROGENEOUS_NODE_BATCH_UNSUPPORTED_COALESCING" }
|
|
28756
|
+
);
|
|
28757
|
+
}
|
|
28758
|
+
if (this.#graph.identity !== void 0) {
|
|
28759
|
+
throw new ConfigurationError(
|
|
28760
|
+
"writeNodeUpsertBatch does not support graphs with operational identity.",
|
|
28761
|
+
{ code: "HETEROGENEOUS_NODE_BATCH_UNSUPPORTED_IDENTITY" }
|
|
28762
|
+
);
|
|
28763
|
+
}
|
|
28764
|
+
const schemaVersion = this.#schemaMetadata.schemaVersion;
|
|
28765
|
+
if (schemaVersion === void 0) {
|
|
28766
|
+
throw new ConfigurationError(
|
|
28767
|
+
"writeNodeUpsertBatch requires an initialized schema-fenced Store.",
|
|
28768
|
+
{ code: "HETEROGENEOUS_NODE_BATCH_SCHEMA_UNAVAILABLE" }
|
|
28769
|
+
);
|
|
28770
|
+
}
|
|
28771
|
+
const seen = /* @__PURE__ */ new Set();
|
|
28772
|
+
const validated = entries.map((entry2) => {
|
|
28773
|
+
if ("validFrom" in entry2 || "validTo" in entry2 || "clearValidTo" in entry2 || "onImmutableLowerBound" in entry2) {
|
|
28774
|
+
throw new ConfigurationError(
|
|
28775
|
+
"writeNodeUpsertBatch does not support temporal write options.",
|
|
28776
|
+
{ code: "HETEROGENEOUS_NODE_BATCH_UNSUPPORTED_TEMPORAL_OPTIONS" }
|
|
28777
|
+
);
|
|
28778
|
+
}
|
|
28779
|
+
if (!hasOwnKey(this.#graph.nodes, entry2.kind)) {
|
|
28780
|
+
throw new KindNotFoundError(entry2.kind, "node", {
|
|
28781
|
+
graphId: this.graphId
|
|
28782
|
+
});
|
|
28783
|
+
}
|
|
28784
|
+
const registration = this.#graph.nodes[entry2.kind];
|
|
28785
|
+
if (registration === void 0) {
|
|
28786
|
+
throw new KindNotFoundError(entry2.kind, "node", {
|
|
28787
|
+
graphId: this.graphId
|
|
28788
|
+
});
|
|
28789
|
+
}
|
|
28790
|
+
if ((registration.unique?.length ?? 0) > 0 || this.#registry.getDisjointKinds(entry2.kind).length > 0 || resolveEmbeddingFields(registration.type.schema).length > 0 || getSearchableFields(registration.type.schema).length > 0) {
|
|
28791
|
+
throw new ConfigurationError(
|
|
28792
|
+
"writeNodeUpsertBatch only supports plain node kinds without identity claims or projections.",
|
|
28793
|
+
{
|
|
28794
|
+
code: "HETEROGENEOUS_NODE_BATCH_UNSUPPORTED_KIND",
|
|
28795
|
+
kind: entry2.kind
|
|
28796
|
+
}
|
|
28797
|
+
);
|
|
28798
|
+
}
|
|
28799
|
+
const key = `${entry2.kind}\0${entry2.id}`;
|
|
28800
|
+
if (seen.has(key)) {
|
|
28801
|
+
throw new ValidationError(
|
|
28802
|
+
`writeNodeUpsertBatch received duplicate node id "${entry2.id}" for kind "${entry2.kind}".`,
|
|
28803
|
+
{ entityType: "node", kind: entry2.kind, id: entry2.id, issues: [] }
|
|
28804
|
+
);
|
|
28805
|
+
}
|
|
28806
|
+
seen.add(key);
|
|
28807
|
+
const props = validateNodeProps(registration.type.schema, entry2.props, {
|
|
28808
|
+
kind: entry2.kind,
|
|
28809
|
+
id: entry2.id,
|
|
28810
|
+
operation: "create"
|
|
28811
|
+
});
|
|
28812
|
+
return {
|
|
28813
|
+
kind: entry2.kind,
|
|
28814
|
+
id: entry2.id,
|
|
28815
|
+
props,
|
|
28816
|
+
updateProps: callerSuppliedParsedNodeProps(entry2.props, props)
|
|
28817
|
+
};
|
|
28818
|
+
});
|
|
28819
|
+
if (!heterogeneousNodeUpsertBatchFitsBindBudget(
|
|
28820
|
+
validated.length,
|
|
28821
|
+
txBackend.capabilities.maxBindParameters
|
|
28822
|
+
)) {
|
|
28823
|
+
const maxBindParameters = txBackend.capabilities.maxBindParameters;
|
|
28824
|
+
const parameterCount = heterogeneousNodeUpsertBatchBindParameterCount(
|
|
28825
|
+
validated.length
|
|
28826
|
+
);
|
|
28827
|
+
throw new ConfigurationError(
|
|
28828
|
+
`writeNodeUpsertBatch uses ${parameterCount} bound parameters, exceeding this backend's limit of ${maxBindParameters}.`,
|
|
28829
|
+
{
|
|
28830
|
+
capability: "maxBindParameters",
|
|
28831
|
+
maxBindParameters,
|
|
28832
|
+
parameterCount
|
|
28833
|
+
},
|
|
28834
|
+
{
|
|
28835
|
+
suggestion: "Split the operation into smaller batches before retrying."
|
|
28836
|
+
}
|
|
28837
|
+
);
|
|
28838
|
+
}
|
|
28839
|
+
receiptRecorder?.assertWritable();
|
|
28840
|
+
if (txBackend.upsertHeterogeneousNodes === void 0) {
|
|
28841
|
+
throw new UnsupportedBackendCapabilityError(
|
|
28842
|
+
"tx.writeNodeUpsertBatch()",
|
|
28843
|
+
"exact-session heterogeneous node upsert program",
|
|
28844
|
+
{ dialect: txBackend.dialect }
|
|
28845
|
+
);
|
|
28846
|
+
}
|
|
28847
|
+
const rows = await withRecordedNodeMutationTarget(
|
|
28848
|
+
txBackend,
|
|
28849
|
+
this.graphId,
|
|
28850
|
+
(target) => {
|
|
28851
|
+
const upsert = target.upsertHeterogeneousNodes;
|
|
28852
|
+
if (upsert === void 0) {
|
|
28853
|
+
throw new UnsupportedBackendCapabilityError(
|
|
28854
|
+
"tx.writeNodeUpsertBatch()",
|
|
28855
|
+
"exact-session heterogeneous node upsert program",
|
|
28856
|
+
{ dialect: target.dialect }
|
|
28857
|
+
);
|
|
28858
|
+
}
|
|
28859
|
+
return upsert({
|
|
28860
|
+
entries: validated,
|
|
28861
|
+
schemaFence: {
|
|
28862
|
+
graphId: this.graphId,
|
|
28863
|
+
expectedVersion: schemaVersion
|
|
28864
|
+
}
|
|
28865
|
+
});
|
|
28866
|
+
}
|
|
28867
|
+
);
|
|
28868
|
+
if (rows.length !== validated.length) {
|
|
28869
|
+
await diagnoseFusedSchemaFenceNoRow(
|
|
28870
|
+
{ graphId: this.graphId, schemaVersion },
|
|
28871
|
+
txBackend
|
|
28872
|
+
);
|
|
28873
|
+
throw new ConfigurationError(
|
|
28874
|
+
"writeNodeUpsertBatch did not observe its active schema fence.",
|
|
28875
|
+
{ code: "HETEROGENEOUS_NODE_BATCH_STALE_SCHEMA" }
|
|
28876
|
+
);
|
|
28877
|
+
}
|
|
28878
|
+
for (const row of rows) receiptRecorder?.recordNode(row.kind, 1);
|
|
28879
|
+
return rows.map(
|
|
28880
|
+
(row) => rowToNode(row)
|
|
28881
|
+
);
|
|
28882
|
+
}
|
|
28704
28883
|
/**
|
|
28705
28884
|
* Builds the transaction context bound to a transaction-scoped backend.
|
|
28706
28885
|
* Collections, fluent queries, and set-oriented reads all use that same
|
|
@@ -28761,6 +28940,7 @@ var StoreImplementation = class _StoreImplementation {
|
|
|
28761
28940
|
const base = {
|
|
28762
28941
|
nodes,
|
|
28763
28942
|
edges,
|
|
28943
|
+
writeNodeUpsertBatch: (entries) => this.#writeNodeUpsertBatch(txBackend, entries, receiptRecorder),
|
|
28764
28944
|
...this.#createTransactionReadSurface(txBackend, attempt),
|
|
28765
28945
|
...receiptIdentity === void 0 ? {} : { identity: receiptIdentity },
|
|
28766
28946
|
backend: createTransactionReadBackend(txBackend),
|
|
@@ -31011,5 +31191,5 @@ async function createVerifiedAdapterStore(graph, backend, options) {
|
|
|
31011
31191
|
}
|
|
31012
31192
|
|
|
31013
31193
|
export { CURRENT_ONLY_READ_NAMES, EDGE_TEMPORAL_READ_NAMES, ExecutableAggregateQuery, ExecutableProjectionQuery, ExecutableQuery, ExecutableRelationQuery, IDENTITY_READ_NAMES, MAX_EXPLICIT_RECURSIVE_DEPTH, MAX_RECURSIVE_DEPTH, NODE_TEMPORAL_READ_NAMES, PreparedQuery, QueryBuilder, RecordedStoreView, StoreAnalysisCursorStaleError, StoreSearch, StoreView, UnionableQuery, avg, composeFragments, count, countDistinct, countDistinctEdges, countEdges, createAdapterStore, createAdapterStoreWithSchema, createFragment, createQueryBuilder, createStore, createStoreWithSchema, createVerifiedAdapterStore, createVerifiedStore, defineSubgraphProject, field, having, havingEq, havingGt, havingGte, havingLt, havingLte, limitFragment, max, min, offsetFragment, orderByFragment, sum };
|
|
31014
|
-
//# sourceMappingURL=chunk-
|
|
31015
|
-
//# sourceMappingURL=chunk-
|
|
31194
|
+
//# sourceMappingURL=chunk-TR7QTODF.js.map
|
|
31195
|
+
//# sourceMappingURL=chunk-TR7QTODF.js.map
|