/** * Oracle 数据库适配器 * 使用 oracledb 驱动实现 DbAdapter 接口 * * 性能优化:使用批量查询获取 Schema 信息,避免 N+1 查询问题 * 连接管理:使用连接池 + 连接健康检测 + 断线自动重试,确保长连接稳定性 */ import type { DbAdapter, QueryResult, SchemaInfo } from '../types/adapter.js'; export declare class OracleAdapter implements DbAdapter { private pool; private config; private static thickModeInitialized; constructor(config: { host: string; port: number; user?: string; password?: string; database?: string; serviceName?: string; sid?: string; connectString?: string; oracleClientPath?: string; }); private isConnectionError; private withRetry; private withConnection; /** * 构建 Oracle 连接字符串 */ private buildConnectionString; /** * 连接到 Oracle 数据库 */ connect(): Promise; /** * 断开数据库连接 */ disconnect(): Promise; /** * 执行 SQL 查询 */ executeQuery(query: string, params?: unknown[]): Promise; /** * 获取数据库结构信息(批量查询优化版本) */ getSchema(): Promise; private _getSchemaImpl; private makeTableKey; /** * 组装 Schema 信息 */ private assembleSchema; /** * 格式化 Oracle 数据类型 */ private formatOracleType; /** * 检查是否为写操作 */ isWriteOperation(query: string): boolean; } //# sourceMappingURL=oracle.d.ts.map