import { ClientBase, Pool, PoolClient } from 'pg'; import { IsolationLevel, TxnClient } from 'zapatos/db'; export type DbClient = Pool | TxnClient; /** * Iterates through pgSettings properties, composes and runs a single SELECT * query to execute set_config for each property. */ export declare const setPgSettingsConfig: (pgSettings: { [key: string]: string; } | undefined, txn: Pool | TxnClient | PoolClient | ClientBase) => Promise; /** * 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. * @param pool - DB pool instance or PG/Zapatos client. * @param isolationLevel - Transaction isolation level. * @param pgSettings - Settings to be set before queries are executed. * @param callback - Callback where queries are executed. */ export declare const transactionWithContext: (pool: DbClient, isolationLevel: IsolationLevel, pgSettings: { [key: string]: string; } | undefined, callback: (client: TxnClient) => Promise) => Promise; //# sourceMappingURL=transaction-with-context.d.ts.map