Skip to content

feat(driver): add DriverTypeOpenGauss constant for openGauss data source#3313

Open
actiontech-bot wants to merge 2 commits into
mainfrom
fix-2905-gaussdb-opengauss-structure-diff
Open

feat(driver): add DriverTypeOpenGauss constant for openGauss data source#3313
actiontech-bot wants to merge 2 commits into
mainfrom
fix-2905-gaussdb-opengauss-structure-diff

Conversation

@actiontech-bot
Copy link
Copy Markdown
Member

概述

为 SQLE 增加 DriverTypeOpenGauss = "openGauss" 字面常量,对接 sqle-gaussdb-plugin 仓库新增的 openGauss 数据源支持,使 SQLE 能识别并路由 openGauss 类型数据源到对应插件。

关联 EE 仓库主 Issue:actiontech/sqle-ee#2905
关联 EE PR:actiontech/sqle-ee 仓库 fix-2905-gaussdb-opengauss-structure-diff 分支

变更

  • sqle/driver/v2/util.go:在 DriverType* 常量区域新增 DriverTypeOpenGauss = "openGauss",紧跟 DriverTypeGaussDB 之后;字面值严格保留原大小写,不做归一化(与 design §4.4 严格匹配契约一致)
  • sqle/driver/v2/util_test.go:新增 TestDriverTypeOpenGauss_Const 断言常量字面值,并回归断言 DriverTypeGaussDB == "GaussDB",防止后续误改

测试

  • go test ./sqle/driver/v2/... 全部通过
  • go vet ./sqle/driver/v2/... 通过

影响面

  • 仅新增常量与对应单测;无 schema 变更、无存量数据回填、无默认数据集合变更
  • 已确认无启动钩子函数被新增方法(data-upgrade skill 扫描通过)

…2905)

新增 driverV2.DriverTypeOpenGauss = "openGauss" 常量,用于 sqle-ee 主仓识别
openGauss 数据源类型。字面值首字母小写 o + G 大写,与 design §4.4 严格匹配契约
对齐;与即将在 code_review 阶段同步落地的 sqle CE 副本保持完全一致。

本 commit 仅修改常量定义,不做任何字符串归一化(lower/trim/EqualFold 等)。
配套单测见后续 commit。
…values (#2905)

新增 sqle/driver/v2/util_test.go,map case 形态:
- openGauss literal: DriverTypeOpenGauss == "openGauss"
- GaussDB literal regression: DriverTypeGaussDB == "GaussDB"

字面值大小写敏感(!= 直接对比,不用 strings.EqualFold)。任何归一化都会让
本测试 fail,提示 code_review 同步落地的 sqle CE 副本必须保持完全一致。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants