// Scan is sql.Scanner interface implementation
Scan is sql.Scanner interface implementation
// Scan is sql . Scanner interface implementation
func (f *Float64) Scan(src interface{}) error {
	if src == nil {
		*f = Float64{}
		return nil
	}
	switch x := src.(type) {
	case []byte:
		sc := string(x)
		ic, err := strconv.ParseFloat(sc, 64)
		if err != nil {
			return err
		}
		f.set(ic)
	case float64:
		f.set(x)
	case int:
		f.set(float64(x))
	default:
		return fmt.Errorf("unsupported type %T for scanning", src)
	}
	return nil
}
func ( f * Float64 ) Scan ( src interface { } ) error { if src == nil { * f = Float64 { } return nil } switch x := src . ( type ) { case [ ] byte : sc := string ( x ) ic , err := strconv . ParseFloat ( sc , 64 ) if err != nil { return err } f . set ( ic ) case float64 : f . set ( x ) case int : f . set ( float64 ( x ) ) default : return fmt . Errorf ( " " , src ) } return nil }
Scan is sql.Scanner interface implementation
Scan is sql . Scanner interface implementation