提交 f968071b 编写于 作者: X xieyinglin

add druid pool support for issue #642

上级 2add95e9
......@@ -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 {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册