Closed jetbasrawi closed 3 years ago
I'm new using this library, but taking a first look at your code, you're ignoring possible errors when calling stmt.Exec(...)
and because that you're not rolling back tx.Rollback()
we should do a Rollback when there's errors in a transaction context, and that's why there's this sentence in your logs: ... Transaction may have timed out and been rolled back
Hi,
When I try to use the transactional code as shown on the readme, it fails with the following error.
The code that I am using to execute this is below. It is virtually identical to your code but builds up the statements with a range over a slice. I also have my db at global scope where in your code you open a db in the local method scope. Other than this it is the same.
Any ideas