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

Update example for latest version of SQLAlchemy #2011

Merged
merged 1 commit into from
Dec 11, 2024

Conversation

chrisinmtown
Copy link
Contributor

Pass argument that disables SQLite thread check when creating the engine
Revise request-processing functions to work within a database session context
Drop TODO from the example README

@chrisinmtown
Copy link
Contributor Author

@FelixSchwarz please review and comment!

@chrisinmtown chrisinmtown force-pushed the update-sqlalchemy-example branch from 8430e1a to 2afd62b Compare December 5, 2024 22:05
@coveralls
Copy link

coveralls commented Dec 5, 2024

Coverage Status

coverage: 94.419%. remained the same
when pulling c3fd66f on chrisinmtown:update-sqlalchemy-example
into 6e7dd39 on spec-first:main.

Copy link
Member

@Ruwann Ruwann left a comment

Choose a reason for hiding this comment

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

DId a quick check and seems to work fine for me. Tbh, no too familiar with SQLAlchemy but judging from the link and documentation this seems to be the correct way to achieve this. Anything specific you'd like to get a 2nd pair of eyes on to double check?

Copy link
Contributor

@FelixSchwarz FelixSchwarz left a comment

Choose a reason for hiding this comment

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

Looks good to me as well. The delete should be fixed, the rest is mostly personal preference.

examples/sqlalchemy/app.py Outdated Show resolved Hide resolved
examples/sqlalchemy/orm.py Show resolved Hide resolved
examples/sqlalchemy/app.py Outdated Show resolved Hide resolved
Pass argument that disables SQLite thread check when creating the engine
Revise request-processing functions to use a database session context
Drop TODO from the example README
@chrisinmtown chrisinmtown force-pushed the update-sqlalchemy-example branch from 2afd62b to c3fd66f Compare December 9, 2024 20:51
@chrisinmtown
Copy link
Contributor Author

Thanks @Ruwann and @FelixSchwarz for the comments. New version pushed.

Copy link
Member

@Ruwann Ruwann left a comment

Choose a reason for hiding this comment

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

@Ruwann Ruwann merged commit 1844a2f into spec-first:main Dec 11, 2024
8 checks passed
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.

4 participants