mattn / go-oci8

Oracle driver for Go using database/sql
https://mattn.kaoriya.net/
MIT License
630 stars 212 forks source link

Fix from dual -> float #268

Closed MichaelS11 closed 6 years ago

MichaelS11 commented 6 years ago

This is after PR https://github.com/mattn/go-oci8/pull/266

This is to fix a scale (type) issue when selecting a number from dual. When selecting a number from dual Oracle does not know what scale is ahead of time (if it is float or int) . There is no column type and the select could be any kind of scale depending on what number is provided / passed. Since the number returned could be a float or an int, we need to return a float so it can handle both cases as best as possible. (More likely to run in the case of needing decimal places than having a very large int.)

mattn commented 6 years ago

Thank you