feat(driver): add DriverTypeOpenGauss constant for openGauss data source#3313
Open
actiontech-bot wants to merge 2 commits into
Open
feat(driver): add DriverTypeOpenGauss constant for openGauss data source#3313actiontech-bot wants to merge 2 commits into
actiontech-bot wants to merge 2 commits into
Conversation
…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 副本必须保持完全一致。
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.
概述
为 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/...通过影响面