/** * PostgreSQL connection pool and query helpers. * Loads environment from backend or repo root, runs parameterized queries, and applies schema migrations. */ import { Pool, PoolClient } from 'pg'; declare const pool: Pool; /** Marks the current transaction as an authorized application write (bypasses DB tamper triggers). */ export declare function markAuthorizedDbChange(client: { query: (text: string, params?: unknown[]) => Promise; }): Promise; /** Starts a transaction and marks subsequent writes as application-authorized. */ export declare function beginAuthorizedTransaction(client: { query: (text: string, params?: unknown[]) => Promise; }): Promise; /** * Runs a parameterized SQL query and returns result rows. * Application queries are marked authorized so PostgreSQL tamper triggers ignore them. */ export declare function query(text: string, params?: unknown[], options?: { statementTimeoutMs?: number; }): Promise; /** Acquires a dedicated client from the connection pool. */ export declare function getClient(): Promise; /** * Applies schema.sql to the database (idempotent DDL). * Resolves schema path from cwd or compiled __dirname for dev and production. * @throws When schema.sql cannot be found on disk */ export declare function runMigrations(): Promise; /** Shared PostgreSQL connection pool for the application. */ export default pool; //# sourceMappingURL=connection.d.ts.map