• Creates a transaction and sets pg settings before executing queries. The applied pgSettings are added to the field "_debugPgSettings" in the transaction object for debug purposes.

    Type Parameters

    • T

    Parameters

    • pool: DbClient

      DB pool instance or PG/Zapatos client.

    • isolationLevel: IsolationLevel

      Transaction isolation level.

    • pgSettings: {
          [key: string]: string;
      } = {}

      Settings to be set before queries are executed.

      • [key: string]: string
    • callback: ((client) => Promise<T>)

      Callback where queries are executed.

        • (client): Promise<T>
        • Parameters

          • client: TxnClient<IsolationLevel>

          Returns Promise<T>

    Returns Promise<T>

Generated using TypeDoc