Package com.clickhouse.client
Class ClickHouseColumn
- java.lang.Object
-
- com.clickhouse.client.ClickHouseColumn
-
- All Implemented Interfaces:
Serializable
public final class ClickHouseColumn extends Object implements Serializable
This class represents a column defined in database.- See Also:
- Serialized Form
-
-
Method Summary
-
-
-
Method Detail
-
readColumn
protected static int readColumn(String args, int startIndex, int len, String name, List<ClickHouseColumn> list)
-
of
public static ClickHouseColumn of(String columnName, ClickHouseDataType dataType, boolean nullable, int precision, int scale)
-
of
public static ClickHouseColumn of(String columnName, ClickHouseDataType dataType, boolean nullable, boolean lowCardinality, String... parameters)
-
of
public static ClickHouseColumn of(String columnName, ClickHouseDataType dataType, boolean nullable, ClickHouseColumn... nestedColumns)
-
of
public static ClickHouseColumn of(String columnName, String columnType)
-
parse
public static List<ClickHouseColumn> parse(String args)
-
isAggregateFunction
public boolean isAggregateFunction()
-
isArray
public boolean isArray()
-
isEnum
public boolean isEnum()
-
isMap
public boolean isMap()
-
isNested
public boolean isNested()
-
isTuple
public boolean isTuple()
-
getArrayNestedLevel
public int getArrayNestedLevel()
-
getArrayBaseColumn
public ClickHouseColumn getArrayBaseColumn()
-
getDataType
public ClickHouseDataType getDataType()
-
getEnumConstants
public ClickHouseEnum getEnumConstants()
-
getOriginalTypeName
public String getOriginalTypeName()
-
getColumnName
public String getColumnName()
-
isNullable
public boolean isNullable()
-
getTimeZone
public TimeZone getTimeZone()
-
getPrecision
public int getPrecision()
-
getScale
public int getScale()
-
hasNestedColumn
public boolean hasNestedColumn()
-
getNestedColumns
public List<ClickHouseColumn> getNestedColumns()
-
getKeyInfo
public ClickHouseColumn getKeyInfo()
-
getValueInfo
public ClickHouseColumn getValueInfo()
-
getFunction
public String getFunction()
Gets function when column type isClickHouseDataType.AggregateFunction. So it will returnquantiles(0.5, 0.9)when the column type isAggregateFunction(quantiles(0.5, 0.9), UInt64).- Returns:
- function, null when column type is not AggregateFunction
-
getAggregateFunction
public ClickHouseAggregateFunction getAggregateFunction()
Gets aggregate function when column type isClickHouseDataType.AggregateFunction. So it will returnClickHouseAggregateFunction.quantilewhen the column type isAggregateFunction(quantiles(0.5, 0.9), UInt64).- Returns:
- function name, null when column type is not AggregateFunction
-
-