Skip to content

Release v43

Choose a tag to compare

@github-actions github-actions released this 09 May 16:15
· 2 commits to main since this release
Add DB transactions and graceful close

Introduce transactional support to Database: add contextmanager transaction(), a _tx_depth counter, and _commit() to defer commits until outermost transaction completes (with rollback on exception). Replace direct conn.commit() calls with _commit() across methods. Add safe close() and update __del__ to use it; handle minor variable rename (numberOfImages -> number_of_images) and import contextmanager. Use the new transaction() in main.addProduct to group product/category/image writes atomically, and add a GUI on_close handler to close the DB connection on app exit.