Documentation
¶
Index ¶
- type MySQLCli
- func (mc *MySQLCli) Delete(deleteSQL string, args ...interface{}) (sql.Result, error)
- func (mc *MySQLCli) Insert(insertSQL string, args ...interface{}) (sql.Result, error)
- func (mc *MySQLCli) Query(selectSQL string, args ...interface{}) (*sql.Row, error)
- func (mc *MySQLCli) Update(updateSQL string, args ...interface{}) (sql.Result, error)
- type MySQLConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MySQLCli ¶
type MySQLConfig ¶
type MySQLConfig struct {
Rawurl string `json:"rawurl"`
MaxOpenConns int `json:"max_open_conns"`
MaxIdleConns int `json:"max_idle_conns"`
ConnMaxLifetime time.Duration `json:"conn_max_lifetime"`
}
func (*MySQLConfig) NewConnection ¶
func (mc *MySQLConfig) NewConnection() (mysqlCli MySQLCli, err error)
新建一个mysql连接,返回连接
Click to show internal directories.
Click to hide internal directories.