Package com.clickhouse.jdbc
Class JdbcTypeMapping
- java.lang.Object
-
- com.clickhouse.jdbc.JdbcTypeMapping
-
public final class JdbcTypeMapping extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ClickHouseDataTypefromJdbcType(int jdbcType)static ClickHouseColumnfromJdbcType(int jdbcType, int scaleOrLength)static Class<?>toJavaClass(Map<String,Class<?>> typeMap, ClickHouseColumn column)Gets Java class for the given column.static inttoJdbcType(Class<?> javaClass)Gets corresponding JDBC type for the given Java class.static inttoJdbcType(Map<String,Class<?>> typeMap, ClickHouseColumn column)Gets corresponding JDBC type for the given column.
-
-
-
Method Detail
-
toJdbcType
public static int toJdbcType(Class<?> javaClass)
Gets corresponding JDBC type for the given Java class.- Parameters:
javaClass- non-null Java class- Returns:
- JDBC type
-
toJdbcType
public static int toJdbcType(Map<String,Class<?>> typeMap, ClickHouseColumn column)
Gets corresponding JDBC type for the given column.- Parameters:
typeMap- type mappings, could be nullcolumn- non-null column definition- Returns:
- JDBC type
-
toJavaClass
public static Class<?> toJavaClass(Map<String,Class<?>> typeMap, ClickHouseColumn column)
Gets Java class for the given column.- Parameters:
typeMap- type mappings, could be nullcolumn- non-null column definition- Returns:
- Java class for the column
-
fromJdbcType
public static ClickHouseColumn fromJdbcType(int jdbcType, int scaleOrLength)
-
fromJdbcType
public static ClickHouseDataType fromJdbcType(int jdbcType)
-
-