change
This commit is contained in:
parent
be722bdf48
commit
7cbbc0733e
|
@ -197,12 +197,13 @@ public class TSDBConnection implements Connection {
|
|||
}
|
||||
|
||||
public SQLWarning getWarnings() throws SQLException {
|
||||
//todo: implement getWarnings according to the warning messages returned from TDengine
|
||||
throw new SQLException(TSDBConstants.UNSUPPORT_METHOD_EXCEPTIONZ_MSG);
|
||||
}
|
||||
|
||||
public void clearWarnings() throws SQLException {
|
||||
// left blank to support HikariCP connection
|
||||
//todo: implement getWarnings according to the warning messages returned from TDengine
|
||||
//todo: implement clearWarnings according to the warning messages returned from TDengine
|
||||
}
|
||||
|
||||
public Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException {
|
||||
|
|
|
@ -96,7 +96,7 @@ public class TSDBDatabaseMetaData implements java.sql.DatabaseMetaData {
|
|||
}
|
||||
|
||||
public int getDriverMajorVersion() {
|
||||
return 0;
|
||||
return 2;
|
||||
}
|
||||
|
||||
public int getDriverMinorVersion() {
|
||||
|
|
|
@ -8,6 +8,7 @@ import java.io.BufferedReader;
|
|||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.sql.*;
|
||||
import java.util.Enumeration;
|
||||
import java.util.Properties;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
@ -68,7 +69,6 @@ public class TSDBDriverTest {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testConnectWithJdbcURL() {
|
||||
final String url = "jdbc:TAOS://localhost:6030/log?user=root&password=taosdata";
|
||||
|
@ -114,6 +114,12 @@ public class TSDBDriverTest {
|
|||
assertNotNull("failure - connection should not be null", conn);
|
||||
}
|
||||
printRs();
|
||||
Properties clientInfo = conn.getClientInfo();
|
||||
Enumeration<?> propertyNames = clientInfo.propertyNames();
|
||||
while (propertyNames.hasMoreElements()) {
|
||||
String name = (String) propertyNames.nextElement();
|
||||
System.out.println(name + " : " + clientInfo.getProperty(name));
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
fail("failure - should not throw Exception");
|
||||
|
|
Loading…
Reference in New Issue