Versions in this module Expand all Collapse all v0 v0.2.0 Feb 20, 2023 Changes in this version + func OptBindvar(p bindvar.Parser) func(c *Config) + func OptDriver(s string) func(c *Config) + func OptQuiet() func(c *Config) + func OptTemplate(e template.Executer) func(c *Config) + type Config struct + func NewConfig(opts ...func(*Config)) *Config v0.1.1 Dec 16, 2022 Changes in this version + func ExecContext(db Execer, ctx context.Context, query string, data interface{}, ...) (sql.Result, error) + type DB struct + func MustOpen(driver, dsn string) *DB + func New(db *sql.DB) (*DB, error) + func Open(driver, dsn string) (*DB, error) + func (db *DB) Begin() (*Tx, error) + func (db *DB) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error) + func (db *DB) Exec(query string, data interface{}) (sql.Result, error) + func (db *DB) ExecContext(ctx context.Context, query string, data interface{}) (sql.Result, error) + func (db *DB) Query(query string, data interface{}) (*Rows, error) + func (db *DB) QueryContext(ctx context.Context, query string, data interface{}) (*Rows, error) + func (db *DB) QueryRow(query string, data interface{}) *Row + func (db *DB) QueryRowContext(ctx context.Context, query string, data interface{}) *Row + type Execer interface + ExecContext func(ctx context.Context, query string, args ...interface{}) (sql.Result, error) + type ExecerQueryer interface + type Queryer interface + QueryContext func(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error) + QueryRowContext func(ctx context.Context, query string, args ...interface{}) *sql.Row + type Row struct + func QueryRowContext(db Queryer, ctx context.Context, query string, data interface{}, ...) *Row + func (r *Row) Err() error + func (r *Row) Scan(dest ...interface{}) error + func (r *Row) ScanStruct(dest interface{}) error + type Rows struct + func QueryContext(db Queryer, ctx context.Context, query string, data interface{}, ...) (*Rows, error) + func (rs *Rows) ScanStruct(dest interface{}) error + type Tx struct + func (tx *Tx) Exec(query string, data interface{}) (sql.Result, error) + func (tx *Tx) ExecContext(ctx context.Context, query string, data interface{}) (sql.Result, error) + func (tx *Tx) Query(ctx context.Context, query string, data interface{}) (*Rows, error) + func (tx *Tx) QueryContext(ctx context.Context, query string, data interface{}) (*Rows, error) v0.1.0 Dec 16, 2022