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
`static class` `ColumnMetaData.ArrayType` Array type.
`static class` `ColumnMetaData.AvaticaType` Base class for a column type.
`static class` `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
`boolean` `autoIncrement`
`boolean` `caseSensitive`
`private static com.google.protobuf.Descriptors.FieldDescriptor` `CATALOG_NAME_DESCRIPTOR`
`String` `catalogName`
`private static com.google.protobuf.Descriptors.FieldDescriptor` `COLUMN_CLASS_NAME_DESCRIPTOR`
`private static com.google.protobuf.Descriptors.FieldDescriptor` `COLUMN_NAME_DESCRIPTOR`
`String` `columnClassName`
`String` `columnName`
`boolean` `currency`
`boolean` `definitelyWritable`
`int` `displaySize`
`String` `label`
`private static com.google.protobuf.Descriptors.FieldDescriptor` `LABEL_DESCRIPTOR`
`int` `nullable`
`int` `ordinal`
`int` `precision`
`boolean` `readOnly`
`int` `scale`
`private static com.google.protobuf.Descriptors.FieldDescriptor` `SCHEMA_NAME_DESCRIPTOR`
`String` `schemaName`
`boolean` `searchable`
`boolean` `signed`
`private static com.google.protobuf.Descriptors.FieldDescriptor` `TABLE_NAME_DESCRIPTOR`
`String` `tableName`
`ColumnMetaData.AvaticaType` `type`
`boolean` `writable`

### Constructor Summary

Constructors
Constructor and 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

Methods
`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)`
`private static <T> T` `first(T t0, T t1)`
`static ColumnMetaData` `fromProto(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`.
`Common.ColumnMetaData` `toProto()`

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

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

### Field Detail

#### CATALOG_NAME_DESCRIPTOR

    private static final com.google.protobuf.Descriptors.FieldDescriptor CATALOG_NAME_DESCRIPTOR

#### SCHEMA_NAME_DESCRIPTOR

    private static final com.google.protobuf.Descriptors.FieldDescriptor SCHEMA_NAME_DESCRIPTOR

#### LABEL_DESCRIPTOR

    private static final com.google.protobuf.Descriptors.FieldDescriptor LABEL_DESCRIPTOR

#### COLUMN_NAME_DESCRIPTOR

    private static final com.google.protobuf.Descriptors.FieldDescriptor COLUMN_NAME_DESCRIPTOR

#### TABLE_NAME_DESCRIPTOR

    private static final com.google.protobuf.Descriptors.FieldDescriptor TABLE_NAME_DESCRIPTOR

#### COLUMN_CLASS_NAME_DESCRIPTOR

    private static final com.google.protobuf.Descriptors.FieldDescriptor COLUMN_CLASS_NAME_DESCRIPTOR

#### 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 Detail

#### 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 Detail

#### toProto

    public Common.ColumnMetaData toProto()

#### fromProto

    public static ColumnMetaData fromProto(Common.ColumnMetaData proto)

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`

#### equals

    public boolean equals(Object o)

Overrides:
  `equals` in class `Object`

#### first

    private static <T> T first(T t0,
              T t1)

#### 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)