src/DcGeneral/Data/FilterBuilder.php
protected function optimizedFilter($filterRule, $children, $operation)
    {
        $procedure = new FilterBuilderSql($this->getMetaModel()->getTableName(), $operation, $this->connection);
        $skipped   = $this->buildNativeSqlProcedure($procedure, $children);

        if (!$procedure->isEmpty()) {
            $filterRule->addChild($this->getMetaModel()->getEmptyFilter()->addFilterRule($procedure->build()));
        }

        return $skipped;
    }
protected function optimizedFilter($filterRule, $children, $operation)
    {
        $procedure = new FilterBuilderSql($this->getMetaModel()->getTableName(), $operation, $this->connection);
        $skipped   = $this->buildNativeSqlProcedure($procedure, $children);

        if (!$procedure->isEmpty()) {
            $filterRule->addChild($this->getMetaModel()->getEmptyFilter()->addFilterRule($procedure->build()));
        }

        return $skipped;
    }
Method to optimize as many system column lookup filters as possible into a combined filter rule.

@param ConditionAnd|ConditionOr $filterRule The filter to which the optimized rule shall be added to.

@param array                    $children   The children to parse.

@param string                   $operation  The operation to parse (AND or OR).

@return array