fix(oceanbase): sync Oracle session query timeout
This commit is contained in:
1 parent
eb3d5e4071
commit
3e628d2c7b
3 files changed
+100
-3
No files matched your search
@@ -104,8 +104,10 @@ public abstract class AbstractJdbcAgent extends BaseDatabaseAgent {
|
||||
|
||||
@Override
|
||||
public QueryResult executeQuery(String sql, String schema, ExecuteQueryOptions options) {
|
||||
Connection conn = requireConnected();
|
||||
uncheckedVoid(() -> beforeQueryExecution(conn, options.getTimeoutSecs()));
|
||||
return JdbcExecutor.INSTANCE.execute(
|
||||
requireConnected(),
|
||||
conn,
|
||||
sql,
|
||||
schema,
|
||||
this::setSchemaSQL,
|
||||
@@ -118,8 +120,10 @@ public abstract class AbstractJdbcAgent extends BaseDatabaseAgent {
|
||||
|
||||
@Override
|
||||
public QueryPageResult executeQueryPage(String sql, String schema, QueryPageOptions options) {
|
||||
Connection conn = requireConnected();
|
||||
uncheckedVoid(() -> beforeQueryExecution(conn, options.getTimeoutSecs()));
|
||||
return JdbcExecutor.INSTANCE.executePage(
|
||||
requireConnected(),
|
||||
conn,
|
||||
sql,
|
||||
schema,
|
||||
this::setSchemaSQL,
|
||||
@@ -140,8 +144,10 @@ public abstract class AbstractJdbcAgent extends BaseDatabaseAgent {
|
||||
|
||||
@Override
|
||||
public QueryPageResult startTableRead(String sql, String schema, QueryPageOptions options) {
|
||||
Connection conn = requireConnected();
|
||||
uncheckedVoid(() -> beforeQueryExecution(conn, options.getTimeoutSecs()));
|
||||
return JdbcExecutor.INSTANCE.startTableRead(
|
||||
requireConnected(),
|
||||
conn,
|
||||
sql,
|
||||
schema,
|
||||
this::setSchemaSQL,
|
||||
@@ -186,6 +192,9 @@ public abstract class AbstractJdbcAgent extends BaseDatabaseAgent {
|
||||
protected void afterConnect(ConnectParams params, Connection connection) throws Exception {
|
||||
}
|
||||
|
||||
protected void beforeQueryExecution(Connection connection, int timeoutSecs) throws Exception {
|
||||
}
|
||||
|
||||
protected String getConfiguredDatabase() {
|
||||
return configuredDatabase;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user