|
17 | 17 | import org.junit.jupiter.api.BeforeEach;
|
18 | 18 | import org.junit.jupiter.api.Test;
|
19 | 19 | import org.junit.jupiter.api.extension.RegisterExtension;
|
| 20 | +import org.slf4j.Logger; |
| 21 | +import org.slf4j.LoggerFactory; |
20 | 22 |
|
21 | 23 | import tech.ydb.jdbc.YdbConst;
|
22 | 24 | import tech.ydb.jdbc.YdbDatabaseMetaData;
|
|
31 | 33 | import tech.ydb.test.junit5.YdbHelperExtension;
|
32 | 34 |
|
33 | 35 | public class YdbDatabaseMetaDataImplTest {
|
| 36 | + private static final Logger logger = LoggerFactory.getLogger(YdbDatabaseMetaDataImplTest.class); |
| 37 | + |
34 | 38 | @RegisterExtension
|
35 | 39 | private static final YdbHelperExtension ydb = new YdbHelperExtension();
|
36 | 40 |
|
@@ -612,6 +616,19 @@ public void getColumns() throws SQLException {
|
612 | 616 | rs.assertNoRows();
|
613 | 617 | }
|
614 | 618 |
|
| 619 | + @Test |
| 620 | + public void getAllColumnsTest() throws SQLException { |
| 621 | + // Get all columns from all tables, include system tables. Test checks if jdbc driver reads it all successfully |
| 622 | + ResultSet rs = metaData.getColumns(null, null, null, null); |
| 623 | + Assertions.assertTrue(rs.next()); |
| 624 | + do { |
| 625 | + logger.info("read column {} [{}] -> {}[{}]", |
| 626 | + rs.getString("TABLE_NAME"), rs.getString("COLUMN_NAME"), |
| 627 | + rs.getString("TYPE_NAME"), rs.getInt("DATA_TYPE")); |
| 628 | + } while (rs.next()); |
| 629 | + rs.close(); |
| 630 | + } |
| 631 | + |
615 | 632 | @Test
|
616 | 633 | public void getPrimaryKeys() throws SQLException {
|
617 | 634 | TableAssert primaryKeys = new TableAssert();
|
|
0 commit comments