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 :

Vous êtes un professionnel et vous avez besoin d'une formation ? Calcul scientifique
avec Python
Voir le programme détaillé
Classe « SessionEvents »

Méthode sqlalchemy.orm.SessionEvents.after_begin

Signature de la méthode after_begin

def after_begin(self, session: 'Session', transaction: 'SessionTransaction', connection: 'Connection') -> 'None' 

Description

help(SessionEvents.after_begin)

Execute after a transaction is begun on a connection.

.. container:: event_signatures

     Example argument forms::

        from sqlalchemy import event


        @event.listens_for(SomeSessionClassOrObject, 'after_begin')
        def receive_after_begin(session, transaction, connection):
            "listen for the 'after_begin' event"

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


.. note:: This event is called within the process of the
  :class:`_orm.Session` modifying its own internal state.
  To invoke SQL operations within this hook, use the
  :class:`_engine.Connection` provided to the event;
  do not run SQL operations using the :class:`_orm.Session`
  directly.

:param session: The target :class:`.Session`.
:param transaction: The :class:`.SessionTransaction`.
:param connection: The :class:`_engine.Connection` object
 which will be used for SQL statements.

.. seealso::

    :meth:`~.SessionEvents.before_commit`

    :meth:`~.SessionEvents.after_commit`

    :meth:`~.SessionEvents.after_transaction_create`

    :meth:`~.SessionEvents.after_transaction_end`



Vous êtes un professionnel et vous avez besoin d'une formation ? Machine Learning
avec Scikit-Learn
Voir le programme détaillé