Core SQL expression elements, including :class:`_expression.ClauseElement`, :class:`_expression.ColumnElement`, and derived classes.
Class |
|
No class docstring; 3/5 properties, 0/1 class variable, 0/2 method documented |
Class |
|
Undocumented |
Class |
|
Represent an expression that is ``LEFT <operator> RIGHT``. |
Class |
|
Represent a "bound expression". |
Class |
|
No class docstring; 0/1 property, 0/5 instance variable, 0/2 class variable, 0/2 method, 2/6 class methods documented |
Class |
|
Represent a ``CASE`` expression. |
Class |
|
Represent a ``CAST`` expression. |
Class |
|
Base class for elements of a programmatically constructed SQL expression. |
Class |
|
Describe a list of clauses, separated by an operator. |
Class |
|
Undocumented |
Class |
|
Forms the basis for right-hand collection operator modifiers ANY and ALL. |
Class |
|
Represents a column expression from any textual string. |
Class |
|
Represent a column-oriented SQL expression suitable for usage in the "columns" clause, WHERE clause etc. of a statement. |
Class |
|
A compiler-only column element used for ad-hoc string compilations. |
Class |
|
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 |
|
represents a :class:`.ClauseElement` that compiles to a DQL or DML expression, not DDL. |
Class |
|
Describe a list of clauses, separated by an operator, in a column expression context. |
Class |
|
Represent a SQL EXTRACT clause, ``extract(field FROM expr)``. |
Class |
|
Represent the ``false`` keyword, or equivalent, in a SQL statement. |
Class |
|
Represent a function FILTER clause. |
Class |
|
Represent any parenthesized expression |
Class |
|
Represent a grouping within a column expression |
Class |
|
Represent the class of expressions that are like an "index" operation. |
Class |
|
ColumnElement where ``.key`` is non-None. |
Class |
|
Represents a column label (AS). |
Class |
|
No class docstring; 0/1 property, 0/4 class variable, 2/8 methods documented |
Class |
|
Represent the NULL keyword in a SQL statement. |
Class |
|
base for expressions that contain an operator and operands |
Class |
|
Represent an OVER clause. |
Class | quoted |
Represent a SQL identifier combined with quoting preferences. |
Class |
|
Undocumented |
Class |
|
Undocumented |
Class |
|
Undocumented |
Class |
|
Represent SQL for a Python array-slice object. |
Class |
|
A type that may be used to indicate any SQL column element or object that acts in place of one. |
Class |
|
Undocumented |
Class |
|
Undocumented |
Class |
|
Represent a literal SQL text fragment. |
Class |
|
Represent the ``true`` keyword, or equivalent, in a SQL statement. |
Class |
|
Represent a SQL tuple. |
Class |
|
Handle a type keyword in a SQL statement. |
Class |
|
Represent a Python-side type-coercion wrapper. |
Class |
|
Define a 'unary' expression. |
Class |
|
Represent a WITHIN GROUP (ORDER BY) clause. |
Class |
|
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 |
Produce a :class:`.ColumnClause` object that has the :paramref:`_expression.column.is_literal` flag set to True. |
Class | _anonymous |
A unicode subclass used to identify anonymously generated names. |
Class | _ |
Undocumented |
Class | _label |
Wrap a column expression as it appears in a 'reference' context. |
Class | _ |
Undocumented |
Class | _textual |
Undocumented |
Class | _truncated |
A unicode subclass used to identify symbolic " "names that may require truncation. |
Function | _corresponding |
Undocumented |
Function | _find |
locate Column objects within the given expression. |
Function | _type |
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 |
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
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`