Package org.apache.calcite.avatica

## Enum ColumnMetaData.Rep

- java.lang.Object
- - java.lang.Enum<ColumnMetaData.Rep>
  - - org.apache.calcite.avatica.ColumnMetaData.Rep

All Implemented Interfaces:
  `java.io.Serializable`, `java.lang.Comparable<ColumnMetaData.Rep>`

Enclosing class:
  ColumnMetaData

    public static enum ColumnMetaData.Rep
    extends java.lang.Enum<ColumnMetaData.Rep>

Description of the type used to internally represent a value. For example, a `Date` might be represented as a `PRIMITIVE_INT` if not nullable, or a `JAVA_SQL_DATE`.

### Enum Constant Summary

Enum Constants
`ARRAY`
`BOOLEAN`
`BYTE`
`BYTE_STRING`
`CHARACTER`
`DOUBLE`
`FLOAT`
`INTEGER`
`JAVA_SQL_DATE`
`JAVA_SQL_TIME`
`JAVA_SQL_TIMESTAMP`
`JAVA_UTIL_DATE`
`LONG`
`MULTISET`
`NUMBER` Values are represented as some sub-class of `Number`.
`OBJECT`
`PRIMITIVE_BOOLEAN`
`PRIMITIVE_BYTE`
`PRIMITIVE_CHAR`
`PRIMITIVE_DOUBLE`
`PRIMITIVE_FLOAT`
`PRIMITIVE_INT`
`PRIMITIVE_LONG`
`PRIMITIVE_SHORT`
`SHORT`
`STRING`
`STRUCT`

### Field Summary

Fields
`java.lang.Class` `clazz`
`int` `typeId`
`static java.util.Map<java.lang.Class,​ColumnMetaData.Rep>` `VALUE_MAP`

### Constructor Summary

Constructors
`private` `Rep​(java.lang.Class clazz, int typeId)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static ColumnMetaData.Rep` `fromProto​(Common.Rep proto)`
`java.lang.Object` `jdbcGet​(java.sql.ResultSet resultSet, int i)` Returns the value of a column of this type from a result set.
`static ColumnMetaData.Rep` `nonPrimitiveRepOf​(SqlType type)` Computes the given JDBC type for a primitive to the corresponding `ColumnMetaData.Rep` for the equivalent Object type.
`static ColumnMetaData.Rep` `of​(java.lang.reflect.Type clazz)`
`static ColumnMetaData.Rep` `serialRepOf​(SqlType type)` Computes the given JDBC type into the `ColumnMetaData.Rep` for the wire (serial) form of that type.
`Common.Rep` `toProto()`
`static ColumnMetaData.Rep` `valueOf​(java.lang.String name)` Returns the enum constant of this type with the specified name.
`static ColumnMetaData.Rep[]` `values()` Returns an array containing the constants of this enum type, in the order they are declared.

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

`clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

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

`getClass, notify, notifyAll, wait, wait, wait`

### Enum Constant Detail

#### PRIMITIVE_BOOLEAN

    public static final ColumnMetaData.Rep PRIMITIVE_BOOLEAN

#### PRIMITIVE_BYTE

    public static final ColumnMetaData.Rep PRIMITIVE_BYTE

#### PRIMITIVE_CHAR

    public static final ColumnMetaData.Rep PRIMITIVE_CHAR

#### PRIMITIVE_SHORT

    public static final ColumnMetaData.Rep PRIMITIVE_SHORT

#### PRIMITIVE_INT

    public static final ColumnMetaData.Rep PRIMITIVE_INT

#### PRIMITIVE_LONG

    public static final ColumnMetaData.Rep PRIMITIVE_LONG

#### PRIMITIVE_FLOAT

    public static final ColumnMetaData.Rep PRIMITIVE_FLOAT

#### PRIMITIVE_DOUBLE

    public static final ColumnMetaData.Rep PRIMITIVE_DOUBLE

#### BOOLEAN

    public static final ColumnMetaData.Rep BOOLEAN

#### BYTE

    public static final ColumnMetaData.Rep BYTE

#### CHARACTER

    public static final ColumnMetaData.Rep CHARACTER

#### SHORT

    public static final ColumnMetaData.Rep SHORT

#### INTEGER

    public static final ColumnMetaData.Rep INTEGER

#### LONG

    public static final ColumnMetaData.Rep LONG

#### FLOAT

    public static final ColumnMetaData.Rep FLOAT

#### DOUBLE

    public static final ColumnMetaData.Rep DOUBLE

#### JAVA_SQL_TIME

    public static final ColumnMetaData.Rep JAVA_SQL_TIME

#### JAVA_SQL_TIMESTAMP

    public static final ColumnMetaData.Rep JAVA_SQL_TIMESTAMP

#### JAVA_SQL_DATE

    public static final ColumnMetaData.Rep JAVA_SQL_DATE

#### JAVA_UTIL_DATE

    public static final ColumnMetaData.Rep JAVA_UTIL_DATE

#### BYTE_STRING

    public static final ColumnMetaData.Rep BYTE_STRING

#### STRING

    public static final ColumnMetaData.Rep STRING

#### NUMBER

    public static final ColumnMetaData.Rep NUMBER

Values are represented as some sub-class of `Number`. The JSON encoding does this.

#### ARRAY

    public static final ColumnMetaData.Rep ARRAY

#### MULTISET

    public static final ColumnMetaData.Rep MULTISET

#### STRUCT

    public static final ColumnMetaData.Rep STRUCT

#### OBJECT

    public static final ColumnMetaData.Rep OBJECT

### Field Detail

#### clazz

    public final java.lang.Class clazz

#### typeId

    public final int typeId

#### VALUE_MAP

    public static final java.util.Map<java.lang.Class,​ColumnMetaData.Rep> VALUE_MAP

### Constructor Detail

#### Rep

    private Rep​(java.lang.Class clazz,
                int typeId)

### Method Detail

#### values

    public static ColumnMetaData.Rep[] values()

Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

    for (ColumnMetaData.Rep c : ColumnMetaData.Rep.values())
        System.out.println(c);

Returns:
  an array containing the constants of this enum type, in the order they are declared

#### valueOf

    public static ColumnMetaData.Rep valueOf​(java.lang.String name)

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
  `name` - the name of the enum constant to be returned.
Returns:
  the enum constant with the specified name
Throws:
  `java.lang.IllegalArgumentException` - if this enum type has no constant with the specified name
  `java.lang.NullPointerException` - if the argument is null

#### of

    public static ColumnMetaData.Rep of​(java.lang.reflect.Type clazz)

#### jdbcGet

    public java.lang.Object jdbcGet​(java.sql.ResultSet resultSet,
                                    int i)
                             throws java.sql.SQLException

Returns the value of a column of this type from a result set.

Throws:
  `java.sql.SQLException`

#### toProto

    public Common.Rep toProto()

#### fromProto

    public static ColumnMetaData.Rep fromProto​(Common.Rep proto)

#### nonPrimitiveRepOf

    public static ColumnMetaData.Rep nonPrimitiveRepOf​(SqlType type)

Computes the given JDBC type for a primitive to the corresponding `ColumnMetaData.Rep` for the equivalent Object type. If the provided type is not for a primitive, a `ColumnMetaData.Rep` for the provided Object is returned.

Parameters:
  `type` - The type of a value (based on `Types`).
Returns:
  The corresponding non-primitive `ColumnMetaData.Rep` for the given `type`.

#### serialRepOf

    public static ColumnMetaData.Rep serialRepOf​(SqlType type)

Computes the given JDBC type into the `ColumnMetaData.Rep` for the wire (serial) form of that type.

Parameters:
  `type` - The type of a value (based on `Types`).
Returns:
  The corresponding `ColumnMetaData.Rep` for the serial form of the `type`.