actions
actions copied to clipboard
Fix DBError in execute_update_returning method
Address DBError in execute_update_returning method by managing transactions correctly.
-
Transaction Management in
execute_update_returning:- Add a transaction initiation using
BEGINbefore executing theUPDATEstatement. - Add a
COMMITstatement after executing the SQL statements. - Add a
ROLLBACKstatement to handle errors.
- Add a transaction initiation using
-
Transaction Management in
_create_run:- Add a check using
in_transaction()to ensure a transaction is active before callingexecute_update_returning. - Add a transaction initiation using
BEGINbefore callingexecute_update_returning. - Add a
COMMITstatement after callingexecute_update_returning. - Add a
ROLLBACKstatement to handle errors.
- Add a check using