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

Refactored ORM to use peewee instead of SQLAlchemy #8

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jjohnson338
Copy link
Collaborator

This is my swing at #2

I've refactored SQLAlchemy out and am using an ORM called peewee. I've added pre and post hooks for web requests to both open and close the db. I'm not able to replicate (or am not sure how to replicate) the issue mentioned in #2 . @cmeury If you get a chance, could you test this PR out and see if it solves the issue for you? Or point me in a direction to reproduce the issue on my local.

@cmeury
Copy link
Owner

cmeury commented Nov 21, 2021

Hey @jjohnson338 -- awesome! I can test it, but currently there are conflicts.

@jjohnson338
Copy link
Collaborator Author

If the refactor works for you, I don't mind correcting the merge conflicts, but don't want to spend the effort if it might get dropped. But do let me know if this solves your issue.

@cmeury
Copy link
Owner

cmeury commented Nov 21, 2021

@jjohnson338 Dude, I had a moment, lol. Of course I can test it in the branch, no need to fix the conflict before-hand. Will let you know :)

@cmeury cmeury self-assigned this Nov 21, 2021
@cmeury
Copy link
Owner

cmeury commented Nov 21, 2021

My Synology server got an automatic update and messed up my configuration; doesn't look like I'll be able to test this in the near future. :/ Let's keep it around until I get around to fix things.

@jjohnson338
Copy link
Collaborator Author

Sure thing. If it works out, should be a trivial merge. peewee and SQLAlchemy have mostly identical query syntax and nearly identical model definitions. If I continue updates to queries and such, I'll stick with main branch using SQLAlchemy for now

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