tests

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2023 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Generator generator
)
View Source
var PlaceholderPattern = regexp.MustCompile(`\$(\d+)`)

Functions

func CR

func CR(dbName string) string

func CaptureLog

func CaptureLog(fn func()) string

func PG

func PG(dbName string) string

func Row added in v0.0.4

func Row(db TestableDB, sql string, args ...any) typed.Typed

func Rows added in v0.0.4

func Rows(db TestableDB, sql string, args ...any) []typed.Typed

func StorageType

func StorageType() string

Types

type TestableDB added in v0.0.4

type TestableDB interface {
	Placeholder(i int) string
	IsNotFound(err error) bool
	RowToMap(sql string, args ...any) (typed.Typed, error)
	RowsToMap(sql string, args ...any) ([]typed.Typed, error)
}

Directories

Path Synopsis
A wrapper around *testing.T. I hate the if a != b { t.ErrorF(....) } pattern.
A wrapper around *testing.T. I hate the if a != b { t.ErrorF(....) } pattern.

Jump to

Keyboard shortcuts

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