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: orm: allow pre-define and pin table_name when defining ORM #57

Merged
merged 4 commits into from
Dec 17, 2024

Conversation

pga2rn
Copy link
Owner

@pga2rn pga2rn commented Dec 17, 2024

This PR introduces to expose the _orm_table_name attr as an API for the ORM.
User can use this attr to pre-define and pin table_name in advance.
The previous init param table_name is still in-use, and will override the pre-defined _orm_table_name if specified.

@pga2rn pga2rn added the feature label Dec 17, 2024
Copy link

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/simple_sqlite3_orm
   __init__.py70100% 
   _sqlite_spec.py360100% 
   _table_spec.py1873581%49, 58, 69, 73–74, 86, 98, 115, 174, 179–181, 221, 302, 304, 306–307, 355, 358, 362–364, 366–370, 372, 378, 421–422, 532–533, 547–548
   _types.py22195%31
   _utils.py681085%40, 42–43, 46–47, 69, 82, 85, 95, 108
   utils.py1203670%127, 134–135, 170–173, 219, 232, 252–256, 282, 286, 327, 332–339, 351–353, 355–356, 359, 361–363, 372–373
src/simple_sqlite3_orm/_orm
   __init__.py40100% 
   _async.py981188%34, 74, 76–77, 90–91, 93, 127, 129, 151, 155
   _base.py122893%103, 115, 170, 272, 312, 394, 434, 457
   _multi_thread.py1111190%32, 34–35, 70, 72–73, 86–87, 89, 122, 141
TOTAL77511285% 

Tests Skipped Failures Errors Time
72 0 💤 0 ❌ 0 🔥 2m 4s ⏱️

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
77.8% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@pga2rn pga2rn merged commit 736b526 into main Dec 17, 2024
14 of 15 checks passed
@pga2rn pga2rn deleted the feat/orm_init_api branch December 17, 2024 02:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant