2
0

Merge branch 'nvorobev-rows-affected-for-copyto-copyfrom' into v4-experimental

This commit is contained in:
Jack Christensen
2018-12-15 17:26:03 -06:00
6 changed files with 90 additions and 41 deletions
+4 -4
View File
@@ -240,18 +240,18 @@ 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) error {
func (tx *Tx) CopyFromReader(r io.Reader, sql string) (commandTag CommandTag, err error) {
if tx.status != TxStatusInProgress {
return ErrTxClosed
return CommandTag(""), ErrTxClosed
}
return tx.conn.CopyFromReader(r, sql)
}
// CopyToWriter delegates to the underlying *Conn
func (tx *Tx) CopyToWriter(w io.Writer, sql string, args ...interface{}) error {
func (tx *Tx) CopyToWriter(w io.Writer, sql string, args ...interface{}) (commandTag CommandTag, err error) {
if tx.status != TxStatusInProgress {
return ErrTxClosed
return CommandTag(""), ErrTxClosed
}
return tx.conn.CopyToWriter(w, sql, args...)