enquire-mcp API reference - v4.0.0-rc.7
    Preparing search index...

    Type Alias EmbedConditionalMutationResult<T>

    EmbedConditionalMutationResult:
        | {
            committedGeneration: EmbedDbGenerationIdentity;
            kind: "committed";
            value: T;
        }
        | {
            kind: "generation-drift";
            observedGeneration: EmbedDbGenerationIdentity;
        }

    Result of a mutation admitted against one exact EmbedDb generation.

    A drift result proves that the callback performed no DML. Callers may then quarantine any derived in-memory graph before applying an authoritative database-only mutation.

    Type Parameters

    • T

    Type Declaration

    • { committedGeneration: EmbedDbGenerationIdentity; kind: "committed"; value: T }
      • ReadonlycommittedGeneration: EmbedDbGenerationIdentity

        Exact UUID/epoch after every trigger fired and before commit.

      • Readonlykind: "committed"

        The expected generation still owned the write lock and committed.

      • Readonlyvalue: T

        Mutation-specific result captured by the same transaction.

    • { kind: "generation-drift"; observedGeneration: EmbedDbGenerationIdentity }
      • Readonlykind: "generation-drift"

        Another writer advanced or replaced the physical database first.

      • ReadonlyobservedGeneration: EmbedDbGenerationIdentity

        Current authority observed under the write lock; never graph authority.