You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I suggest telling about the auto_commit parameter in the documentation for save_to_database and save_book_to_database methods. In my need, when uploading a big table, if any row goes wrong (e.g.: foreign key constraint fails) I'd like to roll back the whole process. With auto_commit=False (default, omitted) I cannot, but when passing it as True and then committing the db.session, if any row goes wrong, an exception can be raised and then I perform the rollback, like below:
The text was updated successfully, but these errors were encountered:
crbertoldo
changed the title
auto_commit in save_to_database and save_book_to_database to allow rollback
auto_commit=False in save_to_database and save_book_to_database to allow rollback
Jan 14, 2020
Hello,
I suggest telling about the auto_commit parameter in the documentation for save_to_database and save_book_to_database methods. In my need, when uploading a big table, if any row goes wrong (e.g.: foreign key constraint fails) I'd like to roll back the whole process. With auto_commit=False (default, omitted) I cannot, but when passing it as True and then committing the db.session, if any row goes wrong, an exception can be raised and then I perform the rollback, like below:
The text was updated successfully, but these errors were encountered: