2
0

First extraction of base.Conn

This commit is contained in:
Jack Christensen
2018-11-10 18:48:43 -06:00
parent 670e85136f
commit 2e72ca854a
12 changed files with 92 additions and 69 deletions
+1 -1
View File
@@ -260,7 +260,7 @@ func (tx *Tx) CopyToWriter(w io.Writer, sql string, args ...interface{}) error {
// Status returns the status of the transaction from the set of
// pgx.TxStatus* constants.
func (tx *Tx) Status() int8 {
if tx.status == TxStatusInProgress && tx.conn.txStatus == 'E' {
if tx.status == TxStatusInProgress && tx.conn.BaseConn.TxStatus == 'E' {
return TxStatusInFailure
}
return tx.status