Closed IvoGoman closed 11 months ago
Does with this change I can create csv with null value for int for example? Or determine empty string or null?
Does with this change I can create csv with null value for int for example? Or determine empty string or null?
Yes, the intention of this PR is to reflect any NULL
in the CSV correctly with pointer variables such *int
or sql.NullInt
etc.
I am using a struct with a
*string
such asPreviously the
NULL
passed toFromCSVString(..)
was not working correctly. After scanning the result Rows of the query into the struct resulted in an empty string. With this change the mock behaves like the DB and the Value field isnil