Documentation
¶
Index ¶
- type MysqlClient
- func (mc *MysqlClient) CreateBareDB() *sql.DB
- func (mc *MysqlClient) CreateDB() *sql.DB
- func (mc *MysqlClient) Insert(sql, dbname string, args ...interface{}) (sql.Result, error)
- func (mc *MysqlClient) QueryMore(sql string, args ...interface{}) (*sql.Rows, error)
- func (mc *MysqlClient) QueryOne(sql, dbname string, args ...interface{}) *sql.Row
- func (mc *MysqlClient) STMTFactory(predSQL string, db *sql.DB) *sql.Stmt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MysqlClient ¶
type MysqlClient struct { Address string Port string User string Password string DBName string DBPath string }
func NewMysqlClient ¶
func NewMysqlClient() *MysqlClient
func (*MysqlClient) CreateBareDB ¶
func (mc *MysqlClient) CreateBareDB() *sql.DB
CreateBareDB create *sql.DB without connecting to specific database
func (*MysqlClient) CreateDB ¶
func (mc *MysqlClient) CreateDB() *sql.DB
CreateDB create *sql.DB connecting to specific database
func (*MysqlClient) Insert ¶
func (mc *MysqlClient) Insert(sql, dbname string, args ...interface{}) (sql.Result, error)
func (*MysqlClient) QueryMore ¶
func (mc *MysqlClient) QueryMore(sql string, args ...interface{}) (*sql.Rows, error)
func (*MysqlClient) QueryOne ¶
func (mc *MysqlClient) QueryOne(sql, dbname string, args ...interface{}) *sql.Row
func (*MysqlClient) STMTFactory ¶
STMTFactory return *sql.Stmt and handle error
Click to show internal directories.
Click to hide internal directories.