use directly the int64 instead of casting to float

This commit is contained in:
Florent AIDE 2015-12-03 11:06:49 +01:00
parent 9e9cba8a85
commit 28bb8ff9f5

View file

@ -481,7 +481,7 @@ func (d *Decimal) Scan(value interface{}) error {
case int64:
// at least in sqlite3 when the value is 0 in db, the data is sent
// to us as an int64 instead of a float64 ...
*d = NewFromFloat(float64(value.(int64)))
*d = New(value.(int64), 0)
return err
default: