Closed robstradling closed 3 months ago
I will use new type Number to hold all number variety and solve these issues
Please fix this quickly
I add changes in last commit would you please test and give me feedback
Thanks @sijms. Commit https://github.com/sijms/go-ora/commit/b04862ca3078dc46907e4e8a566507bd505af880 fixes my demo and looks good to me. Time for a v2.8.10 release?
Due to the
float64(val)
conversion at https://github.com/sijms/go-ora/blob/master/v2/utils.go#L591, int64 values can get "corrupted".Demo at https://gist.github.com/robstradling/363b54e979b879e0450cfa36e238cca6
Interestingly, if I remove the int64 case at https://github.com/sijms/go-ora/blob/master/v2/utils.go#L590, my sql.NullInt64 test case then works correctly, presumably because the sql.Scanner stuff in the default case doesn't do a floating point conversion.