testutil

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ForceEncoder

func ForceEncoder(e interface{}, formatCode int16) interface{}

func MustClose

func MustClose(t testing.TB, conn interface {
	Close() error
})

func MustCloseContext

func MustCloseContext(t testing.TB, conn interface {
	Close(context.Context) error
})

func MustConnectDatabaseSQL

func MustConnectDatabaseSQL(t testing.TB, driverName string) *sql.DB

func MustConnectPgx

func MustConnectPgx(t testing.TB) *pgx.Conn

func TestDatabaseSQLGoZeroToNullConversion

func TestDatabaseSQLGoZeroToNullConversion(t testing.TB, driverName, pgTypeName string, zero interface{})

func TestDatabaseSQLNullToGoZeroConversion

func TestDatabaseSQLNullToGoZeroConversion(t testing.TB, driverName, pgTypeName string, zero interface{})

func TestDatabaseSQLSuccessfulNormalizeEqFunc

func TestDatabaseSQLSuccessfulNormalizeEqFunc(t testing.TB, driverName string, tests []NormalizeTest, eqFunc func(a, b interface{}) bool)

func TestDatabaseSQLSuccessfulTranscodeEqFunc

func TestDatabaseSQLSuccessfulTranscodeEqFunc(t testing.TB, driverName, pgTypeName string, values []interface{}, eqFunc func(a, b interface{}) bool)

func TestGoZeroToNullConversion

func TestGoZeroToNullConversion(t testing.TB, pgTypeName string, zero interface{})

func TestNullToGoZeroConversion

func TestNullToGoZeroConversion(t testing.TB, pgTypeName string, zero interface{})

func TestPgxGoZeroToNullConversion

func TestPgxGoZeroToNullConversion(t testing.TB, pgTypeName string, zero interface{})

func TestPgxNullToGoZeroConversion

func TestPgxNullToGoZeroConversion(t testing.TB, pgTypeName string, zero interface{})

func TestPgxSuccessfulNormalizeEqFunc

func TestPgxSuccessfulNormalizeEqFunc(t testing.TB, tests []NormalizeTest, eqFunc func(a, b interface{}) bool)

func TestPgxSuccessfulTranscodeEqFunc

func TestPgxSuccessfulTranscodeEqFunc(t testing.TB, pgTypeName string, values []interface{}, eqFunc func(a, b interface{}) bool)

func TestSuccessfulNormalize

func TestSuccessfulNormalize(t testing.TB, tests []NormalizeTest)

func TestSuccessfulNormalizeEqFunc

func TestSuccessfulNormalizeEqFunc(t testing.TB, tests []NormalizeTest, eqFunc func(a, b interface{}) bool)

func TestSuccessfulTranscode

func TestSuccessfulTranscode(t testing.TB, pgTypeName string, values []interface{})

func TestSuccessfulTranscodeEqFunc

func TestSuccessfulTranscodeEqFunc(t testing.TB, pgTypeName string, values []interface{}, eqFunc func(a, b interface{}) bool)

Types

type NormalizeTest

type NormalizeTest struct {
	SQL   string
	Value interface{}
}

Jump to

Keyboard shortcuts

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