Support nil driver.Value

pull/79/head
Blaž Hrastnik 2015-04-13 14:33:16 +09:00
parent 879ca97228
commit 7f2cbbfcfd
1 changed files with 5 additions and 1 deletions

View File

@ -301,7 +301,11 @@ func (r *Rows) Next(dest []driver.Value) error {
func valueToInterface(argsV []driver.Value) []interface{} {
args := make([]interface{}, 0, len(argsV))
for _, v := range argsV {
args = append(args, v.(interface{}))
if v != nil {
args = append(args, v.(interface{}))
} else {
args = append(args, nil)
}
}
return args
}