Versions in this module Expand all Collapse all v0 v0.2.0 Oct 18, 2026 Changes in this version type Cleaner + func (c *Cleaner) URL(ctx context.Context) (string, error) type Option + func WithTemplate(version string, build func(ctx context.Context, db *sql.DB, url string) error) Option v0.1.0 Oct 18, 2026 Changes in this version + func DefaultGuard(database string) bool + func ScratchDatabase(t testing.TB, adminURL string) string + type Cleaner struct + func New(url string, opts ...Option) *Cleaner + func (c *Cleaner) CleanWith(ctx context.Context, s Strategy) error + func (c *Cleaner) Cleaning(ctx context.Context, fn func(db *sql.DB) error) error + func (c *Cleaner) Close() error + func (c *Cleaner) DB(t testing.TB) *sql.DB + func (c *Cleaner) Start(ctx context.Context) (*Session, error) + type Option func(*Cleaner) + func WithDriver(name string) Option + func WithGuard(allow func(database string) bool) Option + func WithSetup(fn func(ctx context.Context, db *sql.DB) error) Option + func WithStrategy(s Strategy) Option + type Session struct + func (s *Session) Clean(ctx context.Context) error + func (s *Session) DB() *sql.DB + type Strategy interface + func Deletion(opts ...TableOption) Strategy + func Null() Strategy + func Transaction() Strategy + func Truncation(opts ...TableOption) Strategy + type TableOption func(*filter) + func Except(tables ...string) TableOption + func Only(tables ...string) TableOption