Ordered by column name only.
16841
@Override
	public int compareTo(Column o) {
		int diff = name.compareToIgnoreCase(o.name);
		if(diff!=0) return diff;
		return name.compareTo(o.name);
	}
1165519
def column( self, name ):
        
        columns = self.columns()
        if ( name in columns ):
            return columns.index(name)
        return -1
43463
def column_names(self, table):
      """"""

      table_info = self.execute(
        u'PRAGMA table_info(%s)' % quote(table))
      return (column['name'] for column in table_info)
1066165
function orderColumns() {
        var keyTotals = filenames.reduce(reduceFilenamesToKeyTotal, {});
        return sort(keyTotals);

        function reduceFilenamesToKeyTotal(reduced, filename) {
          var item = json[filename];
          return Object.keys(item)
            .reduce(reducePropToLength.bind(item), reduced);
        }
      }
852452
public Query orderedBy( List<Ordering> orderings ) {
        return new Query(source, constraint, orderings, columns, getLimits(), distinct);
    }
994174
def _order_queries(self):
        """"""
        from .condition import Order
        order = []
        for column in self.columns:
            if column.order_by:
                o = Order(self.cls, column.attr, column.order_by)
                order.append(o.__query__())
        if not order:
            k = self.columns[0].attr
            o = Order(self.cls, k)
            self.columns[0].order_by = o.order
            order.append(o.__query__())
        return order
1152498
def filter_by_cols(self, cols, ID=None):
        
        rows = to_list(cols)
        fil = lambda x: x in rows
        applyto = {k: self._positions[k][1] for k in self.keys()}
        if ID is None:
            ID = self.ID + '.filtered_by_cols'
        return self.filter(fil, applyto=applyto, ID=ID)
320269
@Override
    public Table removeColumns(Column<?>... columns) {
        columnList.removeAll(Arrays.asList(columns));
        return this;
    }
397141
private void sortByMetaData(List<MetaDataCol> sortColumns)
  {
    if (sortColumns == null || sortColumns.isEmpty())
    {
      sort(new Object[]
      {
        PROP_DOC_NAME
      }, new boolean[]
      {
        true
      });

      return;
    }

    Object[] sortByColumns = new Object[sortColumns.size()];
    boolean[] ascendingOrDescending = new boolean[sortColumns.size()];

    for (int i = 0; i < sortColumns.size(); i++)
    {

      sortByColumns[i] = sortColumns.get(i).getColName();

      ascendingOrDescending[i] = sortColumns.get(i).ascending;

    }

    sort(sortByColumns, ascendingOrDescending);

  }
140859
def order_by(self, **kwargs):
        
        if kwargs:
            col, order = kwargs.popitem()
            self.order_clause = "order by {col} {order} ".format(
                col=col, order=order)
        return self
110752
def only(names)
      filtered_stats = @stats.select do |stat|
        names.include? stat[:name]
      end
      StatsRegistry.new(filtered_stats)
    end
213855
def _ids_and_column_names(names, force_lower_case=False):
        """"""
        fixed = OrderedDict()
        for name in names:
            identifier = RowWrapper._make_identifier(name)
            if force_lower_case:
                identifier = identifier.lower()
            while identifier in fixed:
                identifier = RowWrapper._increment_numeric_suffix(identifier)
            fixed[identifier] = name
        return fixed
603923
def SetColumns( self, columns, sortOrder=None ):
        """"""
        self.columns = columns 
        self.sortOrder = [(x.defaultOrder,x) for x in self.columns if x.sortDefault]
        self.CreateColumns()
1061854
def sortByColumn(self, index, direction):
        
        if self.isPaged() and not self.isFullyLoaded():
            self.reorder(index, direction)
        else:
            super(XOrbTreeWidget, self).sortByColumn(index, direction)
1034450
def ordered_cols(self, columns, section):
        
        columns = list(columns)  # might be a tuple
        fixed_cols = [self.key]
        if section.lower() == "different":
            fixed_cols.extend([Differ.CHANGED_MATCH_KEY, Differ.CHANGED_OLD, Differ.CHANGED_NEW])
        map(columns.remove, fixed_cols)
        columns.sort()
        return fixed_cols + columns
538167
public function sortColumnsByOrder()
    {
        $columns = $this->_columns;
        foreach ($this->getColumnsOrder() as $columnId => $after) {
            if ($after[0] === '-') {
                $before = substr($after, 1);
                $after = null;
            } else {
                $before = null;
            }
            if ($after !== null && isset($columns[$after])) {
                $currentPosition = array_search($columnId, array_keys($columns));
                $value = array_splice($columns, $currentPosition, 1);

                $destPosition = array_search($after, array_keys($columns)) + 1;
                $columns = array_slice($columns, 0, $destPosition) + $value + array_slice($columns, $destPosition);
            } elseif ($before !== null && $columns[$before]) {
                $currentPosition = array_search($columnId, array_keys($columns));
                $value = array_splice($columns, $currentPosition, 1);

                $destPosition = array_search($before, array_keys($columns));
                $columns = array_slice($columns, 0, $destPosition) + $value + array_slice($columns, $destPosition);
            }
        }

        $this->_columns = $columns;

        end($this->_columns);
        $this->_lastColumnId = key($this->_columns);
        return $this;
    }
415376
def ReorderByColumn( self, column ):
        """"""
        # TODO: store current selection and re-select after sorting...
        single_column = self.SetNewOrder( column )
        self.reorder( single_column = True )
        self.Refresh()