blob: 3c88fe05a93ebb14475619d00c0fcf6b2b5488d6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
package driver
import (
"database/sql/driver"
"github.com/lib/pq"
)
// PgSQLDriver extends pq.Driver with driver.DriverContext compliance.
type PgSQLDriver struct {
pq.Driver
}
// Assert interface compliance.
var (
_ driver.Driver = PgSQLDriver{}
_ driver.DriverContext = PgSQLDriver{}
)
// OpenConnector implements the driver.DriverContext interface.
func (PgSQLDriver) OpenConnector(name string) (driver.Connector, error) {
return pq.NewConnector(name)
}
|