import { DatabaseClient, PooledConnection, QueryResult, QueryExecutionOptions } from './database-client.interface'; import type { PoolConfig } from './types'; type Pool = any; /** * DatabaseClient implementation for the 'pg' library * @see https://node-postgres.com/ * * NOTE: This requires the 'pg' package to be installed: * npm install pg */ export declare class PgClient extends DatabaseClient { private pool; private ownsConnection; /** * Create a PgClient * @param config - Either a PoolConfig object or an existing pg.Pool instance */ constructor(config: PoolConfig | Pool); query(sql: string, params?: any[], _options?: QueryExecutionOptions): Promise>; connect(): Promise; end(): Promise; getDriverName(): string; /** * Execute a callback within a transaction. * Uses pg's connection-based transaction with BEGIN/COMMIT/ROLLBACK. */ transaction(callback: (query: (sql: string, params?: any[]) => Promise) => Promise): Promise; /** * pg library does NOT support retrieving ALL result sets from multi-statement queries * It only returns the last result, making it unsuitable for the fully optimized approach * Use PostgresClient (postgres library) for true single-roundtrip multi-statement support */ supportsMultiStatementQueries(): boolean; /** * pg has no binary result protocol toggle. The previous implementation * mapped `useBinaryProtocol` to pg's `rowMode: 'array'`, which is NOT the * binary protocol — it changes the row SHAPE to positional arrays and would * corrupt every column-name-based result mapping downstream. */ supportsBinaryProtocol(): boolean; /** * Get access to the underlying pg Pool for advanced use cases */ getPool(): Pool; } export {}; //# sourceMappingURL=pg-client.d.ts.map