mfreeborn / fastapi-sqlalchemy

Adds simple SQLAlchemy support to FastAPI
MIT License
594 stars 34 forks source link

add option to automatically commit on exit #19

Closed nickgieschen closed 3 years ago

nickgieschen commented 3 years ago

Don't know if you're interested, but lots of DB libs I've used have had this option, such that after each request the session is can be automatically committed.

codecov-commenter commented 3 years ago

Codecov Report

Merging #19 into master will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #19   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            2         2           
  Lines           60        64    +4     
=========================================
+ Hits            60        64    +4     
Impacted Files Coverage Δ
fastapi_sqlalchemy/middleware.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 8ddf0ed...42e0498. Read the comment docs.

mfreeborn commented 3 years ago

Thanks Nick, sounds like a great idea. What I'd probably like to see before I merge it would be a unit test to cover the extra code.

mfreeborn commented 3 years ago

Merged, and I've snuck it out as a new release: v0.1.6

Thanks for your time.