public function evaluateQueryRule(QueryValue $query, $params = [])
    {
        if(($rule = $query->getRule()) instanceof Rule) {
            $environment = $this->rulesEngineProvider->evaluate($rule);
            $this->rulesEngineProvider->setQueryParams($query->getId(), $params);
            
            return $environment->getQueryResults();
        }
        
        return [];
    }