import Database from "better-sqlite3"; /** * Initialize the SQLite backend. Must be called before using other functions. */ export declare function initDatabase(): Promise; /** * Reset the cached database connection. * This is primarily used for testing to ensure each test gets a fresh connection. */ export declare function resetDatabaseCache(): void; export declare function query(sql: string): string; export declare function queryJson(sql: string): T[]; export declare function execute(sql: string): void; export declare function runScript(script: string): void; /** * Get the raw better-sqlite3 database instance. * Useful for transactions or other advanced features. */ export declare function getDb(): Database.Database; /** * Helper to run code within a transaction. */ export declare function transaction(fn: () => T): T;