Bump deps

This commit is contained in:
Jeff Mitchell
2017-05-24 09:40:58 -04:00
parent 0828b565c3
commit d468da79e0
461 changed files with 39725 additions and 44040 deletions

View File

@@ -22,8 +22,9 @@ type mysqlField struct {
}
type resultSet struct {
columns []mysqlField
done bool
columns []mysqlField
columnNames []string
done bool
}
type mysqlRows struct {
@@ -33,12 +34,6 @@ type mysqlRows struct {
type binaryRows struct {
mysqlRows
// stmtCols is a pointer to the statement's cached columns for different
// result sets.
stmtCols *[][]mysqlField
// i is a number of the current result set. It is used to fetch proper
// columns from stmtCols.
i int
}
type textRows struct {
@@ -46,6 +41,10 @@ type textRows struct {
}
func (rows *mysqlRows) Columns() []string {
if rows.rs.columnNames != nil {
return rows.rs.columnNames
}
columns := make([]string, len(rows.rs.columns))
if rows.mc != nil && rows.mc.cfg.ColumnsWithAlias {
for i := range columns {
@@ -60,6 +59,8 @@ func (rows *mysqlRows) Columns() []string {
columns[i] = rows.rs.columns[i].name
}
}
rows.rs.columnNames = columns
return columns
}
@@ -132,25 +133,14 @@ func (rows *mysqlRows) nextNotEmptyResultSet() (int, error) {
}
}
func (rows *binaryRows) NextResultSet() (err error) {
func (rows *binaryRows) NextResultSet() error {
resLen, err := rows.nextNotEmptyResultSet()
if err != nil {
return err
}
// get columns, if not cached, read them and cache them.
if rows.i >= len(*rows.stmtCols) {
rows.rs.columns, err = rows.mc.readColumns(resLen)
*rows.stmtCols = append(*rows.stmtCols, rows.rs.columns)
} else {
rows.rs.columns = (*rows.stmtCols)[rows.i]
if err := rows.mc.readUntilEOF(); err != nil {
return err
}
}
rows.i++
return nil
rows.rs.columns, err = rows.mc.readColumns(resLen)
return err
}
func (rows *binaryRows) Next(dest []driver.Value) error {