Versions in this module Expand all Collapse all v0 v0.0.2 Nov 15, 2025 Changes in this version + func MySQLLogger(slowQueryThreshold time.Duration) func(context.Context, mysql.QueryInfo) + func PostgresLogger(slowQueryThreshold time.Duration) func(context.Context, postgres.QueryInfo) v0.0.1 Nov 15, 2025 Changes in this version + var ErrAlreadyExists = errors.New("duplicated key") + var ErrForeignKeyConstrainError = errors.New("foreign key error") + var ErrNotFound = errors.New("not found") + func Ctx(ctx context.Context) (*sql.DB, error) + func New(ctx context.Context, cfg *Configuration) (context.Context, error) + func TranslateError(err error) error + func WithContext(parent context.Context, db *sql.DB) (ctx context.Context) + type Configuration struct + ConnMaxIdleTime time.Duration + ConnMaxLifetime time.Duration + DSN string + Driver string + MaxIdleConns int + MaxOpenConns int + SlowQueryThreshold time.Duration + func NewConfiguration() *Configuration