to not convert every value to []byte

allows to put different types of data. For example time.Time and represent it correctly in output struct when using mocked replies
This commit is contained in:
Davyd Dzhahaiev
2017-08-08 15:49:13 +02:00
committed by GitHub
parent c530fd4ef3
commit 42bfac5e4f
+1 -1
View File
@@ -146,7 +146,7 @@ func (smt *FakeStmt) QueryContext(ctx context.Context, args []driver.NamedValue)
for _, record := range fResp.Response {
oneRow := &row{cols: make([]interface{}, len(columnNames))}
for _, col := range columnNames {
oneRow.cols[colIndexes[col]] = []byte(record[col].(string))
oneRow.cols[colIndexes[col]] = record[col]
}
rows = append(rows, oneRow)
}