Skip to content

Commit eac2b1c

Browse files
authored
Merge pull request #23 from alex268/develop
Added support of COLUMN_TABLE in DatabaseMetaData.getTables()
2 parents 271ec8c + 71b9e4b commit eac2b1c

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
## 2.0.1 ##
22

3+
* Added column types to getTables() method
34
* Added parameter `forceQueryMode` to use for specifying the type of query
45
* Execution of scan or scheme query inside active transaction will raise exception
56

jdbc/src/main/java/tech/ydb/jdbc/context/YdbContext.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public static YdbContext createContext(YdbConfig config) throws SQLException {
132132

133133
return new YdbContext(config, grpcTransport, tableClient.build(), autoResize);
134134
} catch (Exception ex) {
135-
throw new YdbConfigurationException("Cannot connect to YDB", ex);
135+
throw new YdbConfigurationException("Cannot connect to YDB: " + ex.getMessage(), ex);
136136
}
137137
}
138138

jdbc/src/main/java/tech/ydb/jdbc/impl/YdbDatabaseMetaDataImpl.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1323,6 +1323,7 @@ private List<String> tables(String databasePrefix, String path, Predicate<String
13231323
String tablePath = fullPath.substring(databasePrefix.length());
13241324
switch (entry.getType()) {
13251325
case TABLE:
1326+
case COLUMN_TABLE:
13261327
if (filter.test(tablePath)) {
13271328
tables.add(tablePath);
13281329
}

jdbc/src/test/java/tech/ydb/jdbc/YdbDriverStaticCredsTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ private void testConnection(ConnectionSupplier connectionSupplier) throws SQLExc
7373
}
7474

7575
private void wrongConnection(ConnectionSupplier connectionSupplier) {
76-
ExceptionAssert.ydbConfiguration("Cannot connect to YDB", () -> testConnection(connectionSupplier));
76+
ExceptionAssert.ydbConfiguration("Cannot connect to YDB: gRPC error: (INTERNAL) get token exception: "
77+
+ "Can't login, code: UNAUTHORIZED, issues: [#400020 Invalid password (S_FATAL)]",
78+
() -> testConnection(connectionSupplier));
7779
}
7880

7981
@Test

0 commit comments

Comments
 (0)