Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getColumnClassName needs to be implemented #2112

Open
livk-cloud opened this issue Jan 25, 2025 · 3 comments
Open

getColumnClassName needs to be implemented #2112

livk-cloud opened this issue Jan 25, 2025 · 3 comments
Labels

Comments

@livk-cloud
Copy link

Describe your feedback

com.clickhouse.jdbc.metadata.ResultSetMetaData#getColumnClassName needs to be implemented like com.clickhouse.jdbc.ClickHouseResultSetMetaData, otherwise Spring Jdbc and Mybatis will not work

public class ResultSetMetaData implements java.sql.ResultSetMetaData, JdbcV2Wrapper {

       public String getColumnClassName(int column) throws SQLException {
        throw new SQLException("Not implemented", "0A000");
    }
}
public class ClickHouseResultSetMetaData extends JdbcWrapper implements ResultSetMetaData {
    public String getColumnClassName(int column) throws SQLException {
        return this.mapper.toJavaClass(this.getColumn(column), this.typeMap).getCanonicalName();
    }
}
@livk-cloud
Copy link
Author

#2113

@chernser
Copy link
Contributor

Good day, @livk-cloud !
We appreciate your contribution!

@chernser
Copy link
Contributor

@livk-cloud is there any document that points out how JDBC driver should behave and what should be returned?
I mean any guidelines from Spring or Mybatis how they "see" type mapping? I think, it is critical now to understand to make a review of your PR.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants