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 « InstanceEvents »

Méthode sqlalchemy.orm.InstanceEvents.expire

Signature de la méthode expire

def expire(self, target, attrs) 

Description

expire.__doc__

Receive an object instance after its attributes or some subset
have been expired.

.. container:: event_signatures

     Example argument forms::

        from sqlalchemy import event


        @event.listens_for(SomeClass, 'expire')
        def receive_expire(target, attrs):
            "listen for the 'expire' event"

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


'keys' is a list of attribute names.  If None, the entire
state was expired.

:param target: the mapped instance.  If
 the event is configured with ``raw=True``, this will
 instead be the :class:`.InstanceState` state-management
 object associated with the instance.
:param attrs: sequence of attribute
 names which were expired, or None if all attributes were
 expired.