Documentation ¶
Index ¶
- Variables
- type Mysql
- func (db *Mysql) BeginTransactions() *SqlTxStruct
- func (db *Mysql) BeginTransactionsWithLevel(level sql.IsolationLevel) *SqlTxStruct
- func (db *Mysql) BeginTransactionsWithReadCommitted() *SqlTxStruct
- func (db *Mysql) BeginTransactionsWithReadUncommitted() *SqlTxStruct
- func (db *Mysql) BeginTransactionsWithRepeatableRead() *SqlTxStruct
- func (db *Mysql) Exec(query string, args ...interface{}) sql.Result
- func (db *Mysql) GetName() string
- 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{})
- func (db *Mysql) WithTransactionByLevel(level sql.IsolationLevel, 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) BeginTransactionsWithLevel ¶
func (db *Mysql) BeginTransactionsWithLevel(level sql.IsolationLevel) *SqlTxStruct
func (*Mysql) BeginTransactionsWithReadCommitted ¶
func (db *Mysql) BeginTransactionsWithReadCommitted() *SqlTxStruct
func (*Mysql) BeginTransactionsWithReadUncommitted ¶
func (db *Mysql) BeginTransactionsWithReadUncommitted() *SqlTxStruct
func (*Mysql) BeginTransactionsWithRepeatableRead ¶
func (db *Mysql) BeginTransactionsWithRepeatableRead() *SqlTxStruct
func (*Mysql) QueryWithConnection ¶
func (*Mysql) WithTransaction ¶
func (*Mysql) WithTransactionByLevel ¶
type SqlTxStruct ¶
type TxFn ¶
type TxFn func(*SqlTxStruct) (error, map[string]interface{})
Click to show internal directories.
Click to hide internal directories.