|
@@ -32,7 +32,7 @@ func (n *NullInt) Scan(src interface{}) error {
|
|
|
}
|
|
|
|
|
|
// NullFloat is an implementation of a int for the MySQL type numeric ....
|
|
|
-type NullFloat float64
|
|
|
+type NullFloat float32
|
|
|
|
|
|
// Value implements the driver.Valuer interface,
|
|
|
// and turns the bytes into a integer for MySQL storage.
|
|
@@ -44,7 +44,7 @@ func (n NullFloat) Value() (driver.Value, error) {
|
|
|
// and turns the bytes incoming from MySQL into a numeric
|
|
|
func (n *NullFloat) Scan(src interface{}) error {
|
|
|
if src != nil {
|
|
|
- v, ok := src.(float64)
|
|
|
+ v, ok := src.(float32)
|
|
|
if !ok {
|
|
|
*n = NullFloat(0)
|
|
|
return nil
|