GORM provides the method DB
which returns a generic database interface *sql.DB from the current *gorm.DB
// Get generic database object sql.DB to use its functions |
NOTE If the underlying database connection is not a
*sql.DB
, like in a transaction, it will returns error
Connection Pool
// Get generic database object sql.DB to use its functions |