/** * Connection Manager * Manages database connections and sessions * Supports both single-connection (MCP) and multi-session (HTTP) modes */ import type { DbAdapter, DbConfig } from '../types/adapter.js'; import { DatabaseService, SchemaCacheConfig } from './database-service.js'; /** * Connection Manager Class */ export declare class ConnectionManager { private sessions; private cleanupInterval?; private sessionTimeout; private defaultCacheConfig; constructor(sessionTimeout?: number, cleanupInterval?: number, defaultCacheConfig?: Partial); /** * Create a new connection and return session ID */ connect(config: DbConfig): Promise; /** * Disconnect a session */ disconnect(sessionId: string): Promise; /** * Get adapter for a session */ getAdapter(sessionId: string): DbAdapter; /** * Get database service for a session * Returns the cached DatabaseService instance to preserve schema cache */ getService(sessionId: string): DatabaseService; /** * Check if session exists */ hasSession(sessionId: string): boolean; /** * Get session count */ getSessionCount(): number; /** * Get all session IDs */ getSessionIds(): string[]; /** * Clear schema cache for a specific session */ clearSessionCache(sessionId: string): void; /** * Clear schema cache for all sessions */ clearAllCaches(): void; /** * Cleanup expired sessions */ private cleanupExpiredSessions; /** * Disconnect all sessions and stop cleanup */ disconnectAll(): Promise; } //# sourceMappingURL=connection-manager.d.ts.map