public function buildOrderByFragment(SQLSelect $query, array &$parameters)
    {
        $orderBy = $query->getOrderBy();
        if (empty($orderBy)) {
            return '';
        }

        // Build orders, each with direction considered
        $statements = array();
        foreach ($orderBy as $clause => $dir) {
            $statements[] = trim("$clause $dir");
        }

        $nl = $this->getSeparator();
        return "{$nl}ORDER BY " . implode(', ', $statements);
    }