sqltest

package
v0.0.0-...-b55247b Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MockRows

func MockRows(columns ...string) *sqlmock.Rows

MockRows creates a sqlmock.Rows for the specified columns.

func TestInTx

func TestInTx(t *testing.T, test func(mockDB sqlmock.Sqlmock, tx *sql.Tx))

TestInTx runs a database test in a transaction on a sqlmock connection.

func UpdateArgs

func UpdateArgs(tx *sql.Tx, query string, args ...interface{}) []interface{}

UpdateArgs creates an array of expected arguments for running an update query.

Types

This section is empty.

Jump to

Keyboard shortcuts

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