feat(driver): 新增 OceanBase 与 OpenGauss Agent 数据源

- 数据源支持:新增 OceanBase 与 OpenGauss optional driver-agent 实现
- 连接适配:复用 MySQL/PostgreSQL 兼容链路并补齐查询、DDL、同步能力
- 前端入口:补充连接表单、侧边栏、图标、SQL 方言和危险操作识别
- 驱动管理:更新 driver manifest、安装提示和 revision 自动生成链路
- 构建发布:支持多平台 driver-agent 打包并优化 release 构建失败提示
This commit is contained in:
Syngnat
2026-04-30 13:13:01 +08:00
parent c92959f3e8
commit 7fd6d78c83
55 changed files with 859 additions and 178 deletions

View File

@@ -22,7 +22,7 @@ func quoteIdentByType(dbType string, ident string) string {
}
switch dbType {
case "mysql", "mariadb", "diros", "sphinx", "clickhouse", "tdengine":
case "mysql", "mariadb", "oceanbase", "diros", "sphinx", "clickhouse", "tdengine":
return "`" + strings.ReplaceAll(ident, "`", "``") + "`"
case "sqlserver":
escaped := strings.ReplaceAll(ident, "]", "]]")
@@ -74,7 +74,7 @@ func normalizeSchemaAndTable(dbType string, dbName string, tableName string) (st
}
switch strings.ToLower(strings.TrimSpace(dbType)) {
case "postgres", "kingbase", "highgo", "vastbase":
case "postgres", "kingbase", "highgo", "vastbase", "opengauss":
return "public", rawTable
case "duckdb":
return "main", rawTable
@@ -93,7 +93,7 @@ func qualifiedNameForQuery(dbType string, schema string, table string, original
}
switch strings.ToLower(strings.TrimSpace(dbType)) {
case "postgres", "kingbase", "highgo", "vastbase":
case "postgres", "kingbase", "highgo", "vastbase", "opengauss":
s := strings.TrimSpace(schema)
if s == "" {
s = "public"
@@ -111,7 +111,7 @@ func qualifiedNameForQuery(dbType string, schema string, table string, original
return raw
}
return s + "." + table
case "mysql", "mariadb", "diros", "sphinx", "clickhouse", "tdengine":
case "mysql", "mariadb", "oceanbase", "diros", "sphinx", "clickhouse", "tdengine":
s := strings.TrimSpace(schema)
if s == "" || table == "" {
return table