Package org.eclipse.birt.report.engine.api.script

# Interface IColumnMetaData

public interface IColumnMetaData
Describes the column metadata of a row.

## Method Summary

Modifier and Type
Method
Description
`String`
`getColumnAlias(int index)`
Returns the column alias at the specified index.
`int`
`getColumnCount()`
Returns the number of columns in a row of the result set.
`String`
`getColumnLabel(int index)`
Gets the label or display name of the column at the specified index.
`String`
`getColumnName(int index)`
Returns the column name at the specified index.
`String`
`getColumnNativeTypeName(int index)`
Returns the data provider specific data type name of the specified column.
`int`
`getColumnType(int index)`
Returns the data type of the column at the specified index.
`String`
`getColumnTypeName(int index)`
Returns the Data Engine data type name of the column at the specified index.
`boolean`
`isComputedColumn(int index)`
Indicates whether the specified projected column is defined as a computed column.

## Method Details

### getColumnCount

int getColumnCount()
Returns the number of columns in a row of the result set.

Returns:
  the number of columns in a row.

### getColumnName

String getColumnName(int index) throws ScriptException
Returns the column name at the specified index.

Parameters:
  `index` - The projected column index.
Returns:
  The name of the specified column.
Throws:
  `ScriptException` - if given index is invalid.

### getColumnAlias

String getColumnAlias(int index) throws ScriptException
Returns the column alias at the specified index. An alias is given to a column as a programmatic convenience. A column can be referred using a name or an alias interchangeably.

Parameters:
  `index` - The projected column index.
Returns:
  The alias of the specified column. Null if none is defined.
Throws:
  `ScriptException` - if given index is invalid.

### getColumnType

int getColumnType(int index) throws ScriptException
Returns the data type of the column at the specified index.

Parameters:
  `index` - The projected column index.
Returns:
  The data type of the specified column, as an integer defined in org.eclipse.birt.data.engine.api.DataType.
Throws:
  `ScriptException` - if given index is invalid.

### getColumnTypeName

String getColumnTypeName(int index) throws ScriptException
Returns the Data Engine data type name of the column at the specified index.

Parameters:
  `index` - The projected column index.
Returns:
  The Data Engine data type name of the specified column.
Throws:
  `ScriptException` - if given index is invalid.

### getColumnNativeTypeName

String getColumnNativeTypeName(int index) throws ScriptException
Returns the data provider specific data type name of the specified column.

Returns:
  the data type name as defined by the data provider.
Throws:
  `ScriptException` - if given index is invalid.

### getColumnLabel

String getColumnLabel(int index) throws ScriptException
Gets the label or display name of the column at the specified index.

Parameters:
  `index` - The projected column index.
Returns:
  The label of the specified column.
Throws:
  `ScriptException` - if given index is invalid.

### isComputedColumn

boolean isComputedColumn(int index) throws ScriptException
Indicates whether the specified projected column is defined as a computed column. A computed column is one that is not retrieved from the underlying data provider. Only those computed columns declared explicitly in a data set design are considered as "computed" columns.

Parameters:
  `index` - The projected column index.
Returns:
  true if the given column is a computed column; false otherwise.
Throws:
  `ScriptException` - if given index is invalid.