Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Classe « SessionEvents »

Méthode sqlalchemy.orm.SessionEvents.after_flush_postexec

Signature de la méthode after_flush_postexec

def after_flush_postexec(self, session, flush_context) 

Description

after_flush_postexec.__doc__

Execute after flush has completed, and after the post-exec
state occurs.

.. container:: event_signatures

     Example argument forms::

        from sqlalchemy import event


        @event.listens_for(SomeSessionOrFactory, 'after_flush_postexec')
        def receive_after_flush_postexec(session, flush_context):
            "listen for the 'after_flush_postexec' event"

            # ... (event handling logic) ...


This will be when the 'new', 'dirty', and 'deleted' lists are in
their final state.  An actual commit() may or may not have
occurred, depending on whether or not the flush started its own
transaction or participated in a larger transaction.

:param session: The target :class:`.Session`.
:param flush_context: Internal :class:`.UOWTransaction` object
 which handles the details of the flush.


.. seealso::

    :meth:`~.SessionEvents.before_flush`

    :meth:`~.SessionEvents.after_flush`

    :ref:`session_persistence_events`