mirror of https://github.com/jackc/pgx.git
Add *Tx.Conn getter method
parent
e8dcf5b3ac
commit
593ab9fde2
5
tx.go
5
tx.go
|
@ -117,6 +117,11 @@ func (tx *Tx) QueryRow(sql string, args ...interface{}) *Row {
|
|||
return (*Row)(rows)
|
||||
}
|
||||
|
||||
// Conn returns the *Conn this transaction is using.
|
||||
func (tx *Tx) Conn() *Conn {
|
||||
return tx.conn
|
||||
}
|
||||
|
||||
// AfterClose adds f to a LILO queue of functions that will be called when
|
||||
// the transaction is closed (either Commit or Rollback).
|
||||
func (tx *Tx) AfterClose(f func(*Tx)) {
|
||||
|
|
Loading…
Reference in New Issue