Commit callback.

This commit is contained in:
Nuno Cruces
2024-01-27 10:05:31 +00:00
parent 99ad7ff766
commit c9cc893ed7
4 changed files with 53 additions and 10 deletions

View File

@@ -18,6 +18,9 @@ func TestConn_Transaction_exec(t *testing.T) {
}
defer db.Close()
db.CommitHook(func() (ok bool) { return true })
db.RollbackHook(func() {})
err = db.Exec(`CREATE TABLE IF NOT EXISTS test (col)`)
if err != nil {
t.Fatal(err)