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

Chore: Hand craft SQL queries #6489

Merged
merged 1 commit into from Apr 30, 2024
Merged

Chore: Hand craft SQL queries #6489

merged 1 commit into from Apr 30, 2024

Conversation

stumpylog
Copy link
Member

Proposed change

Basically the updates fall into one of three categories:

  1. Selecting related to remove a second query to the DB
  2. Pre-fetching related
  3. Restricting the fields grabbed to those relevant to the code

Type of change

  • Bug fix: non-breaking change which fixes an issue.
  • New feature / Enhancement: non-breaking change which adds functionality. Please read the important note above.
  • Breaking change: fix or feature that would cause existing functionality to not work as expected.
  • Documentation only.
  • Other. Please explain: Cleanup

Checklist:

  • I have read & agree with the contributing guidelines.
  • If applicable, I have included testing coverage for new code in this PR, for backend and / or front-end changes.
  • If applicable, I have tested my code for new features & regressions on both mobile & desktop devices, using the latest version of major browsers.
  • If applicable, I have checked that all tests pass, see documentation.
  • I have run all pre-commit hooks, see documentation.
  • I have made corresponding changes to the documentation as needed.
  • I have checked my modifications for any breaking changes.

@stumpylog stumpylog requested a review from a team as a code owner April 25, 2024 00:43
@paperless-ngx-secretary paperless-ngx-secretary bot added backend non-trivial Requires approval by several team members labels Apr 25, 2024
@github-actions github-actions bot added the enhancement New feature label Apr 25, 2024
Copy link
Member

@shamoon shamoon left a comment

Choose a reason for hiding this comment

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

Wow, thanks for doing all this stumpy.

Besides the test suite of course, I did spin up an install with the image and just kinda tried all I could think of, no issues of course.

A little nervous about the merge conflicts 😅 but lgtm

@shamoon shamoon added this to the Next Release milestone Apr 25, 2024
@stumpylog
Copy link
Member Author

I can wait until your big ones have gone in and resolve the conflicts

@shamoon
Copy link
Member

shamoon commented Apr 25, 2024

I can wait until your big ones have gone in and resolve the conflicts

Oh I wasn’t being too serious about this, I can handle it :) and could similar changes to those PRs to match, but whatever you prefer.

I can see how to replicate for eg #6484 but I played with #6449 and I didn’t see an obvious way to reduce the queries.

Again, up to you if you want to add changes into this after they go in or other way around. Thanks again!

Copy link

codecov bot commented Apr 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.11%. Comparing base (63e1f9f) to head (bd4c124).

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #6489   +/-   ##
=======================================
  Coverage   97.10%   97.11%           
=======================================
  Files         430      430           
  Lines       17439    17440    +1     
  Branches     1364     1392   +28     
=======================================
+ Hits        16935    16936    +1     
- Misses        501      504    +3     
+ Partials        3        0    -3     
Flag Coverage Δ
backend 95.85% <100.00%> (+<0.01%) ⬆️
frontend 98.55% <ø> (ø)

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@stumpylog stumpylog removed the enhancement New feature label Apr 26, 2024
@stumpylog stumpylog merged commit 7be7185 into dev Apr 30, 2024
30 checks passed
@stumpylog stumpylog deleted the feature-sql-queries branch April 30, 2024 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend non-trivial Requires approval by several team members
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants