qustavo / sqlhooks

Attach hooks to any database/sql driver
MIT License
650 stars 44 forks source link

Before+after hooks for prepare #13

Open ivucica opened 7 years ago

ivucica commented 7 years ago

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 add hooks around Prepare, too?

qustavo commented 7 years ago

Hey, @ivucica that would make sense, the problem is that some drivers use Prepare, and some others don't, it's not a trivial problem. I still don't know how to implement that, but if you have an idea, I'd be happy to discuss.