2
0

Add back GetDefaultDriver

This method is useful when it is necessary
to wrap the pgx stdlib driver, for example to
add tracing and metrics.

Fixes #645
This commit is contained in:
Johan Brandhorst
2019-12-07 10:19:47 +00:00
parent 3dc25d5b9c
commit d75362f396
+6
View File
@@ -114,6 +114,12 @@ var (
fakeTxConns map[*pgx.Conn]*sql.Tx
)
// GetDefaultDriver returns the driver initialized in the init function
// and used when the pgx driver is registered.
func GetDefaultDriver() driver.Driver {
return pgxDriver
}
type Driver struct {
configMutex sync.Mutex
configs map[string]*pgx.ConnConfig