From 28bb8ff9f579e0cfba5d94161d1d9b6ae7875fce Mon Sep 17 00:00:00 2001 From: Florent AIDE Date: Thu, 3 Dec 2015 11:06:49 +0100 Subject: [PATCH] use directly the int64 instead of casting to float --- decimal.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/decimal.go b/decimal.go index 1a53440..8dbc062 100644 --- a/decimal.go +++ b/decimal.go @@ -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: