2
0

Add Conn() to Tx interface.

This is necessary to allow code using a Tx to access the *Conn (and
pgconn.PgConn) on which the Tx is executing.
This commit is contained in:
Jack Christensen
2019-10-12 09:16:26 -05:00
parent c0a1f9976a
commit 143bc3165d
3 changed files with 21 additions and 1 deletions
+4
View File
@@ -61,3 +61,7 @@ func (tx *Tx) Query(ctx context.Context, sql string, args ...interface{}) (pgx.R
func (tx *Tx) QueryRow(ctx context.Context, sql string, args ...interface{}) pgx.Row {
return tx.t.QueryRow(ctx, sql, args...)
}
func (tx *Tx) Conn() *pgx.Conn {
return tx.t.Conn()
}