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

Clean up session handling #52

Open
phirstgemini opened this issue Sep 4, 2024 · 0 comments
Open

Clean up session handling #52

phirstgemini opened this issue Sep 4, 2024 · 0 comments
Assignees
Milestone

Comments

@phirstgemini
Copy link
Collaborator

Need to get rid of that session_scope() function.
See https://docs.sqlalchemy.org/en/20/orm/session_basics.html#framing-out-a-begin-commit-rollback-block for how this should work. We basically want that last code block, using session.begin() as a context manager. Would be nice to have a way to emit a log message in the event that it does a rollback. Maybe also if it does a commit as it seems better to have these explicit in the code.

@phirstgemini phirstgemini self-assigned this Sep 4, 2024
@phirstgemini phirstgemini added this to the SQLAlchemy 2 milestone Sep 5, 2024
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

No branches or pull requests

1 participant