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 ? Mise en oeuvre d'IHM
avec Qt et PySide6
Voir le programme détaillé
Classe « Select »

Méthode sqlalchemy.Select.correlate

Signature de la méthode correlate

def correlate(self, *fromclauses: 'Union[Literal[None, False], _FromClauseArgument]') -> 'Self' 

Description

help(Select.correlate)

Return a new :class:`_expression.Select`
which will correlate the given FROM
clauses to that of an enclosing :class:`_expression.Select`.

Calling this method turns off the :class:`_expression.Select` object's
default behavior of "auto-correlation".  Normally, FROM elements
which appear in a :class:`_expression.Select`
that encloses this one via
its :term:`WHERE clause`, ORDER BY, HAVING or
:term:`columns clause` will be omitted from this
:class:`_expression.Select`
object's :term:`FROM clause`.
Setting an explicit correlation collection using the
:meth:`_expression.Select.correlate`
method provides a fixed list of FROM objects
that can potentially take place in this process.

When :meth:`_expression.Select.correlate`
is used to apply specific FROM clauses
for correlation, the FROM elements become candidates for
correlation regardless of how deeply nested this
:class:`_expression.Select`
object is, relative to an enclosing :class:`_expression.Select`
which refers to
the same FROM object.  This is in contrast to the behavior of
"auto-correlation" which only correlates to an immediate enclosing
:class:`_expression.Select`.
Multi-level correlation ensures that the link
between enclosed and enclosing :class:`_expression.Select`
is always via
at least one WHERE/ORDER BY/HAVING/columns clause in order for
correlation to take place.

If ``None`` is passed, the :class:`_expression.Select`
object will correlate
none of its FROM entries, and all will render unconditionally
in the local FROM clause.

:param \*fromclauses: one or more :class:`.FromClause` or other
 FROM-compatible construct such as an ORM mapped entity to become part
 of the correlate collection; alternatively pass a single value
 ``None`` to remove all existing correlations.

.. seealso::

    :meth:`_expression.Select.correlate_except`

    :ref:`tutorial_scalar_subquery`



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é