class CompileState(object):
Known subclasses: sqlalchemy.orm.context.ORMCompileState
, sqlalchemy.orm.persistence.BulkUDCompileState
, sqlalchemy.sql.dml.DMLState
, sqlalchemy.sql.selectable.CompoundSelectState
, sqlalchemy.sql.selectable.SelectState
Produces additional object state necessary for a statement to be compiled.
the .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 .CompileState
for the
statement being executed is also accessible when the execution context
works with invoking the statement and collecting results.
The production of .CompileState
is specific to the compiler, such
as within the .SQLCompiler.visit_insert
,
.SQLCompiler.visit_select
etc. methods. These methods are also
responsible for associating the .CompileState
with the
.SQLCompiler
itself, if the statement is the "toplevel" statement,
i.e. the outermost SQL statement that's actually being executed.
There can be other .CompileState
objects that are not the
toplevel, such as when a SELECT subquery or CTE-nested
INSERT/UPDATE/DELETE is generated.
Class Method | create_for_statement |
Undocumented |
Class Method | get_plugin_class |
Undocumented |
Class Method | plugin_for |
Undocumented |
Class Method | _get_plugin_class_for_plugin |
Undocumented |
Method | __init__ |
Undocumented |
Class Variable | __slots__ |
Undocumented |
Class Variable | plugins |
Undocumented |
Instance Variable | statement |
Undocumented |
sqlalchemy.orm.context.ORMCompileState
, sqlalchemy.sql.dml.DMLState
, sqlalchemy.sql.selectable.SelectState
Undocumented