Skip to content

Commit 42bfac5

Browse files
authored
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
1 parent c530fd4 commit 42bfac5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stmt.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ func (smt *FakeStmt) QueryContext(ctx context.Context, args []driver.NamedValue)
146146
for _, record := range fResp.Response {
147147
oneRow := &row{cols: make([]interface{}, len(columnNames))}
148148
for _, col := range columnNames {
149-
oneRow.cols[colIndexes[col]] = []byte(record[col].(string))
149+
oneRow.cols[colIndexes[col]] = record[col]
150150
}
151151
rows = append(rows, oneRow)
152152
}

0 commit comments

Comments
 (0)