Add *Tx.Conn getter method

pull/120/head
Jack Christensen 2016-02-13 11:07:20 -06:00
parent e8dcf5b3ac
commit 593ab9fde2
1 changed files with 5 additions and 0 deletions

5
tx.go
View File

@ -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)) {