protected function _quoteParts($query)
    {
        foreach (['distinct', 'select', 'from', 'group'] as $part) {
            $contents = $query->clause($part);

            if (!is_array($contents)) {
                continue;
            }

            $result = $this->_basicQuoter($contents);
            if (!empty($result)) {
                $query->{$part}($result, true);
            }
        }

        $joins = $query->clause('join');
        if ($joins) {
            $joins = $this->_quoteJoins($joins);
            $query->join($joins, [], true);
        }
    }