import type { Client, Pool, PoolClient } from 'pg'; import { AsyncDatabase, type TransactionOptions } from '../core/Database.js'; import type { AsyncDriver, AsyncStatement, BatchedQuery, PrepareOptions } from '../core/Driver.js'; type Queryable = Client | Pool | PoolClient; declare class PreparedStatement implements AsyncStatement { private client; private sql; private name?; constructor(client: Queryable, sql: string, name?: string | undefined); all(params: Array): Promise>; run(params: Array): Promise; get(params: Array): Promise; values(params: Array): Promise>>; free(): void; } export declare class PgDriver implements AsyncDriver { private client; private depth; parsesJson: boolean; supportsTransactions: boolean; constructor(client: Queryable, depth?: number); exec(query: string): Promise; prepare(sql: string, options?: PrepareOptions): PreparedStatement; close(): Promise; batch(queries: Array): Promise>>; transaction(run: (inner: AsyncDriver) => Promise, options: TransactionOptions['postgres']): Promise; } export declare function connect(client: Queryable): AsyncDatabase<'postgres'>; export {};