sqlhooks icon indicating copy to clipboard operation
sqlhooks copied to clipboard

Attach hooks to any database/sql driver

Results 14 sqlhooks issues
Sort by recently updated
recently updated
newest added

add lint to ci

ATM no linters are set, anything will do for now. Code could be improved later

`sql.Open` internally makes use of the [`DriverContext`](https://pkg.go.dev/database/sql/driver#DriverContext) interface, and if a `Driver` does not implement it, it creates a light wrapper1. This `DriverContext` provides better context support as well as...

Work in progress of safetyhooks, which panics when `sql.Rows` are not closed, this is useful to detect leaks. Based on sharp-edge finalizers https://crawshaw.io/blog/sharp-edged-finalizers.

I would like to execute SQL commands inside the hook methods. These commands must be on the same transaction of the original command. I mean the one triggered by the...

When connecting over a high-latency network, it becomes visible in my tracing that `Prepare` takes a while to execute when using `github.com/go-sql-driver/mysql`. Does it sound like it makes sense to...

when using wraper dierver, code like this: sql exec err for table name has double quotes, when not using wraper, code like this sql exec success, table name change ok...

i add `onError` hook, add collect `driver.ErrSkip` error, how about add error check before call onError

I'm using the hooks to create audit_logs for my project, I'm using the idea of this lib https://github.com/gmhafiz/audit but in this lib, the author uses a personalized version of sqlhooks...