Event for after the legacy :meth:`_orm.Query.update` method has been called. .. legacy:: The :meth:`_orm.SessionEvents.after_bulk_update` method is a legacy event hook as of SQLAlchemy 2.0. The event **does not participate** in :term:`2.0 style` invocations
(self, update_context: _O)
| 2082 | class="st">""" |
| 2083 | |
| 2084 | def after_bulk_update(self, update_context: _O) -> None: |
| 2085 | class="st">"""Event for after the legacy :meth:`_orm.Query.update` method |
| 2086 | has been called. |
| 2087 | |
| 2088 | .. legacy:: The :meth:`_orm.SessionEvents.after_bulk_update` method |
| 2089 | is a legacy event hook as of SQLAlchemy 2.0. The event |
| 2090 | **does not participate** in :term:`2.0 style` invocations |
| 2091 | using :func:`_dml.update` documented at |
| 2092 | :ref:`orm_queryguide_update_delete_where`. For 2.0 style use, |
| 2093 | the :meth:`_orm.SessionEvents.do_orm_execute` hook will intercept |
| 2094 | these calls. |
| 2095 | |
| 2096 | :param update_context: an class="st">"update context" object which contains |
| 2097 | details about the update, including these attributes: |
| 2098 | |
| 2099 | * ``session`` - the :class:`.Session` involved |
| 2100 | * ``query`` -the :class:`_query.Query` |
| 2101 | object that this update operation |
| 2102 | was called upon. |
| 2103 | * ``values`` The class="st">"values" dictionary that was passed to |
| 2104 | :meth:`_query.Query.update`. |
| 2105 | * ``result`` the :class:`_engine.CursorResult` |
| 2106 | returned as a result of the |
| 2107 | bulk UPDATE operation. |
| 2108 | |
| 2109 | .. versionchanged:: 1.4 the update_context no longer has a |
| 2110 | ``QueryContext`` object associated with it. |
| 2111 | |
| 2112 | .. seealso:: |
| 2113 | |
| 2114 | :meth:`.QueryEvents.before_compile_update` |
| 2115 | |
| 2116 | :meth:`.SessionEvents.after_bulk_delete` |
| 2117 | |
| 2118 | class="st">""" |
| 2119 | |
| 2120 | def after_bulk_delete(self, delete_context: _O) -> None: |
| 2121 | class="st">"""Event for after the legacy :meth:`_orm.Query.delete` method |