[feat] PTC Object: @Ignore 注解、集合 CustomType、事务传播#666
Merged
Bkm016 merged 1 commit intoTabooLib:dev/6.2.3from Feb 14, 2026
Merged
[feat] PTC Object: @Ignore 注解、集合 CustomType、事务传播#666Bkm016 merged 1 commit intoTabooLib:dev/6.2.3from
Bkm016 merged 1 commit intoTabooLib:dev/6.2.3from
Conversation
- @ignore 注解:标记字段不参与数据库读写,读取时使用 Kotlin 默认值 - 集合 CustomType:支持 List/Set/Map 通过自定义序列化扁平化为单列存储 - 事务传播:嵌套 transaction() 自动复用外层事务连接,ThreadLocal 跟踪活跃事务
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.
变更内容
为 database-ptc-object 模块新增三项功能:
1. @ignore 注解
2. 集合 CustomType(扁平化集合存储)
elementType属性,标识集合级别的自定义类型registeredCollectionTypes双层 Map 和匹配方法3. 事务传播(Transaction Propagation)
ThreadLocal<Connection>跟踪当前线程活跃事务transaction()自动复用外层事务连接,不提交/不回滚/不关闭withConnection()/withTransaction()检查 ThreadLocal修改文件
Annotations.kt— 新增 @ignore 注解AnalyzedClass.kt/AnalyzedClassMember.kt— 忽略字段分析和默认值填充CustomType.kt/CustomTypeFactory.kt— 集合 CustomType 支持ContainerOperatorImpl.kt— CRUD 过滤 @ignore、扁平化集合序列化、ThreadLocal 连接检查ContainerSQL.kt/ContainerPostgreSQL.kt/ContainerSQLite.kt— 建表逻辑适配PersistentContainer.kt/TransactionContext.kt— 事务传播