code: def get_name(self, use_alias=True):
          if self.desc:
              direction = 'DESC'
          else:
              direction = 'ASC'
          if use_alias:
              return '{0} {1}'.format(self.field.get_identifier(), direction)
          return '{0} {1}'.format(self.field.get_select_sql(), direction)