/** * Database Configuration - Unified Storage Backend Selection * * Automatically selects between: * - Local development: SQLite + LanceDB (file-based, zero config) * - Production/hosted: PostgreSQL + pgvector (persistent, scalable) * * Selection is based on DATABASE_URL environment variable. */ export type PrismaClientType = import('@prisma/client').PrismaClient; /** * Database configuration for SQLite backend */ interface SqliteConfig { backend: 'sqlite'; sqlitePath: string; vectorDbPath: string; pooling: false; } /** * Database configuration for Postgres backend */ interface PostgresConfig { backend: 'postgres'; databaseUrl: string; pooling: true; poolSize: number; } export type DatabaseConfig = SqliteConfig | PostgresConfig; /** * Detect which storage backend to use based on environment */ export declare function detectStorageBackend(): 'sqlite' | 'postgres'; /** * Get database configuration based on environment */ export declare function getDatabaseConfig(): DatabaseConfig; /** * Get or create the global Prisma client * * Only creates a client if using Postgres backend. * Returns null for SQLite backend or if Prisma is not available. */ export declare function getPrismaClient(): Promise; /** * Initialize database connection * * For Postgres: Tests connection and runs migrations if needed * For SQLite: Returns immediately (initialization happens in EmbeddedStore) */ export declare function initializeDatabase(): Promise; /** * Close database connections */ export declare function closeDatabase(): Promise; /** * Check if Postgres backend is available and configured */ export declare function isPostgresAvailable(): boolean; /** * Get connection info for logging (sanitized) */ export declare function getConnectionInfo(): Record; /** * Environment variables documentation */ export declare const DATABASE_ENV_VARS: { DATABASE_URL: string; SQLITE_PATH: string; VECTOR_DB_PATH: string; DATABASE_POOL_SIZE: string; DEBUG_PRISMA: string; }; export {}; //# sourceMappingURL=database-config.d.ts.map