mattn / go-sqlite3

sqlite3 driver for go using database/sql
http://mattn.github.io/go-sqlite3
MIT License
8.05k stars 1.11k forks source link

Add a new `RegisterBusyHandler` method to `SQLiteConn` to allow access to `sqlite3_busy_handler()` #1278

Open polyscone opened 1 month ago

polyscone commented 1 month ago

This PR just adds a new RegisterBusyHandler method to the SQLiteConn type to allow use of the sqlite3_busy_handler() function.

I tried to follow the same style as the other Register* methods which use the void* user data args as a way to pass a handle to a Go callback function to a trampoline function defined in C.

I've also updated the _examples folder with a new example file.

Fixes #290