public function formatPredicate(Predicate $predicate) {
        $output = [];

        foreach ($predicate->getParams() as $param) {
            if ($param instanceof Predicate) {
                $output[] = sprintf($this->getClause(self::GROUP), $this->formatPredicate($param));

            } else if ($param instanceof Expr) {
                $output[] = $this->formatExpression($param);
            }
        }

        return implode(' ' . $this->getKeyword($predicate->getType()) . ' ', $output);
    }