feat(highgo-sm3): 增加瀚高SM3专用驱动并解耦PostgreSQL连接链路

- 引入 third_party/highgo-pq 作为 HighGo 专用驱动实现
- 调整驱动注册与连接入口,避免覆盖 postgres 驱动
- 保持 PG 数据源行为不变并补充接入文档
This commit is contained in:
Syngnat
2026-02-10 17:42:28 +08:00
parent 52abed83e6
commit de8fb60a30
76 changed files with 16980 additions and 30 deletions

View File

@@ -15,7 +15,7 @@ import (
"GoNavi-Wails/internal/ssh"
"GoNavi-Wails/internal/utils"
_ "github.com/lib/pq" // HighGo is PostgreSQL compatible
_ "github.com/highgo/pq-sm3" // HighGo uses dedicated SM3-capable driver
)
// HighGoDB implements Database interface for HighGo (瀚高) database
@@ -80,7 +80,7 @@ func (h *HighGoDB) Connect(config connection.ConnectionConfig) error {
dsn = h.getDSN(config)
}
db, err := sql.Open("postgres", dsn)
db, err := sql.Open("highgo", dsn)
if err != nil {
return fmt.Errorf("打开数据库连接失败:%w", err)
}