⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
public class DatabaseMetaDataImpl implements java.sql.DatabaseMetaData, JdbcV2Wrapper {
private static final Logger log = LoggerFactory.getLogger(DatabaseMetaDataImpl.class);

private static final int JDBC_SPEC_MAJOR_VERSION = 4;
private static final int JDBC_SPEC_MINOR_VERSION = 2;

public enum TableType {
DICTIONARY("DICTIONARY"),
LOG_TABLE("LOG TABLE"),
Expand Down Expand Up @@ -1410,12 +1413,12 @@ public int getDatabaseMinorVersion() throws SQLException {

@Override
public int getJDBCMajorVersion() throws SQLException {
return Driver.getDriverMajorVersion();
return JDBC_SPEC_MAJOR_VERSION;
}

@Override
public int getJDBCMinorVersion() throws SQLException {
return Driver.getDriverMinorVersion();
return JDBC_SPEC_MINOR_VERSION;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,8 @@ public void testSupportFlags() throws Exception {
assertEquals(dbmd.supportsMultipleOpenResults(), false);
assertEquals(dbmd.supportsGetGeneratedKeys(), false);
assertEquals(dbmd.getResultSetHoldability(), 1);
assertEquals(dbmd.getJDBCMajorVersion(), 9);
assertEquals(dbmd.getJDBCMinorVersion(), 6);
assertEquals(dbmd.getJDBCMajorVersion(), 4); // Latest major version (since java 6).
assertEquals(dbmd.getJDBCMinorVersion(), 2); // Most supported minor version (since java 8).
assertEquals(dbmd.getSQLStateType(), 2);
assertEquals(dbmd.supportsStatementPooling(), false);
assertEquals(dbmd.getRowIdLifetime(), ROWID_UNSUPPORTED);
Expand Down
Loading