stratila / users_db

users_db is a database module that provides CRUD operations on models defined in it by wrapping SQLAlchemy queries
0 stars 0 forks source link

Develop transaction decorator class ✡️ #5

Closed stratila closed 1 year ago

stratila commented 1 year ago

Concerns: db_execute requires the Connection obj as an argument, and it seems to me that it looks too complicated when we pass a statement object and a connection object in database functions (like db_execute(select_stmt, db_conn=db_conn), and there is the way to solve this in more pythonic style: get the connection object from the decorated function