[feat] 移除对 db 库的直接依赖

This commit is contained in:
2025-11-28 09:58:43 +08:00
parent 304d553b3c
commit c4590cf592
5 changed files with 65 additions and 66 deletions
+4 -1
View File
@@ -5,6 +5,9 @@ import (
"time"
"git.fsdpf.net/go/db/engine"
_ "github.com/denisenkom/go-mssqldb"
_ "github.com/go-sql-driver/mysql"
_ "github.com/mattn/go-sqlite3"
)
// TestMySQLConfig 测试 MySQL 驱动的配置
@@ -333,7 +336,7 @@ func TestToDSN(t *testing.T) {
engine.WithPassword("password"),
engine.WithPgSslmode("disable"),
),
wantDSN: "postgres://postgres:password@localhost:5432/testdb?host=localhost&port=5432&dbname=testdb&user=postgres&password=password&sslmode=disable",
wantDSN: "host=localhost port=5432 user=postgres password=password dbname=testdb sslmode=disable",
wantErr: false,
},
{