Documentation ¶
Index ¶
- Variables
- type 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
- type TxFn
Constants ¶
This section is empty.
Variables ¶
View Source
var DB = Mysql{ SqlDBmap: map[string]*sql.DB{}, }
Functions ¶
This section is empty.
Types ¶
type Mysql ¶
func GetMysqlDB ¶
func GetMysqlDB() *Mysql
func (*Mysql) BeginTransactions ¶
func (db *Mysql) BeginTransactions() *SqlTxStruct
func (*Mysql) BeginTransactionsByLevel ¶
func (db *Mysql) BeginTransactionsByLevel() *SqlTxStruct
func (*Mysql) QueryWithConnection ¶
type SqlTxStruct ¶
type TxFn ¶
type TxFn func(*SqlTxStruct) (error, map[string]interface{})
Click to show internal directories.
Click to hide internal directories.