'Adds items from the \'ordering\' sequence to the query\'s "order by"
clause. These items are either field names (not column names) --
possibly with a direction prefix (\'-\' or \'?\') -- or ordinals,
corresponding to column positions in the \'select\' list.
If \'ordering\' is empty, all ordering is cleared from the query.'

def add_ordering(self, *ordering):

    errors = []
    for item in ordering:
        if (not ORDER_PATTERN.match(item)):
            errors.append(item)
    if errors:
        raise FieldError(('Invalid    order_by    arguments:    %s' % errors))
    if ordering:
        self.order_by.extend(ordering)
    else:
        self.default_ordering = False
