/**
 * PostgreSQL connection pool and transaction helpers.
 * Replaces ingestion/db.py — uses DATABASE_URL env var (set by devenv.nix).
 */
import pg from "pg";
/** Get or create the shared connection pool. */
export declare function getPool(): pg.Pool;
/**
 * Run a function inside a transaction.
 * Automatically BEGINs, COMMITs on success, ROLLBACKs on error.
 */
export declare function withTransaction<T>(fn: (client: pg.PoolClient) => Promise<T>): Promise<T>;
/**
 * Run a single query (no explicit transaction — auto-commit).
 * Good for SELECTs and simple single-statement writes.
 */
export declare function query<T extends pg.QueryResultRow = Record<string, unknown>>(text: string, values?: unknown[]): Promise<pg.QueryResult<T>>;
/** Ensure an investigation row exists (idempotent). */
export declare function ensureInvestigation(client: pg.PoolClient, id: string): Promise<void>;
/** Gracefully close the pool (call on process exit). */
export declare function closePool(): Promise<void>;
/** ISO timestamp for collected_at fields. */
export declare function now(): string;
//# sourceMappingURL=db.d.ts.map