mirror of
https://github.com/jackc/pgx.git
synced 2025-04-27 13:14:32 +00:00
Add *Tx.Conn getter method
This commit is contained in:
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…
x
Reference in New Issue
Block a user