2
0

Expose stdlib.Conn.Conn() to enable database/sql.Conn.Raw()

This commit is contained in:
Jack Christensen
2020-05-28 17:36:29 -05:00
parent e6c101413b
commit 2bd26ec7fa
2 changed files with 20 additions and 0 deletions
+5
View File
@@ -257,6 +257,11 @@ type Conn struct {
connConfig pgx.ConnConfig
}
// Conn returns the underlying *pgx.Conn
func (c *Conn) Conn() *pgx.Conn {
return c.conn
}
func (c *Conn) Prepare(query string) (driver.Stmt, error) {
return c.PrepareContext(context.Background(), query)
}