Versions in this module Expand all Collapse all v0 v0.0.2 Sep 19, 2018 Changes in this version + var DB = Mysql + type Mysql struct + Once sync.Once + SqlDBmap map[string]*sql.DB + func GetMysqlDB() *Mysql + func (db *Mysql) BeginTransactions() *SqlTxStruct + func (db *Mysql) BeginTransactionsByLevel() *SqlTxStruct + func (db *Mysql) Exec(query string, args ...interface{}) sql.Result + func (db *Mysql) InitDB(cfglist map[string]config.Database) + func (db *Mysql) Query(query string, args ...interface{}) ([]map[string]interface{}, *sql.Rows) + func (db *Mysql) QueryWithConnection(con string, query string, args ...interface{}) ([]map[string]interface{}, *sql.Rows) + func (db *Mysql) WithTransaction(fn TxFn) (err error, res map[string]interface{}) + type SqlTxStruct struct + Tx *sql.Tx + func (SqlTx *SqlTxStruct) Exec(query string, args ...interface{}) (sql.Result, error) + func (SqlTx *SqlTxStruct) Query(query string, args ...interface{}) ([]map[string]interface{}, error) + type TxFn func(*SqlTxStruct) (error, map[string]interface{})