(self, aliases)
Order the data based on order by aliases (prefixed column names) in the
        table.

        Arguments:
            aliases (`~.utils.OrderByTuple`): optionally prefixed names of
                columns ('-' indicates descending order) in order of
                significance with regard to data ordering.
Order the data based on order by aliases (prefixed column names) in the
        table.
Order the data based on order by aliases ( prefixed column names ) in the table .
def order_by(self, aliases):
        """
        Order the data based on order by aliases (prefixed column names) in the
        table.

        Arguments:
            aliases (`~.utils.OrderByTuple`): optionally prefixed names of
                columns ('-' indicates descending order) in order of
                significance with regard to data ordering.
        """
        accessors = []
        for alias in aliases:
            bound_column = self.table.columns[OrderBy(alias).bare]

            # bound_column.order_by reflects the current ordering applied to
            # the table. As such we need to check the current ordering on the
            # column and use the opposite if it doesn't match the alias prefix.
            if alias[0] != bound_column.order_by_alias[0]:
                accessors += bound_column.order_by.opposite
            else:
                accessors += bound_column.order_by

        self.data.sort(key=OrderByTuple(accessors).key)
def order_by ( self , aliases ) : accessors = [ ] for alias in aliases : bound_column = self . table . columns [ OrderBy ( alias ) . bare ] # bound_column.order_by reflects the current ordering applied to # the table. As such we need to check the current ordering on the # column and use the opposite if it doesn't match the alias prefix. if alias [ 0 ] != bound_column . order_by_alias [ 0 ] : accessors += bound_column . order_by . opposite else : accessors += bound_column . order_by self . data . sort ( key = OrderByTuple ( accessors ) . key )