mirror of https://github.com/go-gorm/gorm.git
Fix get database connection for prepared stmt, close #4214
This commit is contained in:
parent
26e0c6fb69
commit
a8b72546c1
|
@ -18,7 +18,7 @@ type PreparedStmtDB struct {
|
||||||
ConnPool
|
ConnPool
|
||||||
}
|
}
|
||||||
|
|
||||||
func (db *PreparedStmtDB) GetDB() (*sql.DB, error) {
|
func (db *PreparedStmtDB) GetDBConn() (*sql.DB, error) {
|
||||||
if dbConnector, ok := db.ConnPool.(GetDBConnector); ok && dbConnector != nil {
|
if dbConnector, ok := db.ConnPool.(GetDBConnector); ok && dbConnector != nil {
|
||||||
return dbConnector.GetDBConn()
|
return dbConnector.GetDBConn()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue