Documentation ¶
Overview ¶
Package mysql provides the library to communicate to mysql
Index ¶
- func Connect(datasource string, maxactive, maxidle int) (*sqlx.DB, error)
- type RetryDB
- func (rdb *RetryDB) Exec(query string, args ...interface{}) (sql.Result, error)
- func (rdb *RetryDB) Get(dest interface{}, query string, args ...interface{}) error
- func (rdb *RetryDB) NamedExec(query string, arg interface{}) (sql.Result, error)
- func (rdb *RetryDB) NamedQuery(query string, arg interface{}) (*sqlx.Rows, error)
- func (rdb *RetryDB) PrepareNamed(query string) (*RetryNamedStmt, error)
- func (rdb *RetryDB) Preparex(query string) (*RetryStmt, error)
- func (rdb *RetryDB) Query(query string, args ...interface{}) (*sql.Rows, error)
- func (rdb *RetryDB) Queryx(query string, args ...interface{}) (*sqlx.Rows, error)
- func (rdb *RetryDB) Select(dest interface{}, query string, args ...interface{}) error
- type RetryNamedStmt
- func (n *RetryNamedStmt) Close() error
- func (n *RetryNamedStmt) Exec(arg interface{}) (sql.Result, error)
- func (n *RetryNamedStmt) Get(dest interface{}, arg interface{}) error
- func (n *RetryNamedStmt) MustExec(arg interface{}) sql.Result
- func (n *RetryNamedStmt) Query(args interface{}) (*sql.Rows, error)
- func (n *RetryNamedStmt) QueryRow(arg interface{}) *sqlx.Row
- func (n *RetryNamedStmt) QueryRowx(arg interface{}) *sqlx.Row
- func (n *RetryNamedStmt) Queryx(args interface{}) (*sqlx.Rows, error)
- func (n *RetryNamedStmt) Select(dest interface{}, arg interface{}) error
- func (n *RetryNamedStmt) Unsafe() *RetryNamedStmt
- type RetryStmt
- func (rs *RetryStmt) Exec(arg interface{}) (sql.Result, error)
- func (rs *RetryStmt) Get(dest interface{}, args ...interface{}) error
- func (rs *RetryStmt) Query(args ...interface{}) (*sql.Rows, error)
- func (rs *RetryStmt) Select(dest interface{}, args ...interface{}) error
- func (rs *RetryStmt) Unsafe() *RetryStmt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RetryDB ¶
func ConnectWithRetry ¶
Connect initializes mysql DB
func (*RetryDB) NamedQuery ¶
func (*RetryDB) PrepareNamed ¶
func (rdb *RetryDB) PrepareNamed(query string) (*RetryNamedStmt, error)
type RetryNamedStmt ¶
func (*RetryNamedStmt) Close ¶
func (n *RetryNamedStmt) Close() error
func (*RetryNamedStmt) Get ¶
func (n *RetryNamedStmt) Get(dest interface{}, arg interface{}) error
Get using this NamedStmt
func (*RetryNamedStmt) MustExec ¶
func (n *RetryNamedStmt) MustExec(arg interface{}) sql.Result
func (*RetryNamedStmt) QueryRow ¶
func (n *RetryNamedStmt) QueryRow(arg interface{}) *sqlx.Row
func (*RetryNamedStmt) QueryRowx ¶
func (n *RetryNamedStmt) QueryRowx(arg interface{}) *sqlx.Row
func (*RetryNamedStmt) Queryx ¶
func (n *RetryNamedStmt) Queryx(args interface{}) (*sqlx.Rows, error)
func (*RetryNamedStmt) Select ¶
func (n *RetryNamedStmt) Select(dest interface{}, arg interface{}) error
func (*RetryNamedStmt) Unsafe ¶
func (n *RetryNamedStmt) Unsafe() *RetryNamedStmt
Click to show internal directories.
Click to hide internal directories.