-
Notifications
You must be signed in to change notification settings - Fork 8.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature : support batch update and delete with multiple sql #2112
feature : support batch update and delete with multiple sql #2112
Conversation
� Conflicts: � tm/src/test/java/io/seata/tm/TransactionManagerHolderTest.java � tm/src/test/java/io/seata/tm/api/DefaultFailureHandlerImplTest.java � tm/src/test/java/io/seata/tm/api/DefaultGlobalTransactionTest.java � tm/src/test/java/io/seata/tm/api/GlobalTransactionContextTest.java
Codecov Report
@@ Coverage Diff @@
## develop #2112 +/- ##
==========================================
Coverage 51.48% 51.48%
Complexity 2803 2803
==========================================
Files 553 553
Lines 17685 17685
Branches 2088 2088
==========================================
Hits 9105 9105
Misses 7727 7727
Partials 853 853 |
rm-datasource/src/main/java/io/seata/rm/datasource/exec/MulitExecutor.java
Outdated
Show resolved
Hide resolved
@zjinlei done |
please resolve conflict |
…mulit-sql # Conflicts: # rm-datasource/src/main/java/io/seata/rm/datasource/exec/ExecuteTemplate.java # rm-datasource/src/main/java/io/seata/rm/datasource/sql/SQLVisitorFactory.java # rm-datasource/src/test/java/io/seata/rm/datasource/sql/SQLVisitorFactoryTest.java
rm-datasource/src/main/java/io/seata/rm/datasource/exec/MultiUpdateExecutor.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
预期只支持单更新多语句或者单删除多语句,pr超出了预期,不过也增加了代码复杂度,后期维护成本增加。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Test passed.
update seata.`account_tbl` set money = money - ? where user_id = ?;update seata.`account_tbl` set money = money - ? where user_id = ?;
rm-datasource/src/main/java/io/seata/rm/datasource/exec/MultiDeleteExecutor.java
Show resolved
Hide resolved
rm-datasource/src/main/java/io/seata/rm/datasource/exec/MultiUpdateExecutor.java
Outdated
Show resolved
Hide resolved
rm-datasource/src/main/java/io/seata/rm/datasource/exec/MultiExecutor.java
Show resolved
Hide resolved
rm-datasource/src/main/java/io/seata/rm/datasource/exec/MultiExecutor.java
Outdated
Show resolved
Hide resolved
update test1 set id = ? where id = ?; update test1 set id = ? where id = ?; Exception: Parameter index out of range (1 > number of parameters, which is 0) |
rm-datasource/src/main/java/io/seata/rm/datasource/exec/MultiUpdateExecutor.java
Outdated
Show resolved
Hide resolved
rm-datasource/src/main/java/io/seata/rm/datasource/exec/MultiUpdateExecutor.java
Outdated
Show resolved
Hide resolved
…i-ying/seata into feature/support-mulit-sql
...ta-sqlparser-druid/src/main/java/io/seata/sqlparser/druid/DruidSQLRecognizerFactoryImpl.java
Outdated
Show resolved
Hide resolved
rm-datasource/src/main/java/io/seata/rm/datasource/exec/ExecuteTemplate.java
Outdated
Show resolved
Hide resolved
rm-datasource/src/main/java/io/seata/rm/datasource/exec/MultiUpdateExecutor.java
Show resolved
Hide resolved
rm-datasource/src/main/java/io/seata/rm/datasource/exec/MultiUpdateExecutor.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Ⅰ. Describe what this PR did
support batch update and delete with multiple sql , not support insert multiple sql
Ⅱ. Does this pull request fix one issue?
#1784
Ⅲ. Why don't you add test cases (unit test/integration test)?
had add some simple test cases;
Ⅳ. Describe how to verify it
use seata-simples verify it
Ⅴ. Special notes for reviews
in
MulitExecutor
, it handlerUpdateExecutor
andDeleteExecutor
images build,and merge them.