dbtest

package
v0.11.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Read added in v0.8.0

func Read(tx *sqlx.Tx) database.Read

func Update added in v0.8.0

func Update(tx *sqlx.Tx) database.Update

Types

type CountFactory

type CountFactory[T model.Model] struct {
	// contains filtered or unexported fields
}

func (*CountFactory[T]) Create

func (f *CountFactory[T]) Create(tx database.DB) []T

type Factory

type Factory[T model.Model] func() T

func NewFactory

func NewFactory[T model.Model](cb func() T) Factory[T]

func (Factory[T]) Count

func (f Factory[T]) Count(count int) *CountFactory[T]

func (Factory[T]) Create

func (f Factory[T]) Create(tx database.DB) T

func (Factory[T]) State

func (f Factory[T]) State(s func(T) T) Factory[T]

type Runner

type Runner struct {
	// contains filtered or unexported fields
}

func NewRunner

func NewRunner(open func() (*sqlx.DB, error)) *Runner

func (*Runner) Run

func (r *Runner) Run(t *testing.T, name string, cb func(t *testing.T, tx *sqlx.Tx)) bool

func (*Runner) RunBenchmark

func (r *Runner) RunBenchmark(t *testing.B, name string, cb func(t *testing.B, tx *sqlx.Tx)) bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL