You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2023/01/18 09:58:29 UTC
[GitHub] [shardingsphere] RaigorJiang commented on issue #10927: DriverJDBCExecutor.java Cannot throw an SQLException exception
RaigorJiang commented on issue #10927:
URL: https://github.com/apache/shardingsphere/issues/10927#issuecomment-1386782174
This issue has been inactive for too long, and ShardingSphere has released several new versions, so I will close it.
By the way, this method does not catch exception, so the original exception will be thrown.
```java
public int executeUpdate(final ExecutionGroupContext<JDBCExecutionUnit> executionGroupContext,
final QueryContext queryContext, final Collection<RouteUnit> routeUnits, final JDBCExecutorCallback<Integer> callback) throws SQLException {
try {
ExecuteProcessEngine.initializeExecution(queryContext, executionGroupContext, eventBusContext);
SQLStatementContext<?> sqlStatementContext = queryContext.getSqlStatementContext();
List<Integer> results = doExecute(executionGroupContext, sqlStatementContext, routeUnits, callback);
int result = isNeedAccumulate(metaDataContexts.getMetaData().getDatabase(databaseName).getRuleMetaData().getRules(), sqlStatementContext) ? accumulate(results) : results.get(0);
ExecuteProcessEngine.finishExecution(executionGroupContext.getExecutionID(), eventBusContext);
return result;
} finally {
ExecuteProcessEngine.cleanExecution();
}
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org