1
0
mirror of https://github.com/DATA-DOG/go-sqlmock.git synced 2025-06-23 00:17:47 +02:00

Fix scanning nulls from CSV input, add unit test

This commit is contained in:
Craig Fitzpatrick
2018-09-13 14:08:26 -04:00
parent 4eed5ba1a0
commit 8240a82333
2 changed files with 51 additions and 1 deletions

View File

@ -11,7 +11,7 @@ import (
// CSVColumnParser is a function which converts trimmed csv
// column string to a []byte representation. currently
// transforms NULL to nil
var CSVColumnParser = func(s string) []byte {
var CSVColumnParser = func(s string) driver.Value {
switch {
case strings.ToLower(s) == "null":
return nil