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:
parent
dacf7b954b
commit
b60c663fdd
1 changed files with 9 additions and 0 deletions
|
@ -542,6 +542,15 @@ func (s *scanner) scanModel(chp ...rune) (tok Token, lit string, val interface{}
|
||||||
return ILLEGAL, buf.String(), val
|
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
|
// If we have a comma, but the
|
||||||
// value is below zero, we will
|
// value is below zero, we will
|
||||||
// error as this will cause an
|
// error as this will cause an
|
||||||
|
|
Loading…
Reference in a new issue