mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-07 00:55:55 +00:00
throw error with invalid field value
This commit is contained in:
parent
9110d52573
commit
abc6bad985
1 changed files with 5 additions and 0 deletions
5
frame.go
5
frame.go
|
|
@ -874,6 +874,11 @@ func (f *Frame) ImportValue(fieldName string, columnIDs, values []uint64) error
|
|||
dataByFragment := make(map[importKey]importValueData)
|
||||
for i := range columnIDs {
|
||||
columnID, value := columnIDs[i], values[i]
|
||||
if int64(value) > field.Max {
|
||||
return fmt.Errorf("%v, columnID=%v, value=%v", ErrFieldValueTooHigh, columnID, value)
|
||||
} else if int64(value) < field.Min {
|
||||
return fmt.Errorf("%v, columnID=%v, value=%v", ErrFieldValueTooLow, columnID, value)
|
||||
}
|
||||
|
||||
// Attach value to each field view.
|
||||
for _, name := range []string{viewName} {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue