Merge pull request #9 from foomo/feat/add-query-matchers

feat: add query matchers
This commit is contained in:
Tomaz Jejcic 2023-10-25 14:54:08 +02:00 committed by GitHub
commit 80dd06457a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41,6 +41,13 @@ func ValidateQuery(query *catvo.Query, attributes catvo.Attributes) []constants.
isValueExpired(e.Matcher.StringEquals.Value, def)
case e.Matcher.StringNotEquals != nil:
isValueExpired(e.Matcher.StringNotEquals.Value, def)
case e.Matcher.IntInRange != nil:
case e.Matcher.IntFrom != nil:
case e.Matcher.IntTo != nil:
case e.Matcher.IntEquals != nil:
case e.Matcher.IntNotEquals != nil:
case e.Matcher.BoolEquals != nil:
case e.Matcher.Bitmap != nil:
default:
errors = append(errors, constants.MissingQueryCondition)
}