Versions in this module Expand all Collapse all v0 v0.1.0 Sep 22, 2025 Changes in this version + func Init(ctx context.Context, env Environment, mig migrations.Migrations, ...) (db *sql.DB, term func(), err error) + func Reuse(ctx context.Context, reuse *Reusable, mig migrations.Migrations, ...) (db *sql.DB, term func(), err error) + func ReuseForTesting(t *testing.T, reuse *Reusable, mig migrations.Migrations, ...) *sql.DB + func UseExternal(ctx context.Context, migrations migrations.Migrations, ...) (db *sql.DB, term func(), err error) + func UseExternalConfig(ctx context.Context, cfg *ExternalEnvironmentConfig, ...) (db *sql.DB, term func(), err error) + func UseExternalForTesting(t *testing.T, migrations migrations.Migrations, ...) *sql.DB + func UseExternalForTestingConfig(t *testing.T, cfg *ExternalEnvironmentConfig, migrations migrations.Migrations, ...) *sql.DB + type Environment interface + Connect func(ctx context.Context, args ...string) (*sql.DB, error) + Terminate func(ctx context.Context) error + type ExternalEnvironmentConfig struct + ConnectionString string + DriverName string + type ProvideEnvironmentFunc func(ctx context.Context) (Environment, error) + func ExternalEnvironment(cfg *ExternalEnvironmentConfig) ProvideEnvironmentFunc + type Reusable struct + func ExternalReusable() *Reusable + func NewReusable(ccf ProvideEnvironmentFunc, opts ...ReusableOption) *Reusable + func (r *Reusable) Terminate(ctx context.Context) error + type ReusableOption func(r *Reusable) + func WithWaitDuration(duration time.Duration) ReusableOption