Class MapBackedRecord

java.lang.Object
com.clickhouse.client.api.data_formats.internal.MapBackedRecord
All Implemented Interfaces:
GenericRecord

public class MapBackedRecord extends Object implements GenericRecord
  • Constructor Details

  • Method Details

    • readValue

      public <T> T readValue(int colIndex)
    • readValue

      public <T> T readValue(String colName)
    • getString

      public String getString(String colName)
      Description copied from interface: GenericRecord
      Reads column with name `colName` as a string.
      Specified by:
      getString in interface GenericRecord
      Parameters:
      colName - - column name
      Returns:
    • getString

      public String getString(int index)
      Description copied from interface: GenericRecord
      Reads column with name `colName` as a string.
      Specified by:
      getString in interface GenericRecord
      Returns:
    • getByte

      public byte getByte(String colName)
      Description copied from interface: GenericRecord
      Reads column with name `colName` as a byte.
      Specified by:
      getByte in interface GenericRecord
      Parameters:
      colName - - column name
      Returns:
    • getShort

      public short getShort(String colName)
      Description copied from interface: GenericRecord
      Reads column with name `colName` as a short.
      Specified by:
      getShort in interface GenericRecord
      Parameters:
      colName - - column name
      Returns:
    • getInteger

      public int getInteger(String colName)
      Description copied from interface: GenericRecord
      Reads column with name `colName` as an integer.
      Specified by:
      getInteger in interface GenericRecord
      Parameters:
      colName - - column name
      Returns:
    • getLong

      public long getLong(String colName)
      Description copied from interface: GenericRecord
      Reads column with name `colName` as a long.
      Specified by:
      getLong in interface GenericRecord
      Parameters:
      colName - - column name
      Returns:
    • getFloat

      public float getFloat(String colName)
      Description copied from interface: GenericRecord
      Reads column with name `colName` as a float.
      Specified by:
      getFloat in interface GenericRecord
      Returns:
    • getDouble

      public double getDouble(String colName)
      Description copied from interface: GenericRecord
      Reads column with name `colName` as a double.
      Specified by:
      getDouble in interface GenericRecord
      Returns:
    • getBoolean

      public boolean getBoolean(String colName)
      Description copied from interface: GenericRecord
      Reads column with name `colName` as a boolean.
      Specified by:
      getBoolean in interface GenericRecord
      Returns:
    • getBigInteger

      public BigInteger getBigInteger(String colName)
      Description copied from interface: GenericRecord
      Reads column with name `colName` as a BigInteger.
      Specified by:
      getBigInteger in interface GenericRecord
      Returns:
    • getBigDecimal

      public BigDecimal getBigDecimal(String colName)
      Description copied from interface: GenericRecord
      Reads column with name `colName` as a BigDecimal.
      Specified by:
      getBigDecimal in interface GenericRecord
      Returns:
    • getInstant

      public Instant getInstant(String colName)
      Description copied from interface: GenericRecord
      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.
      Specified by:
      getInstant in interface GenericRecord
      Returns:
    • getZonedDateTime

      public ZonedDateTime getZonedDateTime(String colName)
      Description copied from interface: GenericRecord
      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.
      Specified by:
      getZonedDateTime in interface GenericRecord
      Returns:
    • getDuration

      public Duration getDuration(String colName)
      Description copied from interface: GenericRecord
      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.
      Specified by:
      getDuration in interface GenericRecord
      Returns:
      Duration in the unit of column type.
    • getInet4Address

      public Inet4Address getInet4Address(String colName)
      Description copied from interface: GenericRecord
      Returns the value of the specified column as an Inet4Address.
      Specified by:
      getInet4Address in interface GenericRecord
      Returns:
    • getInet6Address

      public Inet6Address getInet6Address(String colName)
      Description copied from interface: GenericRecord
      Returns the value of the specified column as an Inet6Address.
      Specified by:
      getInet6Address in interface GenericRecord
      Returns:
    • getUUID

      public UUID getUUID(String colName)
      Description copied from interface: GenericRecord
      Returns the value of the specified column as a UUID.
      Specified by:
      getUUID in interface GenericRecord
      Returns:
    • getGeoPoint

      public com.clickhouse.data.value.ClickHouseGeoPointValue getGeoPoint(String colName)
      Description copied from interface: GenericRecord
      Returns the value of the specified column as a ClickHouseGeoPointValue.
      Specified by:
      getGeoPoint in interface GenericRecord
      Returns:
    • getGeoRing

      public com.clickhouse.data.value.ClickHouseGeoRingValue getGeoRing(String colName)
      Description copied from interface: GenericRecord
      Returns the value of the specified column as a ClickHouseGeoRingValue.
      Specified by:
      getGeoRing in interface GenericRecord
      Returns:
    • getGeoPolygon

      public com.clickhouse.data.value.ClickHouseGeoPolygonValue getGeoPolygon(String colName)
      Description copied from interface: GenericRecord
      Returns the value of the specified column as a ClickHouseGeoPolygonValue.
      Specified by:
      getGeoPolygon in interface GenericRecord
      Returns:
    • getGeoMultiPolygon

      public com.clickhouse.data.value.ClickHouseGeoMultiPolygonValue getGeoMultiPolygon(String colName)
      Description copied from interface: GenericRecord
      Returns the value of the specified column as a ClickHouseGeoMultiPolygonValue.
      Specified by:
      getGeoMultiPolygon in interface GenericRecord
      Returns:
    • getList

      public <T> List<T> getList(String colName)
      Description copied from interface: GenericRecord
      Reads column with name `colName` as a string.
      Specified by:
      getList in interface GenericRecord
      Parameters:
      colName - - column name
      Returns:
    • getByteArray

      public byte[] getByteArray(String colName)
      Description copied from interface: GenericRecord
      Reads column with name `colName` as a string.
      Specified by:
      getByteArray in interface GenericRecord
      Parameters:
      colName - - column name
      Returns:
    • getIntArray

      public int[] getIntArray(String colName)
      Description copied from interface: GenericRecord
      Reads column with name `colName` as a string.
      Specified by:
      getIntArray in interface GenericRecord
      Parameters:
      colName - - column name
      Returns:
    • getLongArray

      public long[] getLongArray(String colName)
      Description copied from interface: GenericRecord
      Reads column with name `colName` as a string.
      Specified by:
      getLongArray in interface GenericRecord
      Parameters:
      colName - - column name
      Returns:
    • getFloatArray

      public float[] getFloatArray(String colName)
      Description copied from interface: GenericRecord
      Reads column with name `colName` as a string.
      Specified by:
      getFloatArray in interface GenericRecord
      Parameters:
      colName - - column name
      Returns:
    • getDoubleArray

      public double[] getDoubleArray(String colName)
      Description copied from interface: GenericRecord
      Reads column with name `colName` as a string.
      Specified by:
      getDoubleArray in interface GenericRecord
      Parameters:
      colName - - column name
      Returns:
    • hasValue

      public boolean hasValue(int colIndex)
      Specified by:
      hasValue in interface GenericRecord
    • hasValue

      public boolean hasValue(String colName)
      Specified by:
      hasValue in interface GenericRecord
    • getByte

      public byte getByte(int index)
      Description copied from interface: GenericRecord
      Reads column with name `colName` as a byte.
      Specified by:
      getByte in interface GenericRecord
      Returns:
    • getShort

      public short getShort(int index)
      Description copied from interface: GenericRecord
      Reads column with name `colName` as a short.
      Specified by:
      getShort in interface GenericRecord
      Returns:
    • getInteger

      public int getInteger(int index)
      Description copied from interface: GenericRecord
      Reads column with name `colName` as an integer.
      Specified by:
      getInteger in interface GenericRecord
      Returns:
    • getLong

      public long getLong(int index)
      Description copied from interface: GenericRecord
      Reads column with name `colName` as a long.
      Specified by:
      getLong in interface GenericRecord
      Returns:
    • getFloat

      public float getFloat(int index)
      Description copied from interface: GenericRecord
      Reads column with name `colName` as a float.
      Specified by:
      getFloat in interface GenericRecord
      Returns:
    • getDouble

      public double getDouble(int index)
      Description copied from interface: GenericRecord
      Reads column with name `colName` as a double.
      Specified by:
      getDouble in interface GenericRecord
      Returns:
    • getBoolean

      public boolean getBoolean(int index)
      Description copied from interface: GenericRecord
      Reads column with name `colName` as a boolean.
      Specified by:
      getBoolean in interface GenericRecord
      Returns:
    • getBigInteger

      public BigInteger getBigInteger(int index)
      Description copied from interface: GenericRecord
      Reads column with name `colName` as a BigInteger.
      Specified by:
      getBigInteger in interface GenericRecord
      Returns:
    • getBigDecimal

      public BigDecimal getBigDecimal(int index)
      Description copied from interface: GenericRecord
      Reads column with name `colName` as a BigDecimal.
      Specified by:
      getBigDecimal in interface GenericRecord
      Returns:
    • getInstant

      public Instant getInstant(int index)
      Description copied from interface: GenericRecord
      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.
      Specified by:
      getInstant in interface GenericRecord
      Returns:
    • getZonedDateTime

      public ZonedDateTime getZonedDateTime(int index)
      Description copied from interface: GenericRecord
      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.
      Specified by:
      getZonedDateTime in interface GenericRecord
      Returns:
    • getDuration

      public Duration getDuration(int index)
      Description copied from interface: GenericRecord
      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.
      Specified by:
      getDuration in interface GenericRecord
      Returns:
      Duration in the unit of column type.
    • getInet4Address

      public Inet4Address getInet4Address(int index)
      Description copied from interface: GenericRecord
      Returns the value of the specified column as an Inet4Address.
      Specified by:
      getInet4Address in interface GenericRecord
      Returns:
    • getInet6Address

      public Inet6Address getInet6Address(int index)
      Description copied from interface: GenericRecord
      Returns the value of the specified column as an Inet6Address.
      Specified by:
      getInet6Address in interface GenericRecord
      Returns:
    • getUUID

      public UUID getUUID(int index)
      Description copied from interface: GenericRecord
      Returns the value of the specified column as a UUID.
      Specified by:
      getUUID in interface GenericRecord
      Returns:
    • getGeoPoint

      public com.clickhouse.data.value.ClickHouseGeoPointValue getGeoPoint(int index)
      Description copied from interface: GenericRecord
      Returns the value of the specified column as a ClickHouseGeoPointValue.
      Specified by:
      getGeoPoint in interface GenericRecord
      Returns:
    • getGeoRing

      public com.clickhouse.data.value.ClickHouseGeoRingValue getGeoRing(int index)
      Description copied from interface: GenericRecord
      Returns the value of the specified column as a ClickHouseGeoRingValue.
      Specified by:
      getGeoRing in interface GenericRecord
      Returns:
    • getGeoPolygon

      public com.clickhouse.data.value.ClickHouseGeoPolygonValue getGeoPolygon(int index)
      Description copied from interface: GenericRecord
      Returns the value of the specified column as a ClickHouseGeoPolygonValue.
      Specified by:
      getGeoPolygon in interface GenericRecord
      Returns:
    • getGeoMultiPolygon

      public com.clickhouse.data.value.ClickHouseGeoMultiPolygonValue getGeoMultiPolygon(int index)
      Description copied from interface: GenericRecord
      Returns the value of the specified column as a ClickHouseGeoMultiPolygonValue.
      Specified by:
      getGeoMultiPolygon in interface GenericRecord
      Returns:
    • getList

      public <T> List<T> getList(int index)
      Description copied from interface: GenericRecord
      Reads column with name `colName` as a string.
      Specified by:
      getList in interface GenericRecord
      Parameters:
      index - - column name
      Returns:
    • getByteArray

      public byte[] getByteArray(int index)
      Description copied from interface: GenericRecord
      Reads column with name `colName` as a string.
      Specified by:
      getByteArray in interface GenericRecord
      Parameters:
      index - - column name
      Returns:
    • getIntArray

      public int[] getIntArray(int index)
      Description copied from interface: GenericRecord
      Reads column with name `colName` as a string.
      Specified by:
      getIntArray in interface GenericRecord
      Parameters:
      index - - column name
      Returns:
    • getLongArray

      public long[] getLongArray(int index)
      Description copied from interface: GenericRecord
      Reads column with name `colName` as a string.
      Specified by:
      getLongArray in interface GenericRecord
      Parameters:
      index - - column name
      Returns:
    • getFloatArray

      public float[] getFloatArray(int index)
      Description copied from interface: GenericRecord
      Reads column with name `colName` as a string.
      Specified by:
      getFloatArray in interface GenericRecord
      Parameters:
      index - - column name
      Returns:
    • getDoubleArray

      public double[] getDoubleArray(int index)
      Description copied from interface: GenericRecord
      Reads column with name `colName` as a string.
      Specified by:
      getDoubleArray in interface GenericRecord
      Parameters:
      index - - column name
      Returns:
    • getTuple

      public Object[] getTuple(int index)
      Specified by:
      getTuple in interface GenericRecord
    • getTuple

      public Object[] getTuple(String colName)
      Specified by:
      getTuple in interface GenericRecord
    • getEnum8

      public byte getEnum8(String colName)
      Specified by:
      getEnum8 in interface GenericRecord
    • getEnum8

      public byte getEnum8(int index)
      Specified by:
      getEnum8 in interface GenericRecord
    • getEnum16

      public short getEnum16(String colName)
      Specified by:
      getEnum16 in interface GenericRecord
    • getEnum16

      public short getEnum16(int index)
      Specified by:
      getEnum16 in interface GenericRecord
    • getLocalDate

      public LocalDate getLocalDate(String colName)
      Specified by:
      getLocalDate in interface GenericRecord
    • getLocalDate

      public LocalDate getLocalDate(int index)
      Specified by:
      getLocalDate in interface GenericRecord
    • getLocalDateTime

      public LocalDateTime getLocalDateTime(String colName)
      Specified by:
      getLocalDateTime in interface GenericRecord
    • getLocalDateTime

      public LocalDateTime getLocalDateTime(int index)
      Specified by:
      getLocalDateTime in interface GenericRecord