Versions in this module Expand all Collapse all v1 v1.1.0 Oct 19, 2020 Changes in this version type DB + func (db *DB) Databases() []*sql.DB v1.0.0 Aug 4, 2019 Changes in this version + type DB struct + func Open(driverName, dataSourceNames string) (*DB, error) + func Wrap(db ...*sql.DB) (*DB, error) + func (db *DB) Begin() (*sql.Tx, error) + func (db *DB) BeginTx(ctx context.Context, opts *sql.TxOptions) (*sql.Tx, error) + func (db *DB) Close() error + func (db *DB) Driver() driver.Driver + func (db *DB) Exec(query string, args ...interface{}) (sql.Result, error) + func (db *DB) ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error) + func (db *DB) Master() *sql.DB + func (db *DB) Ping() error + func (db *DB) PingContext(ctx context.Context) error + func (db *DB) Prepare(query string) (*Stmt, error) + func (db *DB) PrepareContext(ctx context.Context, query string) (*Stmt, error) + func (db *DB) Query(query string, args ...interface{}) (*sql.Rows, error) + func (db *DB) QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error) + func (db *DB) QueryRow(query string, args ...interface{}) *sql.Row + func (db *DB) QueryRowContext(ctx context.Context, query string, args ...interface{}) *sql.Row + func (db *DB) SetConnMaxLifetime(d time.Duration) + func (db *DB) SetMaxIdleConns(n int) + func (db *DB) SetMaxOpenConns(n int) + func (db *DB) Slave() *sql.DB + type Stmt struct + func (s *Stmt) Close() error + func (s *Stmt) Exec(args ...interface{}) (sql.Result, error) + func (s *Stmt) ExecContext(ctx context.Context, args ...interface{}) (sql.Result, error) + func (s *Stmt) Master() *sql.Stmt + func (s *Stmt) Query(args ...interface{}) (*sql.Rows, error) + func (s *Stmt) QueryContext(ctx context.Context, args ...interface{}) (*sql.Rows, error) + func (s *Stmt) QueryRow(args ...interface{}) *sql.Row + func (s *Stmt) QueryRowContext(ctx context.Context, args ...interface{}) *sql.Row + func (s *Stmt) Slave() *sql.Stmt