diff --git a/src/connector/jdbc/src/main/java/com/taosdata/jdbc/TSDBConnection.java b/src/connector/jdbc/src/main/java/com/taosdata/jdbc/TSDBConnection.java index de86162b1c5af270479db7b88d457c5d267a4000..4640f6b446b6d285806408856489c5e950b37a81 100644 --- a/src/connector/jdbc/src/main/java/com/taosdata/jdbc/TSDBConnection.java +++ b/src/connector/jdbc/src/main/java/com/taosdata/jdbc/TSDBConnection.java @@ -170,8 +170,13 @@ public class TSDBConnection implements Connection { public void setTransactionIsolation(int level) throws SQLException { } + /** + * The transaction isolation level option is not supported by TDengine. + * @return + * @throws SQLException + */ public int getTransactionIsolation() throws SQLException { - throw new SQLException(TSDBConstants.UNSUPPORT_METHOD_EXCEPTIONZ_MSG); + return Connection.TRANSACTION_NONE; } public SQLWarning getWarnings() throws SQLException { @@ -214,11 +219,17 @@ public class TSDBConnection implements Connection { } public void setHoldability(int holdability) throws SQLException { - throw new SQLException(TSDBConstants.UNSUPPORT_METHOD_EXCEPTIONZ_MSG); + // intentionally left empty to support druid connection pool. } + /** + * the transaction is not supported by TDengine, so the opened ResultSet Objects will remain open + * @return + * @throws SQLException + */ public int getHoldability() throws SQLException { - throw new SQLException(TSDBConstants.UNSUPPORT_METHOD_EXCEPTIONZ_MSG); + //intentionally left empty to support HikariCP connection. + return ResultSet.HOLD_CURSORS_OVER_COMMIT; } public Savepoint setSavepoint() throws SQLException {