import pg from 'pg'; import type { QueryResult, QueryResultRow } from 'pg'; const pool = new pg.Pool({ connectionString: process.env.DATABASE_URL, }); export const query = ( text: string, params?: unknown[] ): Promise> => pool.query(text, params); export const getPool = (): pg.Pool => pool; export const close = (): Promise => pool.end(); export default pool;