Versions in this module Expand all Collapse all v0 v0.2.0 Jul 10, 2026 Changes in this version + func MustRegisterDSN(s DSNScheme) + type DSNScheme struct + Dialect string + Driver string + Schemes []string v0.1.0 Jul 10, 2026 Changes in this version + var ErrMultipleRows = errors.New("connsql: expected exactly one row") + var ErrNoRows = sql.ErrNoRows + func IsNotFound(err error) bool + type Config struct + DSN DSN + Label common.Label + Pool PoolConfig + func (cfg *Config) Build() (any, error) + type ConnMaxIdleTime time.Duration + func (ConnMaxIdleTime) Usage() string + func (c ConnMaxIdleTime) Validate() error + type ConnMaxLifetime time.Duration + func (ConnMaxLifetime) Usage() string + func (c ConnMaxLifetime) Validate() error + type DB struct + func NewTestDB(sqlxDB *sqlx.DB) *DB + func (*DB) BuildConfig() (app.Materializer, error) + func (db *DB) Close(_ context.Context) error + func (db *DB) Exec(ctx context.Context, q Query, args ...any) error + func (db *DB) ExecOne(ctx context.Context, q Query, args ...any) error + func (db *DB) GetList(ctx context.Context, q Query, dest any, args ...any) error + func (db *DB) GetOne(ctx context.Context, q Query, dest any, args ...any) error + func (db *DB) Label() string + func (db *DB) ProbeReady(ctx context.Context) error + func (db *DB) WithTransaction(ctx context.Context, fn func(ctx context.Context) error) error + func (db *DB) WithinTransaction(ctx context.Context, fn func(ctx context.Context) error) error + type DSN string + func (DSN) Usage() string + func (d DSN) String() string + func (d DSN) Validate() error + type MaxIdleConns int + func (MaxIdleConns) Usage() string + func (n MaxIdleConns) Validate() error + type MaxOpenConns int + func (MaxOpenConns) Usage() string + func (n MaxOpenConns) Validate() error + type Meta struct + Dialect string + Driver string + func ParseDSN(dsn string) (Meta, error) + type PoolConfig struct + MaxIdle MaxIdleConns + MaxIdleTime ConnMaxIdleTime + MaxLifetime ConnMaxLifetime + MaxOpen MaxOpenConns + type Query struct + func Q(name, sql string) Query + func (q Query) Name() string + func (q Query) String() string