feat: add support for sqlite3 and multiple databases #2
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "feature/sqlite3-and-multiple-db-support"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
added 1 commit
Compare with previous version
added 1 commit
Compare with previous version
added 1 commit
Compare with previous version
added 1 commit
Compare with previous version
added 1 commit
Compare with previous version
added 1 commit
Compare with previous version
added 1 commit
Compare with previous version
added 1 commit
Compare with previous version
First of all, thank you for your work!
Although I do agree that moving to
uv
makes sense, I would have liked to see 2 PRs for this. It doesn't matter now, it works!Codewise it looks fine, but I'll do some personal testing later today 👍
Again, thank you!
requested review from @rogs
mentioned in merge request !2
@rogs i created https://gitlab.com/rogs/cleanmedia/-/merge_requests/2, please merge it before, than i rebase this pr.
I was just reading the PR! Thank you for your work! 🔥
added 1 commit
Compare with previous version
added 1 commit
Compare with previous version
Sorry I merged !2 without checking the dockerfile and things broke. If you are moving the project to
uv
, you'll need to also fix the dockerfileadded 14 commits
rogs:master
d318296e
- feat: support sqlite3 and multiple databases9751bf28
- feat: calculate saved space19476c59
- feat: update tests5b248cd4
- style: lint codefdf878d2
- fix: ignore some type checks in test file78fb13fb
- fix: change sql format016d7db6
- docs: update doc strings3efc1a9d
- style: sort importsCompare with previous version
@rogs Is anything still open?
Oh, I was waiting for your rebase! I'll check this out now 👍
How did you test this locally?
See here https://gitlab.com/rogs/cleanmedia/-/merge_requests/3#note_2422397019
This should be "Invalid DB connection string"
A quick overhead review for now, will dig deeply soon
requested changes
I thought those tests were using the code from
master
, since the goal was to only test theuv
change (that was the purpose of that MR). If you tested that other MR with this code, then the previous test you did for that MR doesn’t really count.It worked, but we should be more careful going forward.
In the
_execute
method, consider this modification to ensure cursor cleanup:This would allow callers to use with statements again:
I'm concerned about the removal of the context managers (
with
statements) for database cursors. The new_execute
method creates cursors but doesn't ensure they're properly closed after use except in error cases.This could lead to resource leaks, especially since callers of this method don't appear to close the cursors either. For example, in
get_single_media()
and similar methods, there's no cursor closing after fetching results.Could we modify the implementation to either:
with
statements for operations that need a cursorrequested changes
Checkout
From your project repository, check out a new branch and test the changes.