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 ? Programmation Python
Les fondamentaux
Voir le programme détaillé
Module « sqlalchemy.orm »

Fonction undefer - module sqlalchemy.orm

Signature de la fonction undefer

def undefer(key: '_AttrType', *addl_attrs: '_AttrType') -> '_AbstractLoad' 

Description

help(sqlalchemy.orm.undefer)

Indicate that the given column-oriented attribute should be
undeferred, e.g. specified within the SELECT statement of the entity
as a whole.

The column being undeferred is typically set up on the mapping as a
:func:`.deferred` attribute.

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

Examples::

    # undefer two columns
    session.query(MyClass).options(
        undefer(MyClass.col1), undefer(MyClass.col2)
    )

    # undefer all columns specific to a single class using Load + *
    session.query(MyClass, MyOtherClass).options(Load(MyClass).undefer("*"))

    # undefer a column on a related object
    select(MyClass).options(defaultload(MyClass.items).undefer(MyClass.text))

:param key: Attribute to be undeferred.

.. seealso::

    :ref:`orm_queryguide_column_deferral` - in the
    :ref:`queryguide_toplevel`

    :func:`_orm.defer`

    :func:`_orm.undefer_group`



Vous êtes un professionnel et vous avez besoin d'une formation ? RAG (Retrieval-Augmented Generation)
et Fine Tuning d'un LLM
Voir le programme détaillé