@itsaorg/dbms-base
    Preparing search index...

    Interface DbmsTransactionInterface

    A unit of work that can commit or roll back.

    💡 Call commit to keep the work, or rollback to drop it.

    import type { DbmsTransactionInterface } from "@itsaorg/dbms-base";

    function finish(transaction: DbmsTransactionInterface): void {
    transaction.commit();
    }
    interface DbmsTransactionInterface {
        id: string;
        commit(): void;
        emit<K extends keyof DbmsEventMap>(
            event: K,
            payload: DbmsEventMap[K],
        ): void;
        off<K extends keyof DbmsEventMap>(
            event: K,
            listener: (payload: DbmsEventMap[K]) => void,
        ): void;
        on<K extends keyof DbmsEventMap>(
            event: K,
            listener: (payload: DbmsEventMap[K]) => void,
        ): void;
        rollback(): void;
    }

    Hierarchy (View Summary)

    Implemented by

    Index
    id: string

    The identifier sent with transaction events.