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

Méthode sqlalchemy.orm.Mapper.cascade_iterator

Signature de la méthode cascade_iterator

def cascade_iterator(self, type_: 'str', state: 'InstanceState[_O]', halt_on: 'Optional[Callable[[InstanceState[Any]], bool]]' = None) -> 'Iterator[Tuple[object, Mapper[Any], InstanceState[Any], _InstanceDict]]' 

Description

help(Mapper.cascade_iterator)

Iterate each element and its mapper in an object graph,
for all relationships that meet the given cascade rule.

:param type\_:
  The name of the cascade rule (i.e. ``"save-update"``, ``"delete"``,
  etc.).

  .. note::  the ``"all"`` cascade is not accepted here.  For a generic
     object traversal function, see :ref:`faq_walk_objects`.

:param state:
  The lead InstanceState.  child items will be processed per
  the relationships defined for this object's mapper.

:return: the method yields individual object instances.

.. seealso::

    :ref:`unitofwork_cascades`

    :ref:`faq_walk_objects` - illustrates a generic function to
    traverse all objects without relying on cascades.



Vous êtes un professionnel et vous avez besoin d'une formation ? Coder avec une
Intelligence Artificielle
Voir le programme détaillé