fix(rdb): 修复 upsert 批量值场景 ignoreUpdate 与列去重异常#107
Merged
Conversation
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## 4.2 #107 +/- ##
============================================
+ Coverage 64.92% 65.69% +0.76%
- Complexity 2341 2394 +53
============================================
Files 343 357 +14
Lines 9375 9987 +612
Branches 940 1125 +185
============================================
+ Hits 6087 6561 +474
- Misses 2810 2861 +51
- Partials 478 565 +87 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
目的
values(List<Map<String,Object>>)场景下ignoreUpdate提前声明不生效的问题ignoreUpdate与批量补列组合时可能出现的列重复问题核心变动
DefaultUpsertOperatorignoreUpdate指定列ignoreUpdate(...)再values(List<Map<String,Object>>)UpsertColumnupdateIgnore对equals/hashCode的影响,避免LinkedHashSet去重异常BatchInsertSqlBuilder测试结果
export JAVA_HOME=$(/usr/libexec/java_home -v 17) && export PATH="$JAVA_HOME/bin:$PATH" && mvn -pl hsweb-easy-orm-rdb -Dtest=DefaultUpsertOperatorTest,DefaultSaveOrUpdateOperatorTest,DefaultDatabaseOperatorTest,BuildParameterInsertOperatorTest test文档同步情况
风险与说明
hsweb-easy-orm-rdb中 upsert 批量 map 值路径与批量插入去重逻辑ignoreUpdate先声明后批量赋值