Closed YikSanChan closed 2 years ago
Can you run the .Scan() on the destination of interface{} type?
Can you run the .Scan() on the destination of interface{} type?
@sfc-gh-jbahk thanks! I update my code https://github.com/YikSanChan/gosnowflake-bug-reproduce/commit/f2660bec1ec2110b3bfa505a2b0f177e11e92f42, then rerun, it still produces the same result - all strings.
60001 string
Customer#000060001 string
9Ii4zQn9cX string
14 string
24-678-784-9652 string
9957.560000 string
HOUSEHOLD string
l theodolites boost slyly at the platelets: permanently ironic packages wake slyly pend string
@sfc-gh-jbahk hi can you help take a second look? thx!
@YikSanChan please use the WithHigherPrecision method (details found here: https://github.com/snowflakedb/gosnowflake/blob/master/doc.go#L227-L229).
@sfc-gh-jbahk That works, thank you.
Issue description
Scan still produces string when the destination is interface{} at v1.6.5. I open the issue because https://github.com/snowflakedb/gosnowflake/issues/513 is not really resolved. @sfc-gh-jbahk Can you help take a look?
Example code
Check this out https://github.com/YikSanChan/gosnowflake-bug-reproduce.
custkey, for example, should be integer rather than string, as it is NUMBER(38, 0) on snowflake.
Configuration
Driver version (or git SHA): 1.6.5
Go version: 1.17.2
Server version: 5.43.1
Client OS: macOS 10.15.7