class documentation

class ExpandedState(NamedTuple): (source)

View In Hierarchy

represents state to use when producing "expanded" and "post compile" bound parameters for a statement. "expanded" parameters are parameters that are generated at statement execution time to suit a number of parameters passed, the most prominent example being the individual elements inside of an IN expression. "post compile" parameters are parameters where the SQL literal value will be rendered into the SQL statement at execution time, rather than being passed as separate parameters to the driver. To create an :class:`.ExpandedState` instance, use the :meth:`.SQLCompiler.construct_expanded_state` method on any :class:`.SQLCompiler` instance.

Class Variable parameter_expansion Mapping representing the intermediary link from original parameter name to list of "expanded" parameter names, for those parameters that were expanded.
Class Variable parameters Parameter dictionary with parameters fully expanded.
Class Variable positiontup Sequence of string names indicating the order of positional parameters
Class Variable processors mapping of bound value processors
Class Variable statement String SQL statement with parameters fully expanded
Property additional_parameters synonym for :attr:`.ExpandedState.parameters`.
Property positional_parameters Tuple of positional parameters, for statements that were compiled using a positional paramstyle.
parameter_expansion: Mapping[str, List[str]] = (source)

Mapping representing the intermediary link from original parameter name to list of "expanded" parameter names, for those parameters that were expanded.

Parameter dictionary with parameters fully expanded. For a statement that uses named parameters, this dictionary will map exactly to the names in the statement. For a statement that uses positional parameters, the :attr:`.ExpandedState.positional_parameters` will yield a tuple with the positional parameter set.

Sequence of string names indicating the order of positional parameters

mapping of bound value processors

statement: str = (source)

String SQL statement with parameters fully expanded

synonym for :attr:`.ExpandedState.parameters`.

@property
positional_parameters: Tuple[Any, ...] = (source)

Tuple of positional parameters, for statements that were compiled using a positional paramstyle.