import Database from 'better-sqlite3';
export declare function initDb(dbPath: string): void;
export declare function getDb(): Database.Database;
/**
 * Execute a SQL query with compatible interface.
 * Returns { rows: T[], rowCount: number }.
 * Detects SELECT/WITH/RETURNING to use .all(), otherwise .run().
 */
export declare function query<T>(sql: string, params?: unknown[]): {
    rows: T[];
    rowCount: number;
};
export declare function withTransaction<T>(fn: () => T): T;
export declare function closeDb(): void;
