sqlmw icon indicating copy to clipboard operation
sqlmw copied to clipboard

Missing interceptors OpenConnector, Connect, ConnClose

Open dolmen opened this issue 4 years ago • 1 comments
trafficstars

The interceptor lack callbacks for:

I propose to add the following callbacks:

  • OpenConnector(connector driver.DriverContext, name string) (driver.Connector, error)
  • Connect(ctx context.Context, connector driver.Connector, name string) (driver.Conn, error)
  • ConnClose(conn driver.Conn) error

Use case: tracking connection leaks (missing call to conn.Close)

dolmen avatar Feb 05 '21 10:02 dolmen

thanks for finding these holes in the interceptor. i'd be happy to take a PR for this!

inconshreveable avatar Feb 08 '21 19:02 inconshreveable