/** * SQLite Database Connection * * Manages SQLite database connections using better-sqlite3. * Falls back to JSON file storage if SQLite fails. * * @module persistence/db */ import Database from "better-sqlite3"; import type { PersistenceConfig } from "./types.js"; export interface DbStatus { initialized: boolean; isFallbackMode: boolean; dbPath: string | null; error: string | null; } export declare function getDbStatus(): DbStatus; export declare function isInFallbackMode(): boolean; export declare function setFallbackMode(value: boolean, error?: Error): void; export declare function getDbPath(projectPath: string, config?: Partial): string; export declare class DatabaseInitError extends Error { readonly cause?: Error | undefined; readonly dbPath?: string | undefined; constructor(message: string, cause?: Error | undefined, dbPath?: string | undefined); } export declare function initDatabase(projectPath: string, config?: Partial): Promise; export declare function getDatabase(): Database.Database | null; export declare function closeDatabase(): void; export declare function createInMemoryDatabase(): Database.Database; //# sourceMappingURL=db.d.ts.map