Commit 46c30bb4 authored by Shane O'Neill's avatar Shane O'Neill

Change return type to an interface

parent 5cefdd53
......@@ -24,7 +24,7 @@ import (
type DbIM interface {
GetDb() *sql.DB
GetDbx() *sqlx.DB
NewDbMap(db *sql.DB, dialect Dialect) DbIM
NewDbMap(db *sql.DB, dialect Dialect) *DbIM
TraceOn(prefix string, logger *log.Logger)
TraceOff()
AddTable(i interface{}, name ...string) *TableMap
......@@ -80,7 +80,7 @@ type DbMap struct {
}
// NewDbMap returns a new DbMap using the db connection and dialect
func NewDbMap(db *sql.DB, dialect Dialect) *DbMap {
func NewDbMap(db *sql.DB, dialect Dialect) *DbIM {
return &DbMap{Db: db, Dialect: dialect, Dbx: sqlx.NewDb(db, dialect.DriverName())}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment