Ensure all number types are converted to floats
This commit is contained in:
parent
bf4659d8f9
commit
c91164bc93
1 changed files with 16 additions and 0 deletions
16
db/fetch.go
16
db/fetch.go
|
@ -46,8 +46,24 @@ func (e *executor) fetch(ctx context.Context, val interface{}, doc *data.Doc) (o
|
||||||
return val.VA, nil
|
return val.VA, nil
|
||||||
case int:
|
case int:
|
||||||
return float64(val), nil
|
return float64(val), nil
|
||||||
|
case int8:
|
||||||
|
return float64(val), nil
|
||||||
|
case int16:
|
||||||
|
return float64(val), nil
|
||||||
|
case int32:
|
||||||
|
return float64(val), nil
|
||||||
case int64:
|
case int64:
|
||||||
return float64(val), nil
|
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 float32:
|
||||||
|
return float64(val), nil
|
||||||
case float64:
|
case float64:
|
||||||
return float64(val), nil
|
return float64(val), nil
|
||||||
case []interface{}:
|
case []interface{}:
|
||||||
|
|
Loading…
Reference in a new issue