SQL models need a different min and max value

If the same minimum and maximum value is used in a SQL model … |person:1..1| then the sql query parser will fail.
This commit is contained in:
Tobie Morgan Hitchcock 2017-04-28 17:09:35 +01:00
parent dacf7b954b
commit b60c663fdd

View file

@ -542,6 +542,15 @@ func (s *scanner) scanModel(chp ...rune) (tok Token, lit string, val interface{}
return ILLEGAL, buf.String(), val
}
// If the minimum value is the
// same as the maximum value then
// error, as there is no ability
// to increment or decrement.
if min == max {
return ILLEGAL, buf.String(), val
}
// If we have a comma, but the
// value is below zero, we will
// error as this will cause an