From 593ab9fde27cc052d021ec8356a430c6699af255 Mon Sep 17 00:00:00 2001 From: Jack Christensen Date: Sat, 13 Feb 2016 11:07:20 -0600 Subject: [PATCH] Add *Tx.Conn getter method --- tx.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tx.go b/tx.go index 4e726d9c..9e7fa9d4 100644 --- a/tx.go +++ b/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)) {