module documentation

Core SQL expression elements, including :class:`_expression.ClauseElement`, :class:`_expression.ColumnElement`, and derived classes.

Class AnnotatedColumnElement No class docstring; 3/5 properties, 0/1 class variable, 0/2 method documented
Class AsBoolean Undocumented
Class BinaryExpression Represent an expression that is ``LEFT <operator> RIGHT``.
Class BindParameter Represent a "bound expression".
Class BooleanClauseList No class docstring; 0/1 property, 0/5 instance variable, 0/2 class variable, 0/2 method, 2/6 class methods documented
Class Case Represent a ``CASE`` expression.
Class Cast Represent a ``CAST`` expression.
Class ClauseElement Base class for elements of a programmatically constructed SQL expression.
Class ClauseList Describe a list of clauses, separated by an operator.
Class CollationClause Undocumented
Class CollectionAggregate Forms the basis for right-hand collection operator modifiers ANY and ALL.
Class ColumnClause Represents a column expression from any textual string.
Class ColumnElement Represent a column-oriented SQL expression suitable for usage in the "columns" clause, WHERE clause etc. of a statement.
Class CompilerColumnElement A compiler-only column element used for ad-hoc string compilations.
Class CompilerElement base class for SQL elements that can be compiled to produce a SQL string.
Class conv Mark a string indicating that a name has already been converted by a naming convention.
Class DQLDMLClauseElement represents a :class:`.ClauseElement` that compiles to a DQL or DML expression, not DDL.
Class ExpressionClauseList Describe a list of clauses, separated by an operator, in a column expression context.
Class Extract Represent a SQL EXTRACT clause, ``extract(field FROM expr)``.
Class False_ Represent the ``false`` keyword, or equivalent, in a SQL statement.
Class FunctionFilter Represent a function FILTER clause.
Class GroupedElement Represent any parenthesized expression
Class Grouping Represent a grouping within a column expression
Class IndexExpression Represent the class of expressions that are like an "index" operation.
Class KeyedColumnElement ColumnElement where ``.key`` is non-None.
Class Label Represents a column label (AS).
Class NamedColumn No class docstring; 0/1 property, 0/4 class variable, 2/8 methods documented
Class Null Represent the NULL keyword in a SQL statement.
Class OperatorExpression base for expressions that contain an operator and operands
Class Over Represent an OVER clause.
Class quoted_name Represent a SQL identifier combined with quoting preferences.
Class ReleaseSavepointClause Undocumented
Class RollbackToSavepointClause Undocumented
Class SavepointClause Undocumented
Class Slice Represent SQL for a Python array-slice object.
Class SQLColumnExpression A type that may be used to indicate any SQL column element or object that acts in place of one.
Class SQLCoreOperations Undocumented
Class TableValuedColumn Undocumented
Class TextClause Represent a literal SQL text fragment.
Class True_ Represent the ``true`` keyword, or equivalent, in a SQL statement.
Class Tuple Represent a SQL tuple.
Class TypeClause Handle a type keyword in a SQL statement.
Class TypeCoerce Represent a Python-side type-coercion wrapper.
Class UnaryExpression Define a 'unary' expression.
Class WithinGroup Represent a WITHIN GROUP (ORDER BY) clause.
Class WrapsColumnExpression Mixin that defines a :class:`_expression.ColumnElement` as a wrapper with special labeling behavior for an expression that already has a name.
Function literal Return a literal clause, bound to a bind parameter.
Function literal_column Produce a :class:`.ColumnClause` object that has the :paramref:`_expression.column.is_literal` flag set to True.
Class _anonymous_label A unicode subclass used to identify anonymously generated names.
Class _IdentifiedClause Undocumented
Class _label_reference Wrap a column expression as it appears in a 'reference' context.
Class _OverRange Undocumented
Class _textual_label_reference Undocumented
Class _truncated_label A unicode subclass used to identify symbolic " "names that may require truncation.
Function _corresponding_column_or_error Undocumented
Function _find_columns locate Column objects within the given expression.
Function _type_from_args Undocumented
Type Variable _NMT Undocumented
Type Variable _NT Undocumented
Type Variable _OPT Undocumented
Type Variable _T Undocumented
Type Alias _NUMBER Undocumented
Type Alias _NUMERIC Undocumented
def literal(value: Any, type_: Optional[_TypeEngineArgument[_T]] = None, literal_execute: bool = False) -> BindParameter[_T]: (source)

Return a literal clause, bound to a bind parameter. Literal clauses are created automatically when non- :class:`_expression.ClauseElement` objects (such as strings, ints, dates, etc.) are used in a comparison operation with a :class:`_expression.ColumnElement` subclass, such as a :class:`~sqlalchemy.schema.Column` object. Use this function to force the generation of a literal clause, which will be created as a :class:`BindParameter` with a bound value. :param value: the value to be bound. Can be any Python object supported by the underlying DB-API, or is translatable via the given type argument. :param type\_: an optional :class:`~sqlalchemy.types.TypeEngine` which will provide bind-parameter translation for this literal. :param literal_execute: optional bool, when True, the SQL engine will attempt to render the bound value directly in the SQL statement at execution time rather than providing as a parameter value. .. versionadded:: 2.0

def literal_column(text: str, type_: Optional[_TypeEngineArgument[_T]] = None) -> ColumnClause[_T]: (source)

Produce a :class:`.ColumnClause` object that has the :paramref:`_expression.column.is_literal` flag set to True. :func:`_expression.literal_column` is similar to :func:`_expression.column`, except that it is more often used as a "standalone" column expression that renders exactly as stated; while :func:`_expression.column` stores a string name that will be assumed to be part of a table and may be quoted as such, :func:`_expression.literal_column` can be that, or any other arbitrary column-oriented expression. :param text: the text of the expression; can be any SQL expression. Quoting rules will not be applied. To specify a column-name expression which should be subject to quoting rules, use the :func:`column` function. :param type\_: an optional :class:`~sqlalchemy.types.TypeEngine` object which will provide result-set translation and additional expression semantics for this column. If left as ``None`` the type will be :class:`.NullType`. .. seealso:: :func:`_expression.column` :func:`_expression.text` :ref:`tutorial_select_arbitrary_text`

def _corresponding_column_or_error(fromclause, column, require_embedded=False): (source)

Undocumented

def _find_columns(clause: ClauseElement) -> Set[ColumnClause[Any]]: (source)

locate Column objects within the given expression.

def _type_from_args(args): (source)

Undocumented

Undocumented

Value
TypeVar('_NMT',
        bound='_NUMBER')

Undocumented

Value
TypeVar('_NT',
        bound='_NUMERIC')

Undocumented

Value
TypeVar('_OPT',
        bound='Any')

Undocumented

Value
TypeVar('_T',
        bound='Any')

Undocumented

Value
Union[float, int, Decimal]
_NUMERIC = (source)

Undocumented

Value
Union[float, Decimal]