Versions in this module Expand all Collapse all v1 v1.0.0 Dec 28, 2022 Changes in this version + type DB struct + func Open(driverName, dataSourceNames string) (*DB, error) + func (db *DB) Begin() (*sqlx.Tx, error) + func (db *DB) BeginTx(ctx context.Context, opts *sql.TxOptions) (*sqlx.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() *sqlx.DB + func (db *DB) Ping() error + func (db *DB) PingContext(ctx context.Context) error + func (db *DB) Preparex(query string) (*sqlx.Stmt, error) + func (db *DB) PreparexContext(ctx context.Context, query string) (*sqlx.Stmt, error) + func (db *DB) PreparexSlave(query string) (*sqlx.Stmt, error) + func (db *DB) PreparexSlaveContext(ctx context.Context, query string) (*sqlx.Stmt, error) + func (db *DB) QueryxSlave(query string, args ...interface{}) (*sqlx.Rows, error) + func (db *DB) QueryxSlaveContext(ctx context.Context, query string, args ...interface{}) (*sqlx.Rows, error) + func (db *DB) Select(dest interface{}, query string, args ...interface{}) error + func (db *DB) SelectContext(ctx context.Context, dest interface{}, query string, args ...interface{}) error + func (db *DB) SetConnMaxLifetime(d time.Duration) + func (db *DB) SetMaxIdleConns(n int) + func (db *DB) SetMaxOpenConns(n int) + func (db *DB) Slave() *sqlx.DB + type Stmt interface + Close func() error + Exec func(...interface{}) (sql.Result, error) + Query func(...interface{}) (*sql.Rows, error) + QueryRow func(...interface{}) *sql.Row