2
0

Fix switching CommandTag back to string

This commit is contained in:
Jack Christensen
2019-01-05 18:53:07 -06:00
parent f02ad34d66
commit e78fd95296
7 changed files with 43 additions and 43 deletions
+2 -2
View File
@@ -234,7 +234,7 @@ func (tx *Tx) CopyFrom(tableName Identifier, columnNames []string, rowSrc CopyFr
// CopyFromReader delegates to the underlying *Conn
func (tx *Tx) CopyFromReader(r io.Reader, sql string) (commandTag pgconn.CommandTag, err error) {
if tx.status != TxStatusInProgress {
return nil, ErrTxClosed
return "", ErrTxClosed
}
return tx.conn.CopyFromReader(r, sql)
@@ -243,7 +243,7 @@ func (tx *Tx) CopyFromReader(r io.Reader, sql string) (commandTag pgconn.Command
// CopyToWriter delegates to the underlying *Conn
func (tx *Tx) CopyToWriter(w io.Writer, sql string, args ...interface{}) (commandTag pgconn.CommandTag, err error) {
if tx.status != TxStatusInProgress {
return nil, ErrTxClosed
return "", ErrTxClosed
}
return tx.conn.CopyToWriter(w, sql, args...)