package testutil

import "github.com/jackc/pgx/v5/pgtype/testutil"

Index

Functions

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 MustConnectPgx

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

func RunTranscodeTests

func RunTranscodeTests(t testing.TB, pgTypeName string, tests []TranscodeTestCase)

func RunTranscodeTestsFormat

func RunTranscodeTestsFormat(t testing.TB, pgTypeName string, tests []TranscodeTestCase, conn *pgx.Conn, formatName string, formatCode int16)

Types

type TranscodeTestCase

type TranscodeTestCase struct {
	Src  interface{}
	Dst  interface{}
	Test func(interface{}) bool
}

Source Files

testutil.go

Version
v5.0.0-alpha.1
Published
Mar 19, 2022
Platform
js/wasm
Imports
7 packages
Last checked
2 hours ago

Tools for package owners.