This commit is contained in:
zyyang 2021-01-17 18:58:10 +08:00
parent 7381d4cf08
commit 84ddd80e9d
1 changed files with 7 additions and 4 deletions

View File

@ -640,11 +640,14 @@ public class TSDBDatabaseMetaDataTest {
@Test @Test
public void getTables() throws SQLException { public void getTables() throws SQLException {
ResultSet tables = metaData.getTables("", "", null, null); ResultSet tables = metaData.getTables("", "", null, null);
ResultSetMetaData metaData = tables.getMetaData(); // ResultSetMetaData metaData = tables.getMetaData();
while (tables.next()) { while (tables.next()) {
System.out.print(metaData.getColumnLabel(3) + ":" + tables.getString(3) + "\t"); // System.out.print(metaData.getColumnLabel(3) + ":" + tables.getString(3) + "\t");
System.out.print(metaData.getColumnLabel(4) + ":" + tables.getString(4) + "\t"); // System.out.print(metaData.getColumnLabel(4) + ":" + tables.getString(4) + "\t");
System.out.print(metaData.getColumnLabel(5) + ":" + tables.getString(5) + "\t"); // System.out.print(metaData.getColumnLabel(5) + ":" + tables.getString(5) + "\t");
System.out.println("name:" + tables.getString(3));
System.out.println("type:" + tables.getString(4));
System.out.println("remark:" + tables.getString(5));
} }
System.out.println(); System.out.println();
Assert.assertNull(tables); Assert.assertNull(tables);