Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: export singleton orm client #82

Merged
merged 2 commits into from
Jan 28, 2023
Merged

Conversation

elrrrrrrr
Copy link
Contributor

@elrrrrrrr elrrrrrrr commented Jan 22, 2023

Checklist
  • npm test passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)
  • @eggjs/tegg-orm-plugin新增 Orm 类,用于获取当前 leroic realm 实例

  • this.orm.client

  • this.orm.getClient(name)

  • 试用场景 - ref

  • Model 添加 dataSource 参数,适配多数据源

Description of change
  • 新增单例类 Orm
  • 修改 orm ormLoadUnitHook,注册对应 this.orm 实例信息

@elrrrrrrr elrrrrrrr changed the title feat: add singleton orm WIP: feat: add singleton orm Jan 22, 2023
@elrrrrrrr
Copy link
Contributor Author

CI 依赖 !83

@codecov
Copy link

codecov bot commented Jan 27, 2023

Codecov Report

Base: 92.54% // Head: 92.73% // Increases project coverage by +0.18% 🎉

Coverage data is based on head (6f2a241) compared to base (b32d9b8).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #82      +/-   ##
==========================================
+ Coverage   92.54%   92.73%   +0.18%     
==========================================
  Files         212      214       +2     
  Lines        4455     4488      +33     
  Branches      454      458       +4     
==========================================
+ Hits         4123     4162      +39     
+ Misses        332      326       -6     
Impacted Files Coverage Δ
core/orm-decorator/src/decorator/Model.ts 100.00% <100.00%> (ø)
plugin/orm/app.ts 96.96% <100.00%> (+3.63%) ⬆️
plugin/orm/lib/LeoricRegister.ts 100.00% <100.00%> (+4.65%) ⬆️
plugin/orm/lib/ORMLoadUnitHook.ts 100.00% <100.00%> (ø)
plugin/orm/lib/SingletonORM.ts 100.00% <100.00%> (ø)
plugin/orm/lib/DataSourceManager.ts 76.92% <0.00%> (+23.07%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@elrrrrrrr elrrrrrrr force-pushed the export-orm-client branch 3 times, most recently from aed968e to 4bfd889 Compare January 27, 2023 07:31
@elrrrrrrr elrrrrrrr changed the title WIP: feat: add singleton orm feat: export singleton orm client Jan 27, 2023
@killagu killagu merged commit 5320af7 into eggjs:master Jan 28, 2023
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.

2 participants