Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateTempSQLiteDB ¶
CreateTempSQLiteDB creates a temporary SQLite database file and opens a connection. It returns the *sql.DB, its path, and a cleanup function that closes the DB and removes the temp directory.
func ExecAll ¶
func ExecAll(t *testing.T, db *sql.DB, items []ParameterizedSQL)
ExecAll executes statements sequentially, failing the test on first error.
func LoadDDLFromFile ¶
LoadDDLFromFile reads a DDL file and executes contained statements separated by ';'.
Types ¶
type ParameterizedSQL ¶
type ParameterizedSQL struct {
SQL string
Params []interface{}
}
ParameterizedSQL represents a statement with optional parameters.
Click to show internal directories.
Click to hide internal directories.