Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DbFacade ¶
type DbFacade struct { SqlDb *sql.DB SqlDbCtrl *commonDb.DbController GormDb *gorm.DB SqlxDb *sqlx.DB SqlxDbCtrl *commonSqlx.DbController // contains filtered or unexported fields }
Gives facade interface supporting multiple object of db
This facade supports:
gorm - github.com/jinzhu/gorm sqlx - github.com/Cepave/open-falcon-backend/common/db/sqlx database/sql.DB dbCtrl
func (*DbFacade) NewDbCtrl ¶
func (facade *DbFacade) NewDbCtrl() *commonDb.DbController
Generates a new controller of sql.DB
func (*DbFacade) NewSqlxDbCtrl ¶
func (facade *DbFacade) NewSqlxDbCtrl() *commonSqlx.DbController
Generates a new controller of sqlx.DB
Click to show internal directories.
Click to hide internal directories.