Versions in this module Expand all Collapse all v1 v1.0.0 Oct 26, 2021 Changes in this version + const ErrorConnection + const ErrorCredential + var LogFormatter = func(values ...interface{}) (messages []interface{}) + var NowFunc = func() time.Time + func Init() error + func Log(logMode bool, query string, args ...interface{}) + func New() error + func Shutdown() (err error) + type Config struct + Address string + DB string + LogMode bool + MaxIdle int + MaxLifetime int + MaxOpen int + Password string + User string + type Conn struct + type LogWriter interface + Println func(v ...interface{}) + type Logger struct + func (logger Logger) Print(values ...interface{}) + type SQL struct + DB *sqlx.DB + func Read() *SQL + func Write() *SQL + func (sql *SQL) Begin() (*Tx, error) + func (sql *SQL) Exec(query string, args ...interface{}) (sql.Result, error) + func (sql *SQL) Get(dest interface{}, query string, args ...interface{}) error + func (sql *SQL) MustBegin() *Tx + func (sql *SQL) Query(query string, args ...interface{}) (*sql.Rows, error) + func (sql *SQL) QueryRow(query string, args ...interface{}) *sql.Row + func (sql *SQL) QueryRowx(query string, args ...interface{}) *sqlx.Row + func (sql *SQL) Queryx(query string, args ...interface{}) (*sqlx.Rows, error) + func (sql *SQL) Select(dest interface{}, query string, args ...interface{}) error + func (sql *SQL) WithContext(ctx context.Context) *SQL + type SQLError struct + Errors uint32 + func NewSQLError(errorFlags uint32, errorString ...interface{}) *SQLError + func (e SQLError) Error() string + type Tx struct + Tx *sqlx.Tx + func (db *Tx) Exec(query string, args ...interface{}) (sql.Result, error) + func (db *Tx) Get(dest interface{}, query string, args ...interface{}) error + func (db *Tx) Query(query string, args ...interface{}) (*sql.Rows, error) + func (db *Tx) QueryRow(query string, args ...interface{}) *sql.Row + func (db *Tx) QueryRowx(query string, args ...interface{}) *sqlx.Row + func (db *Tx) Queryx(query string, args ...interface{}) (*sqlx.Rows, error) + func (db *Tx) Select(dest interface{}, query string, args ...interface{}) error