Documentation
¶
Overview ¶
Package queriestest implements utilities for testing SQL queries.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Driver ¶
type Driver struct { // ExecContext is a test implementation of [driver.ExecerContext]. // If the code being tested uses [sql.Result], // ExecContext should return a [driver.Result] created with [NewResult]. // Optional. ExecContext func(t *testing.T, query string, args []any) (driver.Result, error) // QueryContext is a test implementation of [driver.QueryerContext]. // If the code being tested uses [sql.Rows], // QueryContext should return [Rows] created with [NewRows]. // Optional. QueryContext func(t *testing.T, query string, args []any) (driver.Rows, error) }
Driver is a convenience helper to easily create an implementation of driver.Driver for use in tests.
type Rows ¶
type Rows struct {
// contains filtered or unexported fields
}
Rows is a test implementation of driver.Rows.
Click to show internal directories.
Click to hide internal directories.