mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-06 05:28:03 +00:00
Bump deps
This commit is contained in:
34
vendor/github.com/go-sql-driver/mysql/rows.go
generated
vendored
34
vendor/github.com/go-sql-driver/mysql/rows.go
generated
vendored
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user