From bbcdd5dbf8e83e037cf827e4f110b9b01788118d Mon Sep 17 00:00:00 2001 From: zyyang Date: Wed, 20 Jan 2021 15:59:51 +0800 Subject: [PATCH] change --- .../main/java/com/taosdata/jdbc/TSDBDatabaseMetaData.java | 2 ++ .../java/com/taosdata/jdbc/TSDBDatabaseMetaDataTest.java | 1 + tests/examples/JDBC/taosdemo/pom.xml | 6 +++--- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/connector/jdbc/src/main/java/com/taosdata/jdbc/TSDBDatabaseMetaData.java b/src/connector/jdbc/src/main/java/com/taosdata/jdbc/TSDBDatabaseMetaData.java index 02556f6a73..53f3714555 100644 --- a/src/connector/jdbc/src/main/java/com/taosdata/jdbc/TSDBDatabaseMetaData.java +++ b/src/connector/jdbc/src/main/java/com/taosdata/jdbc/TSDBDatabaseMetaData.java @@ -620,6 +620,7 @@ public class TSDBDatabaseMetaData implements java.sql.DatabaseMetaData { ResultSet tables = stmt.executeQuery("show tables"); while (tables.next()) { TSDBResultSetRowData rowData = new TSDBResultSetRowData(10); + rowData.setString(0, dbname); rowData.setString(2, tables.getString("table_name")); rowData.setString(3, "TABLE"); rowData.setString(4, ""); @@ -629,6 +630,7 @@ public class TSDBDatabaseMetaData implements java.sql.DatabaseMetaData { ResultSet stables = stmt.executeQuery("show stables"); while (stables.next()) { TSDBResultSetRowData rowData = new TSDBResultSetRowData(10); + rowData.setString(0, dbname); rowData.setString(2, stables.getString("name")); rowData.setString(3, "TABLE"); rowData.setString(4, "STABLE"); diff --git a/src/connector/jdbc/src/test/java/com/taosdata/jdbc/TSDBDatabaseMetaDataTest.java b/src/connector/jdbc/src/test/java/com/taosdata/jdbc/TSDBDatabaseMetaDataTest.java index 04e9ffab31..77223b40fa 100644 --- a/src/connector/jdbc/src/test/java/com/taosdata/jdbc/TSDBDatabaseMetaDataTest.java +++ b/src/connector/jdbc/src/test/java/com/taosdata/jdbc/TSDBDatabaseMetaDataTest.java @@ -642,6 +642,7 @@ public class TSDBDatabaseMetaDataTest { ResultSet tables = metaData.getTables("log", "", null, null); ResultSetMetaData metaData = tables.getMetaData(); while (tables.next()) { + System.out.print(metaData.getColumnLabel(1) + ":" + tables.getString(1) + "\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(5) + ":" + tables.getString(5) + "\n"); diff --git a/tests/examples/JDBC/taosdemo/pom.xml b/tests/examples/JDBC/taosdemo/pom.xml index 72adbd0fa3..15f868a117 100644 --- a/tests/examples/JDBC/taosdemo/pom.xml +++ b/tests/examples/JDBC/taosdemo/pom.xml @@ -67,9 +67,9 @@ com.taosdata.jdbc taos-jdbcdriver - 2.0.16 - - + 2.0.17 + + -- GitLab