fix test
This commit is contained in:
parent
05a5611e59
commit
27235499b6
|
@ -582,9 +582,3 @@ func (p *sqlite3Driver) GenScanResult(colType string) (interface{}, error) {
|
|||
return &r, nil
|
||||
}
|
||||
}
|
||||
|
||||
func (b *sqlite3Driver) Features() DriverFeatures {
|
||||
return DriverFeatures{
|
||||
SupportNullable: false,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -471,7 +471,7 @@ func (session *Session) row2Slice(rows *core.Rows, types []*sql.ColumnType, fiel
|
|||
return nil, err
|
||||
}
|
||||
|
||||
if err := session.engine.scan(rows, types, scanResults...); err != nil {
|
||||
if err := session.engine.scan(rows, fields, types, scanResults...); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
|
|
@ -47,11 +47,15 @@ func (session *Session) rows2Strings(rows *core.Rows) (resultsSlice []map[string
|
|||
return nil, err
|
||||
}
|
||||
for rows.Next() {
|
||||
result, err := session.engine.row2mapStr(rows, types, fields)
|
||||
result, err := session.engine.scanStringInterface(rows, types)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
resultsSlice = append(resultsSlice, result)
|
||||
var res = make(map[string]string)
|
||||
for i, r := range result {
|
||||
res[fields[i]] = r.(*sql.NullString).String
|
||||
}
|
||||
resultsSlice = append(resultsSlice, res)
|
||||
}
|
||||
|
||||
return resultsSlice, nil
|
||||
|
|
Loading…
Reference in New Issue