mirror of
https://github.com/ncruces/go-sqlite3.git
synced 2026-01-12 05:59:14 +00:00
Commit callback.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user