Skip to content

feat(dms): split DBTypeGaussDB / DBTypeGaussDBForMySQL for data export (#2868)#626

Merged
BugsGuru merged 1 commit into
mainfrom
feat-2868
May 21, 2026
Merged

feat(dms): split DBTypeGaussDB / DBTypeGaussDBForMySQL for data export (#2868)#626
BugsGuru merged 1 commit into
mainfrom
feat-2868

Conversation

@actiontech-bot
Copy link
Copy Markdown
Member

@actiontech-bot actiontech-bot commented May 21, 2026

User description

Summary

支持 Issue #2868 GaussDB 数据导出, 在 dms CE 公共常量层与 CloudBeaver 桥层落地以下改动:

  • DBTypeGaussDB 字面值由 GaussDB / openGauss 收紧为 GaussDB (PostgreSQL 协议, sqle-gaussdb-plugin 注册 SQLE driver; dms-ee 数据导出经 openGauss 官方 Go 驱动直连)
  • 新增 DBTypeGaussDBForMySQL = GaussDB for MySQL (MySQL 协议, 与 DBTypeGaussDB 完全独立, 走 MySQL 驱动)
  • ParseDBType 拆分 GaussDB / GaussDB for MySQL 两个 case, 修正历史误归类
  • supportedDataExportDBTypes 同步加入 DBTypeGaussDBForMySQL
  • CloudBeaver GenerateCloudbeaverConnectionParams 新增 DBTypeGaussDBForMySQL 分支, 复用 fillMySQLParams
  • 单测: TestParseDBType / TestCheckDBTypeIfDataExportSupported_NewTypes 增加 GaussDB / GaussDB for MySQL 双键覆盖; 顺手修正 TestParseDBType_PolarDB 中 DBTypePolarDBMySQL -> DBTypePolarDBForMySQL

EE 侧 (dms-ee 仓库) 在 dataQuery 层独立实现 NewGaussDBConn(), 通过 openGauss 官方 Go 驱动 (注册名 opengauss) 解决华为云 GaussDB 商业版 RFC5802 SHA-256 / SM3 私有认证机制 lib/pq 不兼容的问题, 对应 PR: actiontech/dms-ee#pr-ee-2868.

Fixes actiontech/sqle-ee#2868

Test plan

  • go vet ./internal/dms/pkg/constant/... 通过
  • go test ./internal/dms/pkg/constant/... 通过 (Local: ok)
  • go test ./internal/sql_workbench/service/... 通过 (Local: ok)
  • 与 dms-ee#pr-ee-2868 合并后, dms-ee 数据导出可经 NewGaussDBConn() 连接 GaussDB / openGauss

Description

  • 拆分 GaussDB 与 GaussDB for MySQL

  • 修改常量定义及映射

  • 更新单元测试覆盖新分支


Diagram Walkthrough

flowchart LR
  A["原始 ParseDBType 解析"] --> B["拆分 GaussDB 与 MySQL 分支"]
  B --> C["更新常量定义"]
  C --> D["调整测试预期"]
Loading

File Walkthrough

Relevant files
Enhancement
const.go
分离 GaussDB 与 GaussDB for MySQL 常量定义                                           

internal/dms/pkg/constant/const.go

  • 在 ParseDBType 中新增 GaussDB 与 GaussDB for MySQL 分支
  • 修改常量定义, 分离 GaussDB 与 GaussDB for MySQL 的字面值
  • 更新支持数据导出白名单
+37/-34 
Tests
const_test.go
更新测试用例验证拆分逻辑                                                                                         

internal/dms/pkg/constant/const_test.go

  • 更新单元测试验证新拆分逻辑
  • 修改测试预期值以反映独立分支
+7/-3     

@github-actions
Copy link
Copy Markdown

PR Reviewer Guide 🔍

⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
🧪 PR contains tests
🔒 No security concerns identified
⚡ No major issues detected

@github-actions
Copy link
Copy Markdown

PR Code Suggestions ✨

No code suggestions found for the PR.

@BugsGuru BugsGuru merged commit dfea6a0 into main May 21, 2026
1 check passed
@BugsGuru BugsGuru deleted the feat-2868 branch May 21, 2026 05:25
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.

3 participants