mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-10-06 19:07:50 +00:00
set defaults for int field min and max
This commit is contained in:
parent
5612a827ab
commit
62e2b16b88
1 changed files with 7 additions and 1 deletions
|
|
@ -759,7 +759,13 @@ func (h *Handler) handlePostField(w http.ResponseWriter, r *http.Request) {
|
|||
case pilosa.FieldTypeSet:
|
||||
fos = append(fos, pilosa.OptFieldTypeSet(*req.Options.CacheType, *req.Options.CacheSize))
|
||||
case pilosa.FieldTypeInt:
|
||||
fos = append(fos, pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64))
|
||||
if req.Options.Min == nil {
|
||||
*req.Options.Min = math.MinInt64
|
||||
}
|
||||
if req.Options.Max == nil {
|
||||
*req.Options.Max = math.MaxInt64
|
||||
}
|
||||
fos = append(fos, pilosa.OptFieldTypeInt(*req.Options.Min, *req.Options.Max))
|
||||
case pilosa.FieldTypeTime:
|
||||
fos = append(fos, pilosa.OptFieldTypeTime(*req.Options.TimeQuantum, req.Options.NoStandardView))
|
||||
case pilosa.FieldTypeMutex:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue