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

Méthode sqlalchemy.orm.AttributeEvents.remove

Signature de la méthode remove

def remove(self, target, value, initiator) 

Description

remove.__doc__

Receive a collection remove event.

.. container:: event_signatures

     Example argument forms::

        from sqlalchemy import event


        @event.listens_for(SomeClass.some_attribute, 'remove')
        def receive_remove(target, value, initiator):
            "listen for the 'remove' event"

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


:param target: the object instance receiving the event.
  If the listener is registered with ``raw=True``, this will
  be the :class:`.InstanceState` object.
:param value: the value being removed.
:param initiator: An instance of :class:`.attributes.Event`
  representing the initiation of the event.  May be modified
  from its original value by backref handlers in order to control
  chained event propagation.

  .. versionchanged:: 0.9.0 the ``initiator`` argument is now
     passed as a :class:`.attributes.Event` object, and may be
     modified by backref handlers within a chain of backref-linked
     events.

:return: No return value is defined for this event.


.. seealso::

    :class:`.AttributeEvents` - background on listener options such
    as propagation to subclasses.