Package com.clickhouse.client.api.query
Interface GenericRecord
- All Known Implementing Classes:
BinaryReaderBackedRecord,MapBackedRecord
public interface GenericRecord
-
Method Summary
Modifier and TypeMethodDescriptiongetBigDecimal(int index) Reads column with name `colName` as a BigDecimal.getBigDecimal(String colName) Reads column with name `colName` as a BigDecimal.getBigInteger(int index) Reads column with name `colName` as a BigInteger.getBigInteger(String colName) Reads column with name `colName` as a BigInteger.booleangetBoolean(int index) Reads column with name `colName` as a boolean.booleangetBoolean(String colName) Reads column with name `colName` as a boolean.boolean[]getBooleanArray(int index) boolean[]getBooleanArray(String colName) bytegetByte(int index) Reads column with name `colName` as a byte.byteReads column with name `colName` as a byte.byte[]getByteArray(int index) Reads column with name `colName` as a string.byte[]getByteArray(String colName) Reads column with name `colName` as a string.getClickHouseBitmap(int index) getClickHouseBitmap(String colName) doublegetDouble(int index) Reads column with name `colName` as a double.doubleReads column with name `colName` as a double.double[]getDoubleArray(int index) Reads column with name `colName` as a string.double[]getDoubleArray(String colName) Reads column with name `colName` as a string.getDuration(int index) Returns the value of the specified column as a Duration.getDuration(String colName) Returns the value of the specified column as a Duration.shortgetEnum16(int index) shortbytegetEnum8(int index) bytefloatgetFloat(int index) Reads column with name `colName` as a float.floatReads column with name `colName` as a float.float[]getFloatArray(int index) Reads column with name `colName` as a string.float[]getFloatArray(String colName) Reads column with name `colName` as a string.getGeoMultiPolygon(int index) Returns the value of the specified column as a ClickHouseGeoMultiPolygonValue.getGeoMultiPolygon(String colName) Returns the value of the specified column as a ClickHouseGeoMultiPolygonValue.getGeoPoint(int index) Returns the value of the specified column as a ClickHouseGeoPointValue.getGeoPoint(String colName) Returns the value of the specified column as a ClickHouseGeoPointValue.getGeoPolygon(int index) Returns the value of the specified column as a ClickHouseGeoPolygonValue.getGeoPolygon(String colName) Returns the value of the specified column as a ClickHouseGeoPolygonValue.getGeoRing(int index) Returns the value of the specified column as a ClickHouseGeoRingValue.getGeoRing(String colName) Returns the value of the specified column as a ClickHouseGeoRingValue.getInet4Address(int index) Returns the value of the specified column as an Inet4Address.getInet4Address(String colName) Returns the value of the specified column as an Inet4Address.getInet6Address(int index) Returns the value of the specified column as an Inet6Address.getInet6Address(String colName) Returns the value of the specified column as an Inet6Address.getInstant(int index) Returns the value of the specified column as an Instant.getInstant(String colName) Returns the value of the specified column as an Instant.int[]getIntArray(int index) Reads column with name `colName` as a string.int[]getIntArray(String colName) Reads column with name `colName` as a string.intgetInteger(int index) Reads column with name `colName` as an integer.intgetInteger(String colName) Reads column with name `colName` as an integer.<T> List<T>getList(int index) Reads column with name `colName` as a string.<T> List<T>Reads column with name `colName` as a string.getLocalDate(int index) getLocalDate(String colName) getLocalDateTime(int index) getLocalDateTime(String colName) longgetLong(int index) Reads column with name `colName` as a long.longReads column with name `colName` as a long.long[]getLongArray(int index) Reads column with name `colName` as a string.long[]getLongArray(String colName) Reads column with name `colName` as a string.getObject(int index) getOffsetDateTime(int index) getOffsetDateTime(String colName) shortgetShort(int index) Reads column with name `colName` as a short.shortReads column with name `colName` as a short.getString(int index) Reads column with name `colName` as a string.Reads column with name `colName` as a string.getTemporalAmount(int index) Returns the value of the specified column as a TemporalAmount.getTemporalAmount(String colName) Returns the value of the specified column as a TemporalAmount.Object[]getTuple(int index) Object[]getUUID(int index) Returns the value of the specified column as a UUID.Returns the value of the specified column as a UUID.Returns all values of this record in Map.getZonedDateTime(int index) Returns the value of the specified column as a ZonedDateTime.getZonedDateTime(String colName) Returns the value of the specified column as a ZonedDateTime.booleanhasValue(int colIndex) boolean
-
Method Details
-
getString
Reads column with name `colName` as a string.- Parameters:
colName- - column name- Returns:
-
getByte
Reads column with name `colName` as a byte.- Parameters:
colName- - column name- Returns:
-
getShort
Reads column with name `colName` as a short.- Parameters:
colName- - column name- Returns:
-
getInteger
Reads column with name `colName` as an integer.- Parameters:
colName- - column name- Returns:
-
getLong
Reads column with name `colName` as a long.- Parameters:
colName- - column name- Returns:
-
getFloat
Reads column with name `colName` as a float.- Parameters:
colName-- Returns:
-
getDouble
Reads column with name `colName` as a double.- Parameters:
colName-- Returns:
-
getBoolean
Reads column with name `colName` as a boolean.- Parameters:
colName-- Returns:
-
getBigInteger
Reads column with name `colName` as a BigInteger.- Parameters:
colName-- Returns:
-
getBigDecimal
Reads column with name `colName` as a BigDecimal.- Parameters:
colName-- Returns:
-
getInstant
Returns the value of the specified column as an Instant. Timezone is derived from the column definition. If no timezone is specified in the column definition then UTC will be used. If column value is Date or Date32 it will return an Instant with time set to 00:00:00. If column value is DateTime or DateTime32 it will return an Instant with the time part.- Parameters:
colName-- Returns:
-
getZonedDateTime
Returns the value of the specified column as a ZonedDateTime. Timezone is derived from the column definition. If no timezone is specified in the column definition then UTC will be used. If column value is Date or Date32 it will return a ZonedDateTime with time set to 00:00:00. If column value is DateTime or DateTime32 it will return a ZonedDateTime with the time part.- Parameters:
colName-- Returns:
-
getDuration
Returns the value of the specified column as a Duration. If a stored value is bigger than Long.MAX_VALUE then exception will be thrown. In such case use asBigInteger() method. If value of IntervalQuarter then Duration will be in the unit of Months.- Parameters:
colName-- Returns:
- Duration in the unit of column type.
-
getTemporalAmount
Returns the value of the specified column as a TemporalAmount. Period is used for dates and Duration is used for times.- Parameters:
colName-- Returns:
- TemporalAmount in the unit of column type.
-
getInet4Address
Returns the value of the specified column as an Inet4Address.- Parameters:
colName-- Returns:
-
getInet6Address
Returns the value of the specified column as an Inet6Address.- Parameters:
colName-- Returns:
-
getUUID
Returns the value of the specified column as a UUID.- Parameters:
colName-- Returns:
-
getGeoPoint
Returns the value of the specified column as a ClickHouseGeoPointValue.- Parameters:
colName-- Returns:
-
getGeoRing
Returns the value of the specified column as a ClickHouseGeoRingValue.- Parameters:
colName-- Returns:
-
getGeoPolygon
Returns the value of the specified column as a ClickHouseGeoPolygonValue.- Parameters:
colName-- Returns:
-
getGeoMultiPolygon
Returns the value of the specified column as a ClickHouseGeoMultiPolygonValue.- Parameters:
colName-- Returns:
-
getList
Reads column with name `colName` as a string.- Parameters:
colName- - column name- Returns:
-
getByteArray
Reads column with name `colName` as a string.- Parameters:
colName- - column name- Returns:
-
getIntArray
Reads column with name `colName` as a string.- Parameters:
colName- - column name- Returns:
-
getLongArray
Reads column with name `colName` as a string.- Parameters:
colName- - column name- Returns:
-
getFloatArray
Reads column with name `colName` as a string.- Parameters:
colName- - column name- Returns:
-
getDoubleArray
Reads column with name `colName` as a string.- Parameters:
colName- - column name- Returns:
-
getBooleanArray
-
getString
Reads column with name `colName` as a string.- Parameters:
index-- Returns:
-
hasValue
boolean hasValue(int colIndex) -
hasValue
-
getByte
byte getByte(int index) Reads column with name `colName` as a byte.- Parameters:
index-- Returns:
-
getShort
short getShort(int index) Reads column with name `colName` as a short.- Parameters:
index-- Returns:
-
getInteger
int getInteger(int index) Reads column with name `colName` as an integer.- Parameters:
index-- Returns:
-
getLong
long getLong(int index) Reads column with name `colName` as a long.- Parameters:
index-- Returns:
-
getFloat
float getFloat(int index) Reads column with name `colName` as a float. Warning: there is no overflow check for float.- Parameters:
index-- Returns:
-
getDouble
double getDouble(int index) Reads column with name `colName` as a double. Warning: there is no overflow check for double.- Parameters:
index-- Returns:
-
getBoolean
boolean getBoolean(int index) Reads column with name `colName` as a boolean.- Parameters:
index-- Returns:
-
getBigInteger
Reads column with name `colName` as a BigInteger.- Parameters:
index-- Returns:
-
getBigDecimal
Reads column with name `colName` as a BigDecimal.- Parameters:
index-- Returns:
-
getInstant
Returns the value of the specified column as an Instant. Timezone is derived from the column definition. If no timezone is specified in the column definition then UTC will be used. If column value is Date or Date32 it will return an Instant with time set to 00:00:00. If column value is DateTime or DateTime32 it will return an Instant with the time part.- Parameters:
index-- Returns:
-
getZonedDateTime
Returns the value of the specified column as a ZonedDateTime. Timezone is derived from the column definition. If no timezone is specified in the column definition then UTC will be used. If column value is Date or Date32 it will return a ZonedDateTime with time set to 00:00:00. If column value is DateTime or DateTime32 it will return a ZonedDateTime with the time part.- Parameters:
index-- Returns:
-
getDuration
Returns the value of the specified column as a Duration. If a stored value is bigger than Long.MAX_VALUE then exception will be thrown. In such case use asBigInteger() method. If value of IntervalQuarter then Duration will be in the unit of Months.- Parameters:
index-- Returns:
- Duration in the unit of column type.
-
getTemporalAmount
Returns the value of the specified column as a TemporalAmount. Period is used for dates and Duration is used for times.- Parameters:
index-- Returns:
- TemporalAmount in the unit of column type.
-
getInet4Address
Returns the value of the specified column as an Inet4Address.- Parameters:
index-- Returns:
-
getInet6Address
Returns the value of the specified column as an Inet6Address.- Parameters:
index-- Returns:
-
getUUID
Returns the value of the specified column as a UUID.- Parameters:
index-- Returns:
-
getGeoPoint
Returns the value of the specified column as a ClickHouseGeoPointValue.- Parameters:
index-- Returns:
-
getGeoRing
Returns the value of the specified column as a ClickHouseGeoRingValue.- Parameters:
index-- Returns:
-
getGeoPolygon
Returns the value of the specified column as a ClickHouseGeoPolygonValue.- Parameters:
index-- Returns:
-
getGeoMultiPolygon
Returns the value of the specified column as a ClickHouseGeoMultiPolygonValue.- Parameters:
index-- Returns:
-
getList
Reads column with name `colName` as a string.- Parameters:
index- - column name- Returns:
-
getByteArray
byte[] getByteArray(int index) Reads column with name `colName` as a string.- Parameters:
index- - column name- Returns:
-
getIntArray
int[] getIntArray(int index) Reads column with name `colName` as a string.- Parameters:
index- - column name- Returns:
-
getLongArray
long[] getLongArray(int index) Reads column with name `colName` as a string.- Parameters:
index- - column name- Returns:
-
getFloatArray
float[] getFloatArray(int index) Reads column with name `colName` as a string.- Parameters:
index- - column name- Returns:
-
getDoubleArray
double[] getDoubleArray(int index) Reads column with name `colName` as a string.- Parameters:
index- - column name- Returns:
-
getBooleanArray
boolean[] getBooleanArray(int index) -
getTuple
-
getTuple
-
getEnum8
-
getEnum8
byte getEnum8(int index) -
getEnum16
-
getEnum16
short getEnum16(int index) -
getLocalDate
-
getLocalDate
-
getLocalDateTime
-
getLocalDateTime
-
getOffsetDateTime
-
getOffsetDateTime
-
getObject
-
getObject
-
getClickHouseBitmap
-
getClickHouseBitmap
-
getSchema
TableSchema getSchema() -
getValues
Returns all values of this record in Map.- Returns:
- a Map of column names and values.
-