fix(upsert): 修复 SQLServer 和 Oracle 空主键批量保存#108
Merged
Conversation
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## 4.2 #108 +/- ##
============================================
+ Coverage 64.92% 66.21% +1.28%
- Complexity 2341 2476 +135
============================================
Files 343 358 +15
Lines 9375 10206 +831
Branches 940 1168 +228
============================================
+ Hits 6087 6758 +671
- Misses 2810 2867 +57
- Partials 478 581 +103 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
|
Reopen to trigger pull_request workflow for the latest test changes. |
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.
目的
修复 SQLServer 和 Oracle 批量 upsert 在主键列缺失、主键值为空或 doNothingOnConflict 场景下的异常/非法 SQL 问题。
核心变更
when matched then update set的非法 SQL。equalsNameOrAlias,兼容ID/id等大小写和 alias 差异。测试
已执行:
结果:
覆盖用例:
集成测试
不适用:本次为 SQL 构造器和 SaveOrUpdateOperator 分支逻辑修复,已通过单元测试验证生成 SQL 类型和分支行为;未引入新的外部服务装配或协议联调链路。
覆盖率
本次命令触发 Jacoco report 生成;由于本地 target 中存在历史执行数据,Jacoco 输出了 class execution data mismatch 警告。已以新增回归单元测试和 surefire 通过结果作为本次变更验证依据。
文档同步
不涉及用户文档或 API 文档变更。
风险说明