feat: add opengauss driver for test

This commit is contained in:
robotez 2024-11-11 01:12:56 +08:00
parent bcfbbe1d6e
commit f7301754ad
2 changed files with 2 additions and 1 deletions

View File

@ -14,6 +14,7 @@ import (
"xorm.io/xorm" "xorm.io/xorm"
"xorm.io/xorm/schemas" "xorm.io/xorm/schemas"
_ "gitee.com/opengauss/openGauss-connector-go-pq"
_ "gitee.com/travelliu/dm" _ "gitee.com/travelliu/dm"
_ "github.com/go-sql-driver/mysql" _ "github.com/go-sql-driver/mysql"
_ "github.com/jackc/pgx/v4/stdlib" _ "github.com/jackc/pgx/v4/stdlib"

View File

@ -66,7 +66,7 @@ func createEngine(dbType, connStr string) error {
} }
db.Close() db.Close()
*ignoreSelectUpdate = true *ignoreSelectUpdate = true
case schemas.POSTGRES: case schemas.POSTGRES, "opengauss":
db, err := sql.Open(dbType, strings.ReplaceAll(connStr, "xorm_test", "postgres")) db, err := sql.Open(dbType, strings.ReplaceAll(connStr, "xorm_test", "postgres"))
if err != nil { if err != nil {
return err return err