Package org.apache.calcite.avatica

# Class ColumnMetaData

java.lang.Object
org.apache.calcite.avatica.ColumnMetaData

public class ColumnMetaData extends Object
Metadata for a column.

(Compare with `ResultSetMetaData`.)

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static class`
`ColumnMetaData.ArrayType`
Array type.
`static class`
`ColumnMetaData.AvaticaType`
Base class for a column type.
`static enum`
`ColumnMetaData.Rep`
Description of the type used to internally represent a value.
`static class`
`ColumnMetaData.ScalarType`
Scalar type.
`static class`
`ColumnMetaData.StructType`
Record type.

## Field Summary

Fields
Modifier and Type
Field
Description
`final boolean`
`autoIncrement`
`final boolean`
`caseSensitive`
`final String`
`catalogName`
`final String`
`columnClassName`
`final String`
`columnName`
`final boolean`
`currency`
`final boolean`
`definitelyWritable`
`final int`
`displaySize`
`final String`
`label`
`final int`
`nullable`
`final int`
`ordinal`
`final int`
`precision`
`final boolean`
`readOnly`
`final int`
`scale`
`final String`
`schemaName`
`final boolean`
`searchable`
`final boolean`
`signed`
`final String`
`tableName`
`final ColumnMetaData.AvaticaType`
`type`
`final boolean`
`writable`

## Constructor Summary

Constructors
Constructor
Description
`ColumnMetaData(int ordinal, boolean autoIncrement, boolean caseSensitive, boolean searchable, boolean currency, int nullable, boolean signed, int displaySize, String label, String columnName, String schemaName, int precision, int scale, String tableName, String catalogName, ColumnMetaData.AvaticaType type, boolean readOnly, boolean writable, boolean definitelyWritable, String columnClassName)`

## Method Summary

Modifier and Type
Method
Description
`static ColumnMetaData.ArrayType`
`array(ColumnMetaData.AvaticaType componentType, String typeName, ColumnMetaData.Rep rep)`
Creates an `ColumnMetaData.ArrayType`.
`static ColumnMetaData`
`dummy(ColumnMetaData.AvaticaType type, boolean nullable)`
Creates a ColumnMetaData for result sets that are not based on a struct but need to have a single 'field' for purposes of `ResultSetMetaData`.
`boolean`
`equals(Object o)`
`static ColumnMetaData`
`fromProto(org.apache.calcite.avatica.proto.Common.ColumnMetaData proto)`
`int`
`hashCode()`
`static ColumnMetaData.ScalarType`
`scalar(int type, String typeName, ColumnMetaData.Rep rep)`
Creates a `ColumnMetaData.ScalarType`.
`ColumnMetaData`
`setRep(ColumnMetaData.Rep rep)`
`static ColumnMetaData.StructType`
`struct(List<ColumnMetaData> columns)`
Creates a `ColumnMetaData.StructType`.
`org.apache.calcite.avatica.proto.Common.ColumnMetaData`
`toProto()`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### ordinal

public final int ordinal

### autoIncrement

public final boolean autoIncrement

### caseSensitive

public final boolean caseSensitive

### searchable

public final boolean searchable

### currency

public final boolean currency

### nullable

public final int nullable

### signed

public final boolean signed

### displaySize

public final int displaySize

### label

public final String label

### columnName

public final String columnName

### schemaName

public final String schemaName

### precision

public final int precision

### scale

public final int scale

### tableName

public final String tableName

### catalogName

public final String catalogName

### readOnly

public final boolean readOnly

### writable

public final boolean writable

### definitelyWritable

public final boolean definitelyWritable

### columnClassName

public final String columnClassName

### type

public final ColumnMetaData.AvaticaType type

## Constructor Details

### ColumnMetaData

public ColumnMetaData(int ordinal, boolean autoIncrement, boolean caseSensitive, boolean searchable, boolean currency, int nullable, boolean signed, int displaySize, String label, String columnName, String schemaName, int precision, int scale, String tableName, String catalogName, ColumnMetaData.AvaticaType type, boolean readOnly, boolean writable, boolean definitelyWritable, String columnClassName)

## Method Details

### toProto

public org.apache.calcite.avatica.proto.Common.ColumnMetaData toProto()

### fromProto

public static ColumnMetaData fromProto(org.apache.calcite.avatica.proto.Common.ColumnMetaData proto)

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`

### equals

public boolean equals(Object o)

Overrides:
  `equals` in class `Object`

### scalar

public static ColumnMetaData.ScalarType scalar(int type, String typeName, ColumnMetaData.Rep rep)
Creates a `ColumnMetaData.ScalarType`.

### struct

public static ColumnMetaData.StructType struct(List<ColumnMetaData> columns)
Creates a `ColumnMetaData.StructType`.

### array

public static ColumnMetaData.ArrayType array(ColumnMetaData.AvaticaType componentType, String typeName, ColumnMetaData.Rep rep)
Creates an `ColumnMetaData.ArrayType`.

### dummy

public static ColumnMetaData dummy(ColumnMetaData.AvaticaType type, boolean nullable)
Creates a ColumnMetaData for result sets that are not based on a struct but need to have a single 'field' for purposes of `ResultSetMetaData`.

### setRep

public ColumnMetaData setRep(ColumnMetaData.Rep rep)