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

Updated JDBC version to 4.2 #1637

Merged
merged 4 commits into from
Feb 16, 2024
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 @@ -62,7 +62,7 @@ public class SnowflakeDatabaseMetaData implements DatabaseMetaData {

private static final char SEARCH_STRING_ESCAPE = '\\';

private static final String JDBCVersion = "1.0";
private static final String JDBCVersion = "4.2";
// Open Group CLI Functions
// LOG10 is not supported
public static final String NumericFunctionsSupported =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,6 @@ public void testDatabaseAndDriverInfo() throws SQLException {
try (Connection connection = getConnection()) {
DatabaseMetaData metaData = connection.getMetaData();

// JDBC x.x compatible
assertEquals(1, metaData.getJDBCMajorVersion());
assertEquals(0, metaData.getJDBCMinorVersion());

// identifiers
assertEquals("Snowflake", metaData.getDatabaseProductName());
assertEquals("Snowflake", metaData.getDriverName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1694,4 +1694,21 @@ public void testUpdateLocatorsCopyUnsupported() throws SQLException {
assertFalse(metaData.locatorsUpdateCopy());
}
}

/**
* For driver versions higher than 3.14.5 the driver reports support for JDBC 4.2. For driver
* version 3.14.5 and earlier, the driver reports support for JDBC 1.0.
*
* @throws SQLException
*/
@Test
public void testGetJDBCVersion() throws SQLException {
try (Connection connection = getConnection()) {
DatabaseMetaData metaData = connection.getMetaData();

// JDBC x.x compatible
assertEquals(4, metaData.getJDBCMajorVersion());
assertEquals(2, metaData.getJDBCMinorVersion());
}
}
}
Loading