Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecFile ¶
func ExecFile(ctx context.Context, queryExecutor QueryExecutor, path string) error
ExecFile executes an sql file. When using github.com/go-sql-driver/mysql, ensure `multiStatements=true`.
func Transact ¶
func Transact(ctx context.Context, txStarter TxStarter, f func(context.Context, *sql.Tx) error) (err error)
Transact is a helper function to execute a function in a transaction.
func TruncateAll ¶
func TruncateAll(ctx context.Context, queryExecutor QueryExecutor) error
TruncateAll truncates all tables.
Types ¶
Click to show internal directories.
Click to hide internal directories.