Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for returning sql.NullString #25

Open
jabclab opened this issue May 13, 2015 · 0 comments
Open

Support for returning sql.NullString #25

jabclab opened this issue May 13, 2015 · 0 comments

Comments

@jabclab
Copy link

jabclab commented May 13, 2015

At present either a string or time.Time is returned for the driver.Value within RowsFromCSVString. It would be nice to add support returning a sql.NullString.

It could look something like:

type testDriver struct {
    // as is
    enableNullParsing bool
}

// Within RowsFromCSVString...
if d.enableTimeParsing {
    // as is
} else if d.enableNullParsing && v == "" {
    row[i] = sql.NullString{}
} else {
    row[i] = v
}

Happy to knock this up into a PR if it's something you'd like to see added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant