qustavo / sqlhooks

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

Implement new 1.8 interfaces #3

Closed luna-duclos closed 7 years ago

luna-duclos commented 7 years ago

Go 1.8 has added a bunch of new interfaces that need to be wrapped, all the context related functions pretty much.

qustavo commented 7 years ago

You're right, great point.

qustavo commented 7 years ago

After reading database/sql implementation, I've realized that: Query("SELECT * FROM TABLE") calls QueryContext(context.Background(), "SELECT * FROM TABLE"). So effectively, by hooking to the Driver's Query implementation will work for both cases.

qustavo commented 7 years ago

done in #5