Skip to content

feat(sql_workbench): add DM datasource type mapping and support check#599

Merged
BugsGuru merged 1 commit intomainfrom
dms/feat-780
Apr 23, 2026
Merged

feat(sql_workbench): add DM datasource type mapping and support check#599
BugsGuru merged 1 commit intomainfrom
dms/feat-780

Conversation

@LordofAvernus
Copy link
Copy Markdown
Collaborator

@LordofAvernus LordofAvernus commented Apr 22, 2026

User description

Summary

  • Add DM (达梦) database type mapping in convertDBType(): maps "达梦(DM)" to ODC DialectType "DM"
  • Add pkgConst.DBTypeDM to SupportDBType() whitelist for SQL workbench support
  • Add table-driven unit tests for both convertDBType() and SupportDBType() functions

Fixes https://github.com/actiontech/dms-ee/issues/780


Description

  • 增加 "达梦(DM)" 数据库类型映射支持

  • 更新 SupportDBType 白名单,增加 pkgConst.DBTypeDM

  • 添加单元测试验证转换逻辑和支持检查


Diagram Walkthrough

flowchart LR
  A["修改 convertDBType 支持达梦"]
  B["更新 SupportDBType 添加 DBTypeDM"]
  C["新增单元测试验证功能"]
  A -- "后续" --> B
  B -- "验证" --> C
Loading

File Walkthrough

Relevant files
Enhancement
sql_workbench_service.go
增加达梦数据库类型映射与支持检查                                                                                 

internal/sql_workbench/service/sql_workbench_service.go

  • 添加 "达梦(DM)" 映射分支于 switch 语句中
  • 更新 SupportDBType 函数,增加 pkgConst.DBTypeDM 判断
+3/-1     
Tests
sql_workbench_service_test.go
新增单元测试验证达梦支持功能                                                                                     

internal/sql_workbench/service/sql_workbench_service_test.go

  • 新增单元测试验证 convertDBType 转换逻辑
  • 验证 SupportDBType 对 pkgConst.DBTypeDM 的处理
+55/-0   

… #780

- Add "达梦(DM)" -> "DM" case in convertDBType() for ODC DialectType mapping
- Add pkgConst.DBTypeDM to SupportDBType() whitelist
- Add table-driven unit tests for both functions (14 test cases)
@actiontech-bot actiontech-bot requested a review from iwanghc April 22, 2026 08:25
@github-actions
Copy link
Copy Markdown

PR Reviewer Guide 🔍

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 PR contains tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

@github-actions
Copy link
Copy Markdown

PR Code Suggestions ✨

No code suggestions found for the PR.

@BugsGuru BugsGuru merged commit 04f3d9b into main Apr 23, 2026
1 check passed
@BugsGuru BugsGuru deleted the dms/feat-780 branch April 23, 2026 06:41
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