feat: add opengauss driver for test
This commit is contained in:
parent
bcfbbe1d6e
commit
f7301754ad
|
@ -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"
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue