2
0

addressing the comments

add copy methods to the Tx struct
This commit is contained in:
Murat Kabilov
2018-08-07 23:44:02 +03:00
parent 5315995dfa
commit 4e9a696434
6 changed files with 54 additions and 35 deletions
+3 -3
View File
@@ -283,9 +283,9 @@ func (c *Conn) CopyFrom(tableName Identifier, columnNames []string, rowSrc CopyF
return ct.run()
}
// CopyFromTextual uses the PostgreSQL textual format of the copy protocol
func (c *Conn) CopyFromTextual(r io.Reader, sql string, args ...interface{}) error {
if err := c.sendSimpleQuery(sql, args...); err != nil {
// CopyFromReader uses the PostgreSQL textual format of the copy protocol
func (c *Conn) CopyFromReader(r io.Reader, sql string) error {
if err := c.sendSimpleQuery(sql); err != nil {
return err
}