[feat] PTC Object ORM 支持自定义表前缀#673
Open
FxRayHughes wants to merge 1 commit intoTabooLib:dev/6.2.3from
Open
Conversation
- Template Method:新建 AbstractDataMapper 基类,DataMapperImpl / TransactionalDataMapper 仅覆写差异部分 - Strategy:提取 DatabaseDialect 接口(MySQL/SQLite/PostgreSQL),消除 Container 子类建表重复 - SRP:新建 EntityMapper,将 ResultSet 读取与实例创建从 AnalyzedClass 中分离 - Facade+Composite:ContainerOperatorImpl 拆分为 DataExecutor / LinkTableHandler / CollectionTableHandler - 分包:内部实现移至 orm / container / operator / mapper 子包,公开 API 保持不变 - 修复 database-ioc 对 DataMapperImpl / AnalyzedClass 的导入路径
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和database-ioc模块上完成以下工作:功能
PersistentContainer/ContainerSQL/ContainerPostgreSQL支持从配置读取table-prefix,所有表名自动附加前缀JoinQuery、TransactionContext的联查与事务操作同步使用表前缀重构(同 PR 一并提交)
AbstractDataMapper基类,消除DataMapperImpl与TransactionalDataMapper的重复实现DatabaseDialect接口(MySQL / SQLite / PostgreSQL),消除 Container 子类建表重复代码EntityMapper,将 ResultSet 读取与实例创建从AnalyzedClass中分离ContainerOperatorImpl拆分为DataExecutor/LinkTableHandler/CollectionTableHandlerorm/container/operator/mapper子包,公开 API 保持不变database-ioc中DataMapperImpl/AnalyzedClass的导入路径主要变更模块
module/database/database-ptc-objectmodule/database/database-iocCloses #672