Setu-TS
    Preparing search index...

    Interface IOutboxWriteScope

    The slice of a unit of work the outbox write needs: a repository whose create runs inside the caller's transaction.

    @setu-ts/database-plugin's IUnitOfWork satisfies it structurally, so a caller passes the unit of work its own transaction(...) handed it.

    0.9.0

    interface IOutboxWriteScope {
        getRepository(
            entity: string,
        ): { create(data: Readonly<Record<string, unknown>>): Promise<unknown> };
    }
    Index
    • Returns the transaction-scoped repository for an entity.

      Parameters

      • entity: string

        The entity name

      Returns { create(data: Readonly<Record<string, unknown>>): Promise<unknown> }

      A repository whose create writes inside the caller's transaction

      • create: function
        • Creates a row.

          Parameters

          • data: Readonly<Record<string, unknown>>

            The row to write

          Returns Promise<unknown>

          A promise that settles when the row is written (or buffered for commit)