Versions in this module Expand all Collapse all v0 v0.0.4 Sep 1, 2025 v0.0.3 Feb 7, 2025 v0.0.2 Jun 10, 2024 v0.0.1 Jun 10, 2024 Changes in this version + var ErrNotFound = sql.ErrNoRows + type Command interface + BeginTx func(ctx context.Context, name string, opts TxOptions) (CommandTx, error) + Close func() error + Exec func(ctx context.Context, name string, query string, args ...interface{}) (sql.Result, error) + Get func(ctx context.Context, name string, query string, dest interface{}, ...) error + In func(query string, args ...interface{}) (string, []interface{}, error) + NamedExec func(ctx context.Context, name string, query string, args interface{}) (sql.Result, error) + NamedQuery func(ctx context.Context, name string, query string, arg interface{}) (*sqlx.Rows, error) + Ping func(ctx context.Context) error + Prepare func(ctx context.Context, name string, query string) (CommandStmt, error) + Query func(ctx context.Context, name string, query string, args ...interface{}) (*sqlx.Rows, error) + QueryIn func(ctx context.Context, name string, query string, args ...interface{}) (*sqlx.Rows, error) + QueryRow func(ctx context.Context, name string, query string, args ...interface{}) (*sqlx.Row, error) + Rebind func(query string) string + type CommandStmt interface + Close func() error + Exec func(name string, args ...interface{}) (sql.Result, error) + Get func(name string, dest interface{}, args ...interface{}) error + Query func(name string, args ...interface{}) (*sqlx.Rows, error) + QueryRow func(name string, args ...interface{}) (*sqlx.Row, error) + Select func(name string, dest interface{}, args ...interface{}) error + type CommandTx interface + Commit func() error + Exec func(name string, query string, args ...interface{}) (sql.Result, error) + Get func(name string, query string, dest interface{}, args ...interface{}) error + NamedExec func(name string, query string, args interface{}) (sql.Result, error) + Prepare func(name string, query string) (CommandStmt, error) + Query func(name string, query string, args ...interface{}) (*sqlx.Rows, error) + QueryRow func(name string, query string, args ...interface{}) (*sqlx.Row, error) + Rebind func(query string) string + Rollback func() + Select func(name string, query string, dest interface{}, args ...interface{}) error + Stmt func(name string, stmt *sqlx.Stmt) CommandStmt + type Config struct + Driver string + Follower ConnConfig + Leader ConnConfig + LogQuery bool + Name string + UseInstrument bool + type ConnConfig struct + DB string + Host string + MockDB *sql.DB + Options ConnOptions + Password string + Port int + SSL bool + Schema string + User string + type ConnOptions struct + MaxIdle int + MaxLifeTime time.Duration + MaxOpen int + type Interface interface + Follower func() Command + Leader func() Command + Stop func() + func Init(cfg Config, log logger.Interface, instr instrument.Interface) Interface + type TxOptions struct + Isolation sql.IsolationLevel + ReadOnly bool