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

🔧 MAINTAIN: Make DjangoQueryBuilder a subclass of SqlaQueryBuilder #5092

Merged
merged 3 commits into from
Aug 23, 2021

Conversation

chrisjsewell
Copy link
Member

@chrisjsewell chrisjsewell commented Aug 21, 2021

Rather than duplicating all the code across the backends,
since DjangoQueryBuilder is just SqlaQueryBuilder+aldjemy,
subclass and only override the differences.

Also get_filter_expr was missing from the base BackendQueryBuilder

Rather than duplicating all the code across the backends,
since Django uses sqlalchemy+aldjemy,
subclass and only override the differences.
@chrisjsewell chrisjsewell requested a review from sphuber August 21, 2021 15:58
@codecov
Copy link

codecov bot commented Aug 21, 2021

Codecov Report

Merging #5092 (69c17a1) into develop (a2067eb) will increase coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #5092      +/-   ##
===========================================
+ Coverage    80.52%   80.55%   +0.03%     
===========================================
  Files          531      531              
  Lines        37095    36970     -125     
===========================================
- Hits         29868    29776      -92     
+ Misses        7227     7194      -33     
Flag Coverage Δ
django 75.24% <100.00%> (+0.22%) ⬆️
sqlalchemy 74.23% <25.00%> (+0.27%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
aiida/orm/implementation/django/querybuilder.py 100.00% <100.00%> (+21.25%) ⬆️
aiida/orm/implementation/querybuilder.py 79.56% <100.00%> (+0.23%) ⬆️
...iida/orm/implementation/sqlalchemy/querybuilder.py 82.23% <100.00%> (+0.20%) ⬆️
aiida/transports/plugins/local.py 81.41% <0.00%> (-0.25%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a2067eb...69c17a1. Read the comment docs.

Copy link
Contributor

@sphuber sphuber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to go, thanks @chrisjsewell

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