feat(sphinx): 新增Sphinx数据源并补齐对象能力兼容链路

- 新增 SphinxDB 驱动注册并复用 MySQL 协议连接
- 前端新增 sphinx 连接类型与默认端口 9306
- 函数/视图/触发器改为多语句回退查询与版本探测提示
- 后端对不支持能力返回稳定降级结果
This commit is contained in:
杨国锋
2026-02-10 20:12:25 +08:00
parent b4f80f39df
commit e6fe6eb026
13 changed files with 641 additions and 194 deletions

View File

@@ -22,7 +22,7 @@ func quoteIdentByType(dbType string, ident string) string {
}
switch dbType {
case "mysql", "mariadb":
case "mysql", "mariadb", "sphinx":
return "`" + strings.ReplaceAll(ident, "`", "``") + "`"
case "sqlserver":
escaped := strings.ReplaceAll(ident, "]", "]]")
@@ -100,7 +100,7 @@ func qualifiedNameForQuery(dbType string, schema string, table string, original
return raw
}
return s + "." + table
case "mysql", "mariadb":
case "mysql", "mariadb", "sphinx":
s := strings.TrimSpace(schema)
if s == "" || table == "" {
return table