import type { PoolQueryClient } from "../../generated/storage-kit/query.js"; import type { PostgresQueryExecutor } from "./postgres.js"; export interface PgExecutorOptions { connectionString: string; max?: number; applicationName?: string; connectionTimeoutMillis?: number; idleTimeoutMillis?: number; } /** * `PostgresQueryExecutor` backed by a live `pg.Pool` via the generated kit. * * Transactions bind every statement to one dedicated pool client. This is * required both for atomic migration+ledger writes and request-scoped RLS * settings established with `SET LOCAL`. */ export declare class PgPoolExecutor implements PostgresQueryExecutor { private readonly client; constructor(client: PoolQueryClient); static fromConnectionString(options: PgExecutorOptions): PgPoolExecutor; /** The underlying typed query client, for callers that need `get`/`one`/`transaction`. */ get queryClient(): PoolQueryClient; query>(sql: string, params?: readonly unknown[]): Promise; execute(sql: string, params?: readonly unknown[]): Promise; transaction(fn: (executor: PostgresQueryExecutor) => Promise): Promise; withRequestContext(context: { tenantId: string; principalId: string; requestId: string; }, fn: (client: PoolQueryClient) => Promise): Promise; close(): Promise; }