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:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user