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

sqlite

package
v0.26.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertRows

func AssertRows[T any](t testing.TB, h *Harness, query string, expected []T)

AssertRows verifies typed results through the native SQLX reader.

Types

type Harness

type Harness struct {
	DB *sql.DB
	// contains filtered or unexported fields
}

Harness owns isolated native SQLX integration-test databases.

func New

func New(t testing.TB, statements ...string) *Harness

func NewWithDSN added in v0.26.1

func NewWithDSN(t testing.TB, dsn string, statements ...string) *Harness

NewWithDSN supports tests of connection-local pragmas and separate pools.

func (*Harness) Exec

func (h *Harness) Exec(t testing.TB, statements ...string)

func (*Harness) FaultDB

func (h *Harness) FaultDB(t testing.TB, before func(context.Context, sqlfault.Call) error) *sql.DB

Jump to

Keyboard shortcuts

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