Skip to content

Commit 4f318bf

Browse files
authored
feat: implemented getColumnClassName
1 parent e9b01c6 commit 4f318bf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

jdbc-v2/src/main/java/com/clickhouse/jdbc/metadata/ResultSetMetaData.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import com.clickhouse.client.api.metadata.TableSchema;
66
import com.clickhouse.data.ClickHouseColumn;
7+
import com.clickhouse.jdbc.JdbcTypeMapping;
78
import com.clickhouse.jdbc.JdbcV2Wrapper;
89
import com.clickhouse.jdbc.ResultSetImpl;
910
import com.clickhouse.jdbc.internal.JdbcUtils;
@@ -165,6 +166,7 @@ public boolean isDefinitelyWritable(int column) throws SQLException {
165166

166167
@Override
167168
public String getColumnClassName(int column) throws SQLException {
168-
throw new SQLException("Not implemented", ExceptionUtils.SQL_STATE_FEATURE_NOT_SUPPORTED);
169+
JdbcTypeMapping mapping = JdbcTypeMapping.getDefaultMapping();
170+
return mapping.toJavaClass(getColumn(column), Map.of()).getCanonicalName();
169171
}
170172
}

0 commit comments

Comments
 (0)