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.reduce_columns

Signature de la méthode reduce_columns

def reduce_columns(self, only_synonyms: 'bool' = True) -> 'Select[Any]' 

Description

help(Select.reduce_columns)

Return a new :func:`_expression.select` construct with redundantly
named, equivalently-valued columns removed from the columns clause.

"Redundant" here means two columns where one refers to the
other either based on foreign key, or via a simple equality
comparison in the WHERE clause of the statement.   The primary purpose
of this method is to automatically construct a select statement
with all uniquely-named columns, without the need to use
table-qualified labels as
:meth:`_expression.Select.set_label_style`
does.

When columns are omitted based on foreign key, the referred-to
column is the one that's kept.  When columns are omitted based on
WHERE equivalence, the first column in the columns clause is the
one that's kept.

:param only_synonyms: when True, limit the removal of columns
 to those which have the same name as the equivalent.   Otherwise,
 all columns that are equivalent to another are removed.



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