diff options
author | Christopher Speller <crspeller@gmail.com> | 2016-09-23 10:17:51 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-23 10:17:51 -0400 |
commit | 2ca0e8f9a0f9863555a26e984cde15efff9ef8f8 (patch) | |
tree | daae1ee67b14a3d0a84424f2a304885d9e75ce2b /vendor/github.com/go-sql-driver/mysql/rows.go | |
parent | 6d62d65b2dc85855aabea036cbd44f6059e19d13 (diff) | |
download | chat-2ca0e8f9a0f9863555a26e984cde15efff9ef8f8.tar.gz chat-2ca0e8f9a0f9863555a26e984cde15efff9ef8f8.tar.bz2 chat-2ca0e8f9a0f9863555a26e984cde15efff9ef8f8.zip |
Updating golang dependancies (#4075)
Diffstat (limited to 'vendor/github.com/go-sql-driver/mysql/rows.go')
-rw-r--r-- | vendor/github.com/go-sql-driver/mysql/rows.go | 50 |
1 files changed, 12 insertions, 38 deletions
diff --git a/vendor/github.com/go-sql-driver/mysql/rows.go b/vendor/github.com/go-sql-driver/mysql/rows.go index c08255eee..df4ef06cb 100644 --- a/vendor/github.com/go-sql-driver/mysql/rows.go +++ b/vendor/github.com/go-sql-driver/mysql/rows.go @@ -14,11 +14,9 @@ import ( ) type mysqlField struct { - tableName string - name string - flags fieldFlag fieldType byte - decimals byte + flags fieldFlag + name string } type mysqlRows struct { @@ -34,22 +32,10 @@ type textRows struct { mysqlRows } -type emptyRows struct{} - func (rows *mysqlRows) Columns() []string { columns := make([]string, len(rows.columns)) - if rows.mc != nil && rows.mc.cfg.ColumnsWithAlias { - for i := range columns { - if tableName := rows.columns[i].tableName; len(tableName) > 0 { - columns[i] = tableName + "." + rows.columns[i].name - } else { - columns[i] = rows.columns[i].name - } - } - } else { - for i := range columns { - columns[i] = rows.columns[i].name - } + for i := range columns { + columns[i] = rows.columns[i].name } return columns } @@ -65,12 +51,6 @@ func (rows *mysqlRows) Close() error { // Remove unread packets from stream err := mc.readUntilEOF() - if err == nil { - if err = mc.discardResults(); err != nil { - return err - } - } - rows.mc = nil return err } @@ -82,7 +62,10 @@ func (rows *binaryRows) Next(dest []driver.Value) error { } // Fetch next row from stream - return rows.readRow(dest) + if err := rows.readRow(dest); err != io.EOF { + return err + } + rows.mc = nil } return io.EOF } @@ -94,19 +77,10 @@ func (rows *textRows) Next(dest []driver.Value) error { } // Fetch next row from stream - return rows.readRow(dest) + if err := rows.readRow(dest); err != io.EOF { + return err + } + rows.mc = nil } return io.EOF } - -func (rows emptyRows) Columns() []string { - return nil -} - -func (rows emptyRows) Close() error { - return nil -} - -func (rows emptyRows) Next(dest []driver.Value) error { - return io.EOF -} |