Help us shape the future of Go! Take the 2026 Go Developer Survey

testdb

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithPrimaryKeyCounts added in v0.2.0

func WithPrimaryKeyCounts(rows [][]driver.Value) [][]driver.Value

WithPrimaryKeyCounts extends catalog fixtures with the native key size. Tests for filtered columns override this value independently of visible rows.

Types

type Driver

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

func Register

func Register(name string) *Driver

func (*Driver) DSN

func (d *Driver) DSN() string

func (*Driver) Open

func (d *Driver) Open(dsn string) (driver.Conn, error)

func (*Driver) Queries

func (d *Driver) Queries() int

func (*Driver) SetResponse

func (d *Driver) SetResponse(response Response)

func (*Driver) SetResponses

func (d *Driver) SetResponses(responses ...Response)

SetResponses installs the ordered query script returned by the next opened connection. The first response also controls Ping through PingError.

type Response

type Response struct {
	ExpectedQuery  string
	Columns        []string
	Rows           [][]driver.Value
	PingError      error
	QueryError     error
	IterationError error
}

Jump to

Keyboard shortcuts

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