Fix switching CommandTag back to string
This commit is contained in:
@@ -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...)
|
||||
|
||||
Reference in New Issue
Block a user