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)
| 2847 | |
| 2848 | |
| 2849 | def flag_dirty(instance: object) -> None: |
| 2850 | """Mark an instance as 'dirty' without any specific attribute mentioned. |
| 2851 | |
| 2852 | This is a special operation that will allow the object to travel through |
| 2853 | the flush process for interception by events such as |
| 2854 | :meth:`.SessionEvents.before_flush`. Note that no SQL will be emitted in |
| 2855 | the flush process for an object that has no changes, even if marked dirty |
| 2856 | via this method. However, a :meth:`.SessionEvents.before_flush` handler |
| 2857 | will be able to see the object in the :attr:`.Session.dirty` collection and |
| 2858 | may establish changes on it, which will then be included in the SQL |
| 2859 | emitted. |
| 2860 | |
| 2861 | .. seealso:: |
| 2862 | |
| 2863 | :func:`.attributes.flag_modified` |
| 2864 | |
| 2865 | """ |
| 2866 | |
| 2867 | state, dict_ = instance_state(instance), instance_dict(instance) |
| 2868 | state._modified_event(dict_, None, NO_VALUE, is_userland=True) |
nothing calls this directly
no test coverage detected