MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / was_deleted

Function was_deleted

lib/sqlalchemy/orm/util.py:2092–2106  ·  view source on GitHub ↗

Return True if the given object was deleted within a session flush. This is regardless of whether or not the object is persistent or detached. .. seealso:: :attr:`.InstanceState.was_deleted`

(object_: object)

Source from the content-addressed store, hash-verified

2090
2091
2092def was_deleted(object_: object) -> bool:
2093 """Return True if the given object was deleted
2094 within a session flush.
2095
2096 This is regardless of whether or not the object is
2097 persistent or detached.
2098
2099 .. seealso::
2100
2101 :attr:`.InstanceState.was_deleted`
2102
2103 """
2104
2105 state = attributes.instance_state(object_)
2106 return state.was_deleted
2107
2108
2109def _entity_corresponds_to(

Callers 2

Calls

no outgoing calls

Tested by 2