multibridge
Version:
A multi-database connection framework with centralized configuration
23 lines (22 loc) • 689 B
TypeScript
import { ConnectVo } from "../context/tenantContext";
import { AnyConnection } from "../types/dbTypes";
interface ConnectionData {
connection: AnyConnection;
dbType: string;
config?: {
schema?: string;
};
lastValidated?: number;
}
export declare function getConnection(tenant?: ConnectVo): Promise<ConnectionData>;
export declare function closeConnection(tenant?: ConnectVo): Promise<void>;
export declare function closeAllConnections(): Promise<void>;
/**
* Get connection pool statistics for monitoring
*/
export declare function getConnectionStats(): {
cachedConnections: number;
pendingConnections: number;
cacheMaxSize: number;
};
export {};