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)
| 2103 | ), |
| 2104 | ) |
| 2105 | def after_bulk_update(self, update_context: _O) -> None: |
| 2106 | """Event for after the legacy :meth:`_orm.Query.update` method |
| 2107 | has been called. |
| 2108 | |
| 2109 | .. legacy:: The :meth:`_orm.SessionEvents.after_bulk_update` method |
| 2110 | is a legacy event hook as of SQLAlchemy 2.0. The event |
| 2111 | **does not participate** in :term:`2.0 style` invocations |
| 2112 | using :func:`_dml.update` documented at |
| 2113 | :ref:`orm_queryguide_update_delete_where`. For 2.0 style use, |
| 2114 | the :meth:`_orm.SessionEvents.do_orm_execute` hook will intercept |
| 2115 | these calls. |
| 2116 | |
| 2117 | :param update_context: an "update context" object which contains |
| 2118 | details about the update, including these attributes: |
| 2119 | |
| 2120 | * ``session`` - the :class:`.Session` involved |
| 2121 | * ``query`` -the :class:`_query.Query` |
| 2122 | object that this update operation |
| 2123 | was called upon. |
| 2124 | * ``values`` The "values" dictionary that was passed to |
| 2125 | :meth:`_query.Query.update`. |
| 2126 | * ``result`` the :class:`_engine.CursorResult` |
| 2127 | returned as a result of the |
| 2128 | bulk UPDATE operation. |
| 2129 | |
| 2130 | .. versionchanged:: 1.4 the update_context no longer has a |
| 2131 | ``QueryContext`` object associated with it. |
| 2132 | |
| 2133 | .. seealso:: |
| 2134 | |
| 2135 | :meth:`.QueryEvents.before_compile_update` |
| 2136 | |
| 2137 | :meth:`.SessionEvents.after_bulk_delete` |
| 2138 | |
| 2139 | """ |
| 2140 | |
| 2141 | @event._legacy_signature( |
| 2142 | "0.9", |