Allow other filter query types

This commit is contained in:
Jake Barnby 2023-03-23 18:09:38 +13:00
parent 7a089f8861
commit 035180c4da
No known key found for this signature in database
GPG key ID: C437A8CC85B96E9C

View file

@ -57,10 +57,7 @@ class Queries extends Validator
if (!$query instanceof Query) {
try {
$query = Query::parse($query);
if (\str_contains($query->getAttribute(), '.')) { // todo: double check!
return true;
}
} catch (\Throwable $th) {
} catch (\Throwable) {
$this->message = "Invalid query: {$query}";
return false;
}
@ -93,6 +90,11 @@ class Queries extends Validator
case Query::TYPE_GREATER:
case Query::TYPE_GREATEREQUAL:
case Query::TYPE_SEARCH:
case Query::TYPE_IS_NULL:
case Query::TYPE_IS_NOT_NULL:
case Query::TYPE_BETWEEN:
case Query::TYPE_STARTS_WITH:
case Query::TYPE_ENDS_WITH:
$methodType = Base::METHOD_TYPE_FILTER;
break;
default: