feat: 新增 ClickHouse / Doris / SQL Server 数据源支持 - #3
Open
Dgwkuke wants to merge 7 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概述
按本项目既有的「每数据源一整套 CLI 模板 + 元数据 SQL + 解析器 + 连接表单」架构,新增三类数据源的完整支持:
clickhouse-client(stdin 批处理、--multiquery --format TSV),密码走CLICKHOUSE_PASSWORD环境变量,默认端口 9000mysqlCLI(FE MySQL 协议),默认端口 9030,密码走MYSQL_PWDsqlcmd(-S/-U/-E/-d/-W/-s/-h/-1/-C),密码走SQLCMDPASSWORD环境变量,默认端口 1433;工作台「库」= 当前库内 schema,跨库操作走 SQL三类均完整接入:
/connect连通验证、/schemas/tables/describe元数据、/query、sqlcmd 工具、只读护栏语句分类、浏览器连接表单与草稿持久化、中英文案与预设 persona。关键实现点
src/clients.ts:9 类型默认端口/命令/参数、连接参数、凭据 env、元数据 SQL 与解析器src/routes.ts:validateConnectBody白名单 +3;修复 routes 行clients固定为{}的缺口src/client/*:表单新选项 + 默认端口 + localStorage v1 白名单 + zh/en 标签lib/已重建设计决策
-C(信任服务器证书),可覆盖测试证据
pnpm test:95 个单元测试全绿pnpm typecheck:0 errortests/integration-smoke.spec.ts:opt-in 真实环境集成冒烟,已对 ClickHouse 26.7.3.19 / Doris FE 9030 / SQL Server 2022 实测 15/15 通过兼容性
type枚举 +3)clients配置为纯增量;不新增 npm 依赖,不改执行模型