♻️ refactor(oceanbase): 完善双协议连接链路

- 抽象 OceanBase 协议解析与运行态参数注入
- 复用 OracleDB 实现 OceanBase Oracle 租户连接能力
- 调整 DDL、schema、SQL 方言和数据源能力判断
- 补充协议优先级、缓存隔离和 RPC 参数测试
- 支持按指定 driver 自动生成 agent revision
This commit is contained in:
Syngnat
2026-04-30 15:05:05 +08:00
parent 98c62fd6bd
commit d2dad75167
31 changed files with 1081 additions and 63 deletions

View File

@@ -1,6 +1,6 @@
import type { ConnectionConfig } from '../types';
type ConnectionLike = Pick<ConnectionConfig, 'type' | 'driver'> | null | undefined;
type ConnectionLike = Pick<ConnectionConfig, 'type' | 'driver' | 'oceanBaseProtocol'> | null | undefined;
const normalizeDataSourceToken = (raw: string): string => {
const normalized = String(raw || '').trim().toLowerCase();
@@ -27,6 +27,9 @@ export const resolveDataSourceType = (config: ConnectionLike): string => {
const driver = normalizeDataSourceToken(String(config.driver || ''));
return driver || 'custom';
}
if (type === 'oceanbase' && String(config.oceanBaseProtocol || '').trim().toLowerCase() === 'oracle') {
return 'oracle';
}
return type;
};