Class JdbcTypeMapping

java.lang.Object
com.clickhouse.jdbc.JdbcTypeMapping

@Deprecated public class JdbcTypeMapping extends Object
Deprecated.
This class defines mappings among Types, JDBCType, ClickHouseDataType, ClickHouseColumn, and Class. It does not impact serialization and deserialization, which is handled separately by ClickHouseDataProcessor.
  • Constructor Details

    • JdbcTypeMapping

      public JdbcTypeMapping()
      Deprecated.
  • Method Details

    • getDefaultMapping

      public static JdbcTypeMapping getDefaultMapping()
      Deprecated.
      Gets default type mapping.
      Returns:
      non-null type mapping
    • getAnsiMapping

      public static JdbcTypeMapping getAnsiMapping()
      Deprecated.
      Gets ANSI type mapping.
      Returns:
      non-null type mapping
    • getCustomJavaClass

      protected Class<?> getCustomJavaClass(ClickHouseColumn column, Map<String,Class<?>> typeMap)
      Deprecated.
      Gets custom Java class for the given column.
      Parameters:
      column - non-null column definition
      typeMap - column type to Java class map, could be null
      Returns:
      custom Java class which may or may not be null
    • getDataType

      protected ClickHouseDataType getDataType(int sqlType)
      Deprecated.
      Gets corresponding ClickHouseDataType of the given Types.
      Parameters:
      sqlType - generic SQL types defined in JDBC
      Returns:
      non-null ClickHouse data type
    • getSqlType

      protected int getSqlType(Class<?> javaClass)
      Deprecated.
      Gets corresponding Types for the given Java class.
      Parameters:
      javaClass - non-null Java class
      Returns:
      generic SQL type defined in JDBC
    • toColumn

      public ClickHouseColumn toColumn(JDBCType jdbcType, int scaleOrLength)
      Deprecated.
      Converts JDBCType to ClickHouse column.
      Parameters:
      jdbcType - JDBC type
      scaleOrLength - scale or length
      Returns:
      non-null ClickHouse column
    • toColumn

      public ClickHouseColumn toColumn(int sqlType, int scaleOrLength)
      Deprecated.
      Converts Types to ClickHouse column.
      Parameters:
      sqlType - generic SQL types defined in JDBC
      scaleOrLength - scale or length
      Returns:
      non-null ClickHouse column
    • toJavaClass

      public Class<?> toJavaClass(ClickHouseColumn column, Map<String,Class<?>> typeMap)
      Deprecated.
      Converts ClickHouseColumn to Class.
      Parameters:
      column - non-null column definition
      typeMap - optional custom type mapping
      Returns:
      non-null Java class
    • toNativeType

      public String toNativeType(ClickHouseColumn column)
      Deprecated.
      Converts ClickHouseColumn to native type.
      Parameters:
      column - non-null column definition
      Returns:
      non-null native type
    • toSqlType

      public int toSqlType(ClickHouseColumn column, Map<String,Class<?>> typeMap)
      Deprecated.
      Converts ClickHouseColumn to generic SQL type defined in JDBC.
      Parameters:
      column - non-null column definition
      typeMap - optional custom mapping
      Returns:
      generic SQL type defined in JDBC