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

SQL1999

package
v0.11.4 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareExecResults

func CompareExecResults(t *testing.T, svDB *sql.DB, slDB *sql.DB, query string, testName string)

CompareExecResults executes a statement against both databases and checks that they both succeed or both fail.

func CompareQueryResults

func CompareQueryResults(t *testing.T, svDB *sql.DB, slDB *sql.DB, query string, testName string)

CompareQueryResults executes query against both databases and compares results.

func FetchAllRowsSQLite

func FetchAllRowsSQLite(rows *sql.Rows) ([]map[string]interface{}, error)

FetchAllRowsSQLite fetches all rows from a SQLite *sql.Rows into a map slice.

Types

type QueryResult added in v0.11.4

type QueryResult struct {
	// Columns holds the column names returned by the query.
	Columns []string
	// Data holds the row data; each element is a slice of column values.
	Data [][]interface{}
}

QueryResult holds the result of a SQL query executed via the driver interface. It mirrors the field names of sqlvibe.Rows so that existing test code that accesses .Data and .Columns keeps working after the driver/ migration.

func QueryRows added in v0.11.4

func QueryRows(t *testing.T, db *sql.DB, query string, args ...interface{}) *QueryResult

QueryRows executes query against db and returns all rows as a *QueryResult.

func QuerySqlvibeOnly

func QuerySqlvibeOnly(t *testing.T, db *sql.DB, query string, testName string) *QueryResult

QuerySqlvibeOnly executes a query only on sqlvibe and validates it succeeds. Returns a *QueryResult whose .Data and .Columns fields can be read directly.

Jump to

Keyboard shortcuts

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