Mark an instance as 'dirty' without any specific attribute mentioned. This is a special operation that will allow the object to travel through the flush process for interception by events such as :meth:`.SessionEvents.before_flush`. Note that no SQL will be emitted in the flush pr
(instance: object)
| 2822 | |
| 2823 | |
| 2824 | def flag_dirty(instance: object) -> None: |
| 2825 | """Mark an instance as 'dirty' without any specific attribute mentioned. |
| 2826 | |
| 2827 | This is a special operation that will allow the object to travel through |
| 2828 | the flush process for interception by events such as |
| 2829 | :meth:`.SessionEvents.before_flush`. Note that no SQL will be emitted in |
| 2830 | the flush process for an object that has no changes, even if marked dirty |
| 2831 | via this method. However, a :meth:`.SessionEvents.before_flush` handler |
| 2832 | will be able to see the object in the :attr:`.Session.dirty` collection and |
| 2833 | may establish changes on it, which will then be included in the SQL |
| 2834 | emitted. |
| 2835 | |
| 2836 | .. versionadded:: 1.2 |
| 2837 | |
| 2838 | .. seealso:: |
| 2839 | |
| 2840 | :func:`.attributes.flag_modified` |
| 2841 | |
| 2842 | """ |
| 2843 | |
| 2844 | state, dict_ = instance_state(instance), instance_dict(instance) |
| 2845 | state._modified_event(dict_, None, NO_VALUE, is_userland=True) |
nothing calls this directly
no test coverage detected