Versions in this module Expand all Collapse all v0 v0.0.1 Aug 17, 2022 Changes in this version + var ErrNoRows = errors.New("sql: no rows in result set") + var ErrTxDone = errors.New("sql: Transaction has already been committed or rolled back") + func Drivers() []string + func Register(name string, driver driver.Driver) + type DB struct + func Open(driverName, dataSourceName string) (*DB, error) + func (db *DB) Begin() (*Tx, error) + func (db *DB) Close() error + func (db *DB) Driver() driver.Driver + func (db *DB) Exec(query string, args ...interface{}) (Result, error) + func (db *DB) Ping() error + func (db *DB) Prepare(query string) (*Stmt, error) + func (db *DB) Query(query string, args ...interface{}) (*Rows, error) + func (db *DB) QueryRow(query string, args ...interface{}) *Row + func (db *DB) SetConnMaxLifetime(d time.Duration) + func (db *DB) SetMaxIdleConns(n int) + func (db *DB) SetMaxOpenConns(n int) + func (db *DB) Stats() DBStats + type DBStats struct + OpenConnections int + type NullBool struct + Bool bool + Valid bool + func (n *NullBool) Scan(value interface{}) error + func (n NullBool) Value() (driver.Value, error) + type NullFloat64 struct + Float64 float64 + Valid bool + func (n *NullFloat64) Scan(value interface{}) error + func (n NullFloat64) Value() (driver.Value, error) + type NullInt64 struct + Int64 int64 + Valid bool + func (n *NullInt64) Scan(value interface{}) error + func (n NullInt64) Value() (driver.Value, error) + type NullString struct + String string + Valid bool + func (ns *NullString) Scan(value interface{}) error + func (ns NullString) Value() (driver.Value, error) + type RawBytes []byte + type Result interface + LastInsertId func() (int64, error) + RowsAffected func() (int64, error) + type Row struct + func (r *Row) Scan(dest ...interface{}) error + type Rows struct + func (rs *Rows) Close() error + func (rs *Rows) Columns() ([]string, error) + func (rs *Rows) Err() error + func (rs *Rows) Next() bool + func (rs *Rows) Scan(dest ...interface{}) error + type Scanner interface + Scan func(src interface{}) error + type Stmt struct + func (s *Stmt) Close() error + func (s *Stmt) Exec(args ...interface{}) (Result, error) + func (s *Stmt) Query(args ...interface{}) (*Rows, error) + func (s *Stmt) QueryRow(args ...interface{}) *Row + type Tx struct + func (tx *Tx) Commit() error + func (tx *Tx) Exec(query string, args ...interface{}) (Result, error) + func (tx *Tx) Prepare(query string) (*Stmt, error) + func (tx *Tx) Query(query string, args ...interface{}) (*Rows, error) + func (tx *Tx) QueryRow(query string, args ...interface{}) *Row + func (tx *Tx) Rollback() error + func (tx *Tx) Stmt(stmt *Stmt) *Stmt