protected function orderByPart(array $aliases) {
        $sortFields = [];

        foreach ($aliases as $alias) {
            $sortFields[] = $this->getDriverEscaper()->reserved($alias['name']) . '.' .
                    $this->getDriverEscaper()->reserved('object') . ' ' .
                    $alias['dir'] . $this->operationSeparator;
        }

        $result = $this->getDriverEscaper()->dbCommand('ORDER BY') . ' ' .
                implode($this->getDriverEscaper()->getFieldsSeparator(), $sortFields)
                . $this->operationSeparator;

        return $result;
    }