Mark processed objects as clean / deleted after a successful flush(). This method is called within the flush() method after the execute() method has succeeded and the transaction has been committed.
(self)
| 467 | rec.execute(self) |
| 468 | |
| 469 | def finalize_flush_changes(self) -> None: |
| 470 | """Mark processed objects as clean / deleted after a successful |
| 471 | flush(). |
| 472 | |
| 473 | This method is called within the flush() method after the |
| 474 | execute() method has succeeded and the transaction has been committed. |
| 475 | |
| 476 | """ |
| 477 | if not self.states: |
| 478 | return |
| 479 | |
| 480 | states = set(self.states) |
| 481 | isdel = { |
| 482 | s for (s, (isdelete, listonly)) in self.states.items() if isdelete |
| 483 | } |
| 484 | other = states.difference(isdel) |
| 485 | if isdel: |
| 486 | self.session._remove_newly_deleted(isdel) |
| 487 | if other: |
| 488 | self.session._register_persistent(other) |
| 489 | |
| 490 | |
| 491 | class _IterateMappersMixin: |
no test coverage detected