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 ? Sensibilisation à
l'Intelligence Artificielle
Voir le programme détaillé
Module « sqlalchemy »

Fonction alias - module sqlalchemy

Signature de la fonction alias

def alias(selectable: 'FromClause', name: 'Optional[str]' = None, flat: 'bool' = False) -> 'NamedFromClause' 

Description

help(sqlalchemy.alias)

Return a named alias of the given :class:`.FromClause`.

For :class:`.Table` and :class:`.Join` objects, the return type is the
:class:`_expression.Alias` object. Other kinds of :class:`.NamedFromClause`
objects may be returned for other kinds of :class:`.FromClause` objects.

The named alias represents any :class:`_expression.FromClause` with an
alternate name assigned within SQL, typically using the ``AS`` clause when
generated, e.g. ``SELECT * FROM table AS aliasname``.

Equivalent functionality is available via the
:meth:`_expression.FromClause.alias`
method available on all :class:`_expression.FromClause` objects.

:param selectable: any :class:`_expression.FromClause` subclass,
    such as a table, select statement, etc.

:param name: string name to be assigned as the alias.
    If ``None``, a name will be deterministically generated at compile
    time. Deterministic means the name is guaranteed to be unique against
    other constructs used in the same statement, and will also be the same
    name for each successive compilation of the same statement object.

:param flat: Will be passed through to if the given selectable
 is an instance of :class:`_expression.Join` - see
 :meth:`_expression.Join.alias` for details.



Vous êtes un professionnel et vous avez besoin d'une formation ? Calcul scientifique
avec Python
Voir le programme détaillé