Repository navigation
feat(metadata): 提供列编解码及查询映射只读配置 - #142
Merged
Merged
Conversation
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## 4.2 #142 +/- ##
=============================================
+ Coverage 64.92% 81.15% +16.23%
- Complexity 2341 3740 +1399
=============================================
Files 343 384 +41
Lines 9375 11449 +2074
Branches 940 1410 +470
=============================================
+ Hits 6087 9292 +3205
+ Misses 2810 1515 -1295
- Partials 478 642 +164 ☔ 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.
映射描述和查询贡献者需要读取实际生效的配置。标准 codec 不能被实体注解或默认值替代;追加查询映射时也不能覆盖已有 FROM/JOIN 绑定,或重复使用已有引用名。
提供日期、数字、布尔、枚举及 JSON codec 的只读配置 API。数字函数构造器不声明可重建目标类型;JSON 区分显式外部 mapper 与标准选项派生副本,调用方可以拒绝无法重建的行为,不需要反射或复制解析器默认值。
查询通过
getTableReferences()返回 FROM、JOIN 目标/别名和显式绑定引用名的不可变快照,通过getTableBindings()读取不可变绑定。QueryTableBindings.merge(...)保留已有映射并拒绝同名不同映射的冲突,供贡献者安全追加结构,不需要向下转型或读取 SQL 文本。既有bindTables(...)显式替换、null 清除、context 以及编解码行为保持不变。验证:Java 21,
mvn -q -o -Djava.awt.headless=true -pl hsweb-easy-orm-rdb -am '-Dtest=*Codec*Test,DefaultValueCodecResolverTest,QueryTableBindingsTest,BuildParameterQueryOperatorTest,DefaultQuerySqlBuilderTest,JoinFragmentBuilderTest,QueryTermsFragmentBuilderStrictModeTest,QueryTermsFragmentBuilderCoverageTest,QueryTermsFragmentBuilderTest' -Dsurefire.failIfNoSpecifiedTests=false -DfailIfNoTests=false test,22 类 / 84 项全部通过,零失败、错误或跳过;本地mvn -q -o -Djava.awt.headless=true -DskipTests install成功。覆盖只读快照/冲突拒绝、clone 和默认配置、JOIN、查询构造器、严格条件及既有 codec。消费者:jetlinks-components #1707 将直接读取这些配置。API 不传输任意转换函数、Jackson 模块或共享 mapper 的完整状态。