mirror of
https://github.com/shopspring/decimal.git
synced 2024-11-23 04:40:49 +01:00
use directly the int64 instead of casting to float
This commit is contained in:
parent
9e9cba8a85
commit
28bb8ff9f5
1 changed files with 1 additions and 1 deletions
|
@ -481,7 +481,7 @@ func (d *Decimal) Scan(value interface{}) error {
|
||||||
case int64:
|
case int64:
|
||||||
// at least in sqlite3 when the value is 0 in db, the data is sent
|
// at least in sqlite3 when the value is 0 in db, the data is sent
|
||||||
// to us as an int64 instead of a float64 ...
|
// to us as an int64 instead of a float64 ...
|
||||||
*d = NewFromFloat(float64(value.(int64)))
|
*d = New(value.(int64), 0)
|
||||||
return err
|
return err
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in a new issue