Skip to content

Comments

[feat] PTC Object ORM 支持自定义表前缀#673

Open
FxRayHughes wants to merge 1 commit intoTabooLib:dev/6.2.3from
FxRayHughes:feat/ptc-table-prefix-672
Open

[feat] PTC Object ORM 支持自定义表前缀#673
FxRayHughes wants to merge 1 commit intoTabooLib:dev/6.2.3from
FxRayHughes:feat/ptc-table-prefix-672

Conversation

@FxRayHughes
Copy link
Contributor

改动说明

database-ptc-objectdatabase-ioc 模块上完成以下工作:

功能

  • PersistentContainer / ContainerSQL / ContainerPostgreSQL 支持从配置读取 table-prefix,所有表名自动附加前缀
  • JoinQueryTransactionContext 的联查与事务操作同步使用表前缀

重构(同 PR 一并提交)

  • Template Method:新建 AbstractDataMapper 基类,消除 DataMapperImplTransactionalDataMapper 的重复实现
  • Strategy:提取 DatabaseDialect 接口(MySQL / SQLite / PostgreSQL),消除 Container 子类建表重复代码
  • SRP:新建 EntityMapper,将 ResultSet 读取与实例创建从 AnalyzedClass 中分离
  • Facade + CompositeContainerOperatorImpl 拆分为 DataExecutor / LinkTableHandler / CollectionTableHandler
  • 分包:内部实现迁移至 orm / container / operator / mapper 子包,公开 API 保持不变
  • 修复 database-iocDataMapperImpl / AnalyzedClass 的导入路径

主要变更模块

  • module/database/database-ptc-object
  • module/database/database-ioc

Closes #672

- 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 的导入路径
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feat] PTC Object ORM 支持自定义表前缀

1 participant