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 ? RAG (Retrieval-Augmented Generation)
et Fine Tuning d'un LLM
Voir le programme détaillé
Module « sqlalchemy »

Classe « Select »

Informations générales

Héritage

                                    builtins.object
                                        Generic
                builtins.object
                    Visitable
                        CompilerElement
                builtins.object
                    Visitable
                builtins.object
                    HasTraverseInternals
                        ExternallyTraversible
                builtins.object
                    HasTraverseInternals
                        HasCopyInternals
                builtins.object
                    HasMemoized
                builtins.object
                    HasCacheKey
                        MemoizedHasCacheKey
        builtins.object
            Visitable
        builtins.object
            HasTraverseInternals
                ExternallyTraversible
                    SupportsAnnotations
                        SupportsWrappingAnnotations
                            ClauseElement
                                DQLDMLClauseElement
                        builtins.object
                            SQLRole
                                ReturnsRowsRole
                                    ReturnsRows
                        builtins.object
                            SQLRole
                                StatementRole
                                    Executable
                                        ExecutableReturnsRows
                                            TypedReturnsRows
                                builtins.object
                                    HasMemoized
                                        Generative
            builtins.object
                Visitable
                    CompilerElement
            builtins.object
                Visitable
            builtins.object
                HasTraverseInternals
                    ExternallyTraversible
            builtins.object
                HasTraverseInternals
                    HasCopyInternals
            builtins.object
                HasMemoized
            builtins.object
                HasCacheKey
                    MemoizedHasCacheKey
    builtins.object
        Visitable
    builtins.object
        HasTraverseInternals
            ExternallyTraversible
                SupportsAnnotations
                    SupportsWrappingAnnotations
                        ClauseElement
                            DQLDMLClauseElement
                    builtins.object
                        SQLRole
                            ReturnsRowsRole
                                ReturnsRows
                                    Selectable
                builtins.object
                    Visitable
                builtins.object
                    HasTraverseInternals
                        ExternallyTraversible
                            SupportsAnnotations
                                SupportsWrappingAnnotations
                                    SupportsCloneAnnotations
        builtins.object
            Visitable
                CompilerElement
        builtins.object
            Visitable
        builtins.object
            HasTraverseInternals
                ExternallyTraversible
        builtins.object
            HasTraverseInternals
                HasCopyInternals
        builtins.object
            HasMemoized
        builtins.object
            HasCacheKey
                MemoizedHasCacheKey
builtins.object
    Visitable
builtins.object
    HasTraverseInternals
        ExternallyTraversible
            SupportsAnnotations
                SupportsWrappingAnnotations
                    ClauseElement
                        DQLDMLClauseElement
                builtins.object
                    SQLRole
                        ReturnsRowsRole
                            ReturnsRows
                                SelectsRows
                    builtins.object
                        SQLRole
                            ReturnsRowsRole
                                HasCTERole
                                    HasCTE
                            builtins.object
                                SQLRole
                                    InElementRole
                            builtins.object
                                SQLRole
                            builtins.object
                                AllowsLambdaRole
                                    CompoundElementRole
                            builtins.object
                                SQLRole
                                    DMLSelectRole
                        builtins.object
                            SQLRole
                                ReturnsRowsRole
                        builtins.object
                            SQLRole
                                StatementRole
                                    SelectStatementRole
                                        SelectBase
                                            GenerativeSelect
                                        builtins.object
                                            _SelectFromElements
                                builtins.object
                                    HasMemoized
                                        Generative
                                            HasCompileState
                                        builtins.object
                                            HasHints
                                        builtins.object
                                            HasSuffixes
                                        builtins.object
                                            HasPrefixes
                                                Select

Définition

class Select(HasPrefixes, HasSuffixes, HasHints, HasCompileState, _SelectFromElements, GenerativeSelect, TypedReturnsRows):

help(Select)

Represents a ``SELECT`` statement.

The :class:`_sql.Select` object is normally constructed using the
:func:`_sql.select` function.  See that function for details.

.. seealso::

    :func:`_sql.select`

    :ref:`tutorial_selecting_data` - in the 2.0 tutorial

Constructeur(s)

Signature du constructeur Description
__init__(self, *entities: '_ColumnsClauseArgument[Any]') Construct a new :class:`_expression.Select`. [extrait de __init__.__doc__]

Liste des attributs statiques

Nom de l'attribut Valeur
allows_lambdaTrue
description<sqlalchemy.util.langhelpers._memoized_property object at 0x0000020D9F723AD0>
inherit_cacheNone
is_clause_elementTrue
is_deleteFalse
is_dmlFalse
is_from_statementFalse
is_insertFalse
is_selectTrue
is_selectableTrue
is_textFalse
is_updateFalse
selected_columns<sqlalchemy.util.langhelpers.HasMemoized.memoized_attribute object at 0x0000020D9F6B7D80>
stringify_dialectdefault
supports_executionTrue
uses_inspectionFalse

Liste des propriétés

Nom de la propriétéDescription
c
column_descriptionsReturn a :term:`plugin-enabled` 'column descriptions' structure [extrait de column_descriptions.__doc__]
columns
columns_clause_fromsReturn the set of :class:`_expression.FromClause` objects implied [extrait de columns_clause_froms.__doc__]
entity_namespace
exported_columnsA :class:`_expression.ColumnCollection` [extrait de exported_columns.__doc__]
fromsReturn the displayed list of :class:`_expression.FromClause` [extrait de froms.__doc__]
inner_columnsAn iterator of all :class:`_expression.ColumnElement` [extrait de inner_columns.__doc__]
selectable
whereclauseReturn the completed WHERE clause for this [extrait de _whereclause.__doc__]

Liste des opérateurs

Opérateurs hérités de la classe ClauseElement

__invert__

Liste des opérateurs

Opérateurs hérités de la classe object

__eq__, __ge__, __gt__, __le__, __lt__, __ne__

Liste des méthodes

Toutes les méthodes Méthodes d'instance Méthodes statiques Méthodes dépréciées
Signature de la méthodeDescription
add_columns(self, *entities: '_ColumnsClauseArgument[Any]') -> 'Select[Any]' Return a new :func:`_expression.select` construct with [extrait de add_columns.__doc__]
column(self, column: '_ColumnsClauseArgument[Any]') -> 'Select[Any]' Return a new :func:`_expression.select` construct with [extrait de column.__doc__]
correlate(self, *fromclauses: 'Union[Literal[None, False], _FromClauseArgument]') -> 'Self' Return a new :class:`_expression.Select` [extrait de correlate.__doc__]
correlate_except(self, *fromclauses: 'Union[Literal[None, False], _FromClauseArgument]') -> 'Self' Return a new :class:`_expression.Select` [extrait de correlate_except.__doc__]
distinct(self, *expr: '_ColumnExpressionArgument[Any]') -> 'Self' Return a new :func:`_expression.select` construct which [extrait de distinct.__doc__]
except_(self, *other: '_SelectStatementForCompoundArgument') -> 'CompoundSelect' Return a SQL ``EXCEPT`` of this select() construct against [extrait de except_.__doc__]
except_all(self, *other: '_SelectStatementForCompoundArgument') -> 'CompoundSelect' Return a SQL ``EXCEPT ALL`` of this select() construct against [extrait de except_all.__doc__]
filter(self, *criteria: '_ColumnExpressionArgument[bool]') -> 'Self' A synonym for the :meth:`_sql.Select.where` method. [extrait de filter.__doc__]
filter_by(self, **kwargs: 'Any') -> 'Self' apply the given filtering criterion as a WHERE clause [extrait de filter_by.__doc__]
from_statement(self, statement: 'roles.ReturnsRowsRole') -> 'ExecutableReturnsRows' Apply the columns which this :class:`.Select` would select [extrait de from_statement.__doc__]
get_children(self, **kw: 'Any') -> 'Iterable[ClauseElement]'
get_final_froms(self) -> 'Sequence[FromClause]' Compute the final displayed list of :class:`_expression.FromClause` [extrait de get_final_froms.__doc__]
having(self, *having: '_ColumnExpressionArgument[bool]') -> 'Self' Return a new :func:`_expression.select` construct with [extrait de having.__doc__]
intersect(self, *other: '_SelectStatementForCompoundArgument') -> 'CompoundSelect' Return a SQL ``INTERSECT`` of this select() construct against [extrait de intersect.__doc__]
intersect_all(self, *other: '_SelectStatementForCompoundArgument') -> 'CompoundSelect' Return a SQL ``INTERSECT ALL`` of this select() construct [extrait de intersect_all.__doc__]
is_derived_from(self, fromclause: 'Optional[FromClause]') -> 'bool'
join(self, target: '_JoinTargetArgument', onclause: 'Optional[_OnClauseArgument]' = None, *, isouter: 'bool' = False, full: 'bool' = False) -> 'Self' Create a SQL JOIN against this :class:`_expression.Select` [extrait de join.__doc__]
join_from(self, from_: '_FromClauseArgument', target: '_JoinTargetArgument', onclause: 'Optional[_OnClauseArgument]' = None, *, isouter: 'bool' = False, full: 'bool' = False) -> 'Self' Create a SQL JOIN against this :class:`_expression.Select` [extrait de join_from.__doc__]
outerjoin(self, target: '_JoinTargetArgument', onclause: 'Optional[_OnClauseArgument]' = None, *, full: 'bool' = False) -> 'Self' Create a left outer join. [extrait de outerjoin.__doc__]
outerjoin_from(self, from_: '_FromClauseArgument', target: '_JoinTargetArgument', onclause: 'Optional[_OnClauseArgument]' = None, *, full: 'bool' = False) -> 'Self' Create a SQL LEFT OUTER JOIN against this [extrait de outerjoin_from.__doc__]
reduce_columns(self, only_synonyms: 'bool' = True) -> 'Select[Any]' Return a new :func:`_expression.select` construct with redundantly [extrait de reduce_columns.__doc__]
select_from(self, *froms: '_FromClauseArgument') -> 'Self' Return a new :func:`_expression.select` construct with the [extrait de select_from.__doc__]
self_group(self, against: 'Optional[OperatorType]' = None) -> 'Union[SelectStatementGrouping[Self], Self]' Return a 'grouping' construct as per the [extrait de self_group.__doc__]
union(self, *other: '_SelectStatementForCompoundArgument') -> 'CompoundSelect' Return a SQL ``UNION`` of this select() construct against [extrait de union.__doc__]
union_all(self, *other: '_SelectStatementForCompoundArgument') -> 'CompoundSelect' Return a SQL ``UNION ALL`` of this select() construct against [extrait de union_all.__doc__]
where(self, *whereclause: '_ColumnExpressionArgument[bool]') -> 'Self' Return a new :func:`_expression.select` construct with [extrait de where.__doc__]
with_only_columns(self, *entities: '_ColumnsClauseArgument[Any]', maintain_column_froms: 'bool' = False, **_Select__kw: 'Any') -> 'Select[Any]' Return a new :func:`_expression.select` construct with its columns [extrait de with_only_columns.__doc__]

Méthodes héritées de la classe TypedReturnsRows

__subclasshook__

Méthodes héritées de la classe Generic

__class_getitem__, __init_subclass__

Méthodes héritées de la classe Executable

__init_subclass__, execution_options, get_execution_options, options

Méthodes héritées de la classe GenerativeSelect

fetch, get_label_style, group_by, limit, offset, order_by, set_label_style, slice, with_for_update

Méthodes héritées de la classe SelectBase

alias, as_scalar, exists, label, lateral, scalar_subquery, select, subquery

Méthodes héritées de la classe Selectable

corresponding_column, replace_selectable

Méthodes héritées de la classe HasCTE

add_cte, cte

Méthodes héritées de la classe ClauseElement

__bool__, __getstate__, __repr__, compare, params, unique_params

Méthodes héritées de la classe CompilerElement

__str__, compile

Méthodes héritées de la classe Visitable

__class_getitem__

Méthodes héritées de la classe HasMemoized

memoized_attribute, memoized_instancemethod

Méthodes héritées de la classe HasHints

with_hint, with_statement_hint

Méthodes héritées de la classe HasSuffixes

suffix_with

Méthodes héritées de la classe HasPrefixes

prefix_with

Méthodes héritées de la classe object

__delattr__, __dir__, __format__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __setattr__, __sizeof__

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é