Member Junction
    Preparing search index...

    A per-entity-instance serial save queue. INSERT and UPDATE of the same BaseEntity instance are serialized (the UPDATE waits for the INSERT to land); different entities save concurrently. All saves are fire-and-forget and never throw outward — a failed Save() (returned false or a thrown error) is logged and counted; call Flush at a run/goal boundary to await them and surface the failure count.

    Index

    Constructors

    • Parameters

      • Optionalopts: { onError?: (message: string) => void; saveReturnMode?: EntitySaveReturnMode }
        • OptionalonError?: (message: string) => void

          Optional handler for a failed save's diagnostic message. Defaults to the global LogError. Consumers with structured logging (e.g. a category/metadata logger) pass their own so failures stay in their log stream.

        • OptionalsaveReturnMode?: EntitySaveReturnMode

          Optional EntitySaveReturnMode forwarded to every queued entity.Save(options) call (e.g. 'datestamps_only' for high-write execution log queues whose wide JSON/text payload columns are already in memory).

      Returns BaseEntitySaveQueue

    Methods

    • Fire-and-forget UPDATE chained after the entity's INSERT. applyMutation (if given) runs INSIDE the post-INSERT task — after finalizeSave's reload — so its values always survive; the save is force-persisted with IgnoreDirtyState. Pass no mutation only when the fields are already set AND cannot race an in-flight INSERT.

      Parameters

      Returns void