sequelae-mcp
Version:
Let Claude, Cursor, and other AI agents run real SQL queries on live Postgres databases. No more copy-pasting SQL, stale schema docs, or hallucinated DB adapters — just raw, real-time access. Now with MCP support!
66 lines • 1.57 kB
TypeScript
import { Pool, PoolClient } from 'pg';
export interface PoolManagerConfig {
connectionString: string;
maxConnections?: number;
idleTimeoutMillis?: number;
connectionTimeoutMillis?: number;
statementTimeout?: number;
ssl?: boolean | {
rejectUnauthorized: boolean;
};
}
/**
* Manages a singleton connection pool for the application
*/
export declare class PoolManager {
private static instance;
private pool;
private config;
private constructor();
static getInstance(): PoolManager;
/**
* Initialize the pool with configuration
*/
initialize(config: PoolManagerConfig): void;
/**
* Get the current pool instance
*/
getPool(): Pool;
/**
* Get a client with retry logic
*/
getClient(maxRetries?: number, initialDelay?: number): Promise<PoolClient>;
/**
* Check if pool is initialized
*/
isInitialized(): boolean;
/**
* Get pool statistics
*/
getStats(): {
total: number;
idle: number;
waiting: number;
};
/**
* Get pool status information
*/
getStatus(): {
initialized: boolean;
total: number;
idle: number;
waiting: number;
maxConnections: number;
idleTimeout: number;
connectionTimeout: number;
};
/**
* Close the pool and cleanup
*/
close(): Promise<void>;
/**
* Reset the singleton instance (mainly for testing)
*/
static reset(): void;
}
//# sourceMappingURL=pool-manager.d.ts.map