class CompileState: (source)
Known subclasses: sqlalchemy.orm.context.AbstractORMCompileState
, sqlalchemy.sql.dml.DMLState
, sqlalchemy.sql.selectable.CompoundSelectState
, sqlalchemy.sql.selectable.SelectState
Produces additional object state necessary for a statement to be compiled. the :class:`.CompileState` class is at the base of classes that assemble state for a particular statement object that is then used by the compiler. This process is essentially an extension of the process that the SQLCompiler.visit_XYZ() method takes, however there is an emphasis on converting raw user intent into more organized structures rather than producing string output. The top-level :class:`.CompileState` for the statement being executed is also accessible when the execution context works with invoking the statement and collecting results. The production of :class:`.CompileState` is specific to the compiler, such as within the :meth:`.SQLCompiler.visit_insert`, :meth:`.SQLCompiler.visit_select` etc. methods. These methods are also responsible for associating the :class:`.CompileState` with the :class:`.SQLCompiler` itself, if the statement is the "toplevel" statement, i.e. the outermost SQL statement that's actually being executed. There can be other :class:`.CompileState` objects that are not the toplevel, such as when a SELECT subquery or CTE-nested INSERT/UPDATE/DELETE is generated. .. versionadded:: 1.4
Class Method | create |
Undocumented |
Class Method | get |
Undocumented |
Class Method | plugin |
Undocumented |
Method | __init__ |
Undocumented |
Class Variable | __slots__ |
Undocumented |
Class Variable | plugins |
Undocumented |
Instance Variable | statement |
Undocumented |
Class Method | _get |
Undocumented |
Class Variable | _ambiguous |
Undocumented |
def get_plugin_class(cls, statement:
Executable
) -> Optional[ Type[ CompileState]]
:
(source)
¶
sqlalchemy.sql.dml.DMLState
, sqlalchemy.sql.selectable.SelectState
Undocumented
def plugin_for(cls, plugin_name:
str
, visit_name: str
) -> Callable[ [ _Fn], _Fn]
:
(source)
¶
Undocumented
sqlalchemy.orm.context.ORMCompileState
, sqlalchemy.sql.dml.DMLState
, sqlalchemy.sql.selectable.SelectState
Undocumented
def _get_plugin_class_for_plugin(cls, statement:
Executable
, plugin_name: str
) -> Optional[ Type[ CompileState]]
:
(source)
¶
Undocumented