Commit a transaction and reset the dirty flag.
(self)
| 321 | |
| 322 | @async_unsafe |
| 323 | def commit(self): |
| 324 | """Commit a transaction and reset the dirty flag.""" |
| 325 | self.validate_thread_sharing() |
| 326 | self.validate_no_atomic_block() |
| 327 | self._commit() |
| 328 | # A successful commit means that the database connection works. |
| 329 | self.errors_occurred = False |
| 330 | self.run_commit_hooks_on_set_autocommit_on = True |
| 331 | |
| 332 | @async_unsafe |
| 333 | def rollback(self): |