assertdb

package
v0.0.0-...-bb7c160 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TestQuery

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

TestQuery is a query that we can assert the result of

func Query

func Query(t *testing.T, db *sqlx.DB, sql string, args ...interface{}) *TestQuery

Query creates a new query on which one can assert things

func (*TestQuery) Columns

func (q *TestQuery) Columns(expected map[string]interface{}, msgAndArgs ...interface{})

Columns asserts that the query returns the given column values

func (*TestQuery) Returns

func (q *TestQuery) Returns(expected interface{}, msgAndArgs ...interface{})

Returns asserts that the query returns a single value

Jump to

Keyboard shortcuts

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