Make sure that any non floats are converted to floats
This commit is contained in:
parent
548995e935
commit
fc0825a7fa
1 changed files with 18 additions and 0 deletions
18
db/fetch.go
18
db/fetch.go
|
@ -40,6 +40,24 @@ func (e *executor) fetch(ctx context.Context, val interface{}, doc *data.Doc) (o
|
|||
return val, nil
|
||||
case *sql.Value:
|
||||
return val.ID, nil
|
||||
case int:
|
||||
return float64(val), nil
|
||||
case int8:
|
||||
return float64(val), nil
|
||||
case int16:
|
||||
return float64(val), nil
|
||||
case int32:
|
||||
return float64(val), nil
|
||||
case int64:
|
||||
return float64(val), nil
|
||||
case uint:
|
||||
return float64(val), nil
|
||||
case uint16:
|
||||
return float64(val), nil
|
||||
case uint32:
|
||||
return float64(val), nil
|
||||
case uint64:
|
||||
return float64(val), nil
|
||||
case []byte:
|
||||
return string(val), nil
|
||||
case []interface{}:
|
||||
|
|
Loading…
Reference in a new issue