You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2025/06/29 09:51:05 UTC

(shardingsphere) branch master updated: Refactor DriverExecuteUpdateExecutor (#35838)

This is an automated email from the ASF dual-hosted git repository.

zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new 11aaf64995e Refactor DriverExecuteUpdateExecutor (#35838)
11aaf64995e is described below

commit 11aaf64995eaa97894a2c567d42eeef98f500bc2
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Sun Jun 29 17:50:59 2025 +0800

    Refactor DriverExecuteUpdateExecutor (#35838)
---
 .../driver/executor/engine/DriverExecuteUpdateExecutor.java        | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/jdbc/src/main/java/org/apache/shardingsphere/driver/executor/engine/DriverExecuteUpdateExecutor.java b/jdbc/src/main/java/org/apache/shardingsphere/driver/executor/engine/DriverExecuteUpdateExecutor.java
index d39bcb093d4..403117b5762 100644
--- a/jdbc/src/main/java/org/apache/shardingsphere/driver/executor/engine/DriverExecuteUpdateExecutor.java
+++ b/jdbc/src/main/java/org/apache/shardingsphere/driver/executor/engine/DriverExecuteUpdateExecutor.java
@@ -72,6 +72,13 @@ public final class DriverExecuteUpdateExecutor {
     public int executeUpdate(final ShardingSphereDatabase database, final QueryContext queryContext, final DriverExecutionPrepareEngine<JDBCExecutionUnit, Connection> prepareEngine,
                              final StatementExecuteUpdateCallback updateCallback, final StatementAddCallback addCallback, final StatementReplayCallback replayCallback) throws SQLException {
         ExecutionContext executionContext = new KernelProcessor().generateExecutionContext(queryContext, metaData.getGlobalRuleMetaData(), metaData.getProps());
+        return executeUpdatePushDown(database, prepareEngine, updateCallback, addCallback, replayCallback, executionContext);
+    }
+    
+    @SuppressWarnings("rawtypes")
+    private int executeUpdatePushDown(final ShardingSphereDatabase database, final DriverExecutionPrepareEngine<JDBCExecutionUnit, Connection> prepareEngine,
+                                      final StatementExecuteUpdateCallback updateCallback, final StatementAddCallback addCallback, final StatementReplayCallback replayCallback,
+                                      final ExecutionContext executionContext) throws SQLException {
         return database.getRuleMetaData().getAttributes(RawExecutionRuleAttribute.class).isEmpty()
                 ? jdbcPushDownExecutor.executeUpdate(database, executionContext, prepareEngine, updateCallback, addCallback, replayCallback)
                 : rawPushDownExecutor.executeUpdate(database, executionContext);