expose sql.DB to let orm operate on it (#1015)

* expose sql.DB to let orm operate on it

* add missing RawDB methods

* add NewSqlConnFromDB for cooperate with dtm
This commit is contained in:
Kevin Wan
2021-09-09 11:40:28 +08:00
committed by GitHub
parent 56807aabf6
commit f6d9e19ecb
6 changed files with 61 additions and 10 deletions

View File

@@ -71,7 +71,7 @@ func begin(db *sql.DB) (trans, error) {
}
func transact(db *commonSqlConn, b beginnable, fn func(Session) error) (err error) {
conn, err := getSqlConn(db.driverName, db.datasource)
conn, err := db.connProv()
if err != nil {
logInstanceError(db.datasource, err)
return err