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é
Module « sqlalchemy.orm »

Fonction immediateload - module sqlalchemy.orm

Signature de la fonction immediateload

def immediateload(*keys: '_AttrType', recursion_depth: 'Optional[int]' = None) -> '_AbstractLoad' 

Description

help(sqlalchemy.orm.immediateload)

Indicate that the given attribute should be loaded using
an immediate load with a per-attribute SELECT statement.

The load is achieved using the "lazyloader" strategy and does not
fire off any additional eager loaders.

The :func:`.immediateload` option is superseded in general
by the :func:`.selectinload` option, which performs the same task
more efficiently by emitting a SELECT for all loaded objects.

This function is part of the :class:`_orm.Load` interface and supports
both method-chained and standalone operation.

:param recursion_depth: optional int; when set to a positive integer
 in conjunction with a self-referential relationship,
 indicates "selectin" loading will continue that many levels deep
 automatically until no items are found.

 .. note:: The :paramref:`_orm.immediateload.recursion_depth` option
    currently supports only self-referential relationships.  There
    is not yet an option to automatically traverse recursive structures
    with more than one relationship involved.

 .. warning:: This parameter is new and experimental and should be
    treated as "alpha" status

 .. versionadded:: 2.0 added
    :paramref:`_orm.immediateload.recursion_depth`


.. seealso::

    :ref:`loading_toplevel`

    :ref:`selectin_eager_loading`



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