Versions in this module Expand all Collapse all v0 v0.8.0 Mar 10, 2026 v0.7.0 Feb 28, 2026 Changes in this version + const DefaultSetConnMaxIdleTime + const DefaultSetConnMaxLifetime + const DefaultSetMaxIdleConnections + const DefaultSetMaxOpenConnections + var ErrPanic = errors.New("panic") + var ErrRollbackFailed = errors.New("rollback failed") + type Connector interface + DSN func() (string, error) + type MetricCollector interface + Collecting func(method string, f func() error) func() error + type Metrics struct + func NewMetrics(reg *prometheus.Registry, namespace, subsystem string, methodsFrom any) (metric Metrics) + func (m Metrics) Collecting(method string, f func() error) func() error + type NoMetric struct + func (n NoMetric) Collecting(_ string, f func() error) func() error + type SQL struct + func NewSQL(ctx context.Context, driver string, cfg SQLConfig, connector Connector) (*SQL, error) + func (db *SQL) Close() error + func (db *SQL) NoTx(f func(*sqlx.DB) error) (err error) + func (db *SQL) NoTxContext(ctx context.Context, f func(*sqlx.DB) error) (err error) + func (db *SQL) Tx(ctx context.Context, opts *sql.TxOptions, f func(*sqlx.Tx) error) (err error) + func (db *SQL) UnderlyingDB() *sql.DB + type SQLConfig struct + Metrics MetricCollector + ReturnErrs []error + SetConnMaxIdleTime time.Duration + SetConnMaxLifetime time.Duration + SetMaxIdleConnections int + SetMaxOpenConnections int + TracerProvider trace.TracerProvider