package
0.0.0-20250307173044-634e8ce82c05
Repository: https://github.com/sapcc/go-bits.git
Documentation: pkg.go.dev
# Functions
ForeachRow calls db.Query() with the given query and args, then executes the given action one for every row in the result set.
RollbackUnlessCommitted calls Rollback() on a transaction if it hasn't been committed or rolled back yet.
SimplifyWhitespace takes an SQL query string that's hardcoded in the program and simplifies all the whitespaces, esp.
WithPreparedStatement calls db.Prepare() and passes the resulting prepared statement into the given action.
# Interfaces
Executor contains the common methods that both SQL connections (*sql.DB) and transactions (*sql.Tx) implement.
Rollbacker contains the Rollback() method from *sql.Tx.