Package sqlxtransaction provides a simple way to execute a function inside an SQLX transaction.
The function to be executed is passed as an argument to the Exec function.
See also the sqltransaction package for the same functionality but using the standard library sql package.