Versions in this module Expand all Collapse all v1 v1.0.1 Jul 6, 2023 v1.0.0 Jun 30, 2023 Changes in this version + type Config struct + ConnMaxIdleTime time.Duration + ConnMaxLifetime time.Duration + DriverName DriverName + MaxIdleConns int + MaxOpenConns int + SchemaMigrationsTable string + SchemaSearchPath string + URI string + type DB struct + func NewDB(c *Config, logger *logger.Logger) *DB + func (db *DB) Close() error + func (db *DB) Config() *Config + func (db *DB) Conn(ctx context.Context) (*sql.Conn, error) + func (db *DB) DB() *sqlx.DB + func (db *DB) Open() error + func (db *DB) Ping() error + type DriverName string + const MYSQL + const POSTGRES + type Migrate struct + func NewMigrate(config *Config, embedFS embed.FS) (*Migrate, error) + func (d *Migrate) Open(rawURL string) (source.Driver, error) + func (m *Migrate) Run() ([][]string, error) + type Seed struct + func NewSeed(config *Config, embedFS embed.FS, logger *logger.Logger) (*Seed, error) + func (s *Seed) Close() error + func (s *Seed) Run() error