## org.h2.table
Class IndexColumn

    java.lang.Object
      org.h2.table.IndexColumn

    public class IndexColumn

extends java.lang.Object

This represents a column item of an index. This is required because some indexes support descending sorted columns.

Field Summary
`Column` `column` The column, or null if not set.
`java.lang.String` `columnName` The column name.
`int` `sortType` The sort type.

Constructor Summary
`IndexColumn()`

Method Summary
`java.lang.String` `getSQL()` Get the SQL snippet for this index column.
`static void` `mapColumns(IndexColumn[] indexColumns, Table table)` Map the columns using the column names and the specified table.
`static IndexColumn[]` `wrap(Column[] columns)` Create an array of index columns from a list of columns.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### columnName

    public java.lang.String columnName

  The column name.

### column

    public Column column

  The column, or null if not set.

### sortType

    public int sortType

  The sort type. Ascending (the default) and descending are supported; nulls can be sorted first or last.

Constructor Detail

### IndexColumn

    public IndexColumn()

Method Detail

### getSQL

    public java.lang.String getSQL()

  Get the SQL snippet for this index column.

  Returns:
    the SQL snippet

### wrap

    public static IndexColumn[] wrap(Column[] columns)

  Create an array of index columns from a list of columns. The default sort type is used.

  Parameters:
    `columns` - the column list
  Returns:
    the index column array

### mapColumns

    public static void mapColumns(IndexColumn[] indexColumns,
                                  Table table)

  Map the columns using the column names and the specified table.

  Parameters:
    `indexColumns` - the column list with column names set
    `table` - the table from where to map the column names to columns