Repository navigation
feat(条件构造): 增加已有条件显式分组能力 - #130
Merged
Merged
Conversation
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.2 #130 +/- ##
=============================================
+ Coverage 64.92% 79.63% +14.70%
- Complexity 2341 3468 +1127
=============================================
Files 343 376 +33
Lines 9375 11076 +1701
Branches 940 1342 +402
=============================================
+ Hits 6087 8820 +2733
+ Misses 2810 1607 -1203
- Partials 478 649 +171 ☔ View full report in Codecov by Harness. 🚀 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.
已有业务条件包含 OR 时,再通过 nest() 追加过滤条件无法保证整个业务范围与过滤范围求交,上层因此不得不识别具体 DSL 并改写内部条件列表。新增显式
Conditional.group()和NestConditional.group(),让构造器自行将已有条件整体分组,例如is("a", 1).or("b", 2).group().nest().is("c", 3).end()生成(a = 1 OR b = 2) AND (c = 3)。nest()/orNest()追加新分组的原有语义。NestConditional.group()只重组当前层已有子条件,复用根条件分组逻辑,支持多层嵌套;保留外层 AND/OR、承载字段和值,以及end()的父级返回对象。UnsupportedOperationException,避免静默跳过分组。公共接口和 README 已同步说明。验证使用 JDK 21:52 项测试通过,0 失败、0 错误、0 跳过。新增 11 项 core 契约测试、12 项使用正式同步/响应式构造器和 H2 执行器的 SQL 回归;其余 29 项覆盖既有查询、更新、删除及 CRUD 事件上下文。
消费者:components #1678。须先合并并发布包含此能力的 core/RDB
4.2.3-SNAPSHOT,再集成消费者;开发机本地安装不能替代干净 CI 的依赖供应。