class documentation

class ORMSelectCompileState(ORMCompileState, SelectState): (source)

View In Hierarchy

Undocumented

Class Method all_selected_columns Undocumented
Class Method create_for_statement compiler hook, we arrive here from compiler.visit_select() only.
Class Method determine_last_joined_entity Undocumented
Class Method from_statement Undocumented
Class Method get_columns_clause_froms Undocumented
Class Variable correlate_except Undocumented
Class Variable eager_adding_joins Undocumented
Class Variable multi_row_eager_loaders Undocumented
Instance Variable attributes Undocumented
Instance Variable compile_options Undocumented
Instance Variable compound_eager_adapter Undocumented
Instance Variable correlate Undocumented
Instance Variable create_eager_joins Undocumented
Instance Variable current_path Undocumented
Instance Variable dedupe_columns Undocumented
Instance Variable distinct Undocumented
Instance Variable distinct_on Undocumented
Instance Variable eager_joins Undocumented
Instance Variable eager_order_by Undocumented
Instance Variable extra_criteria_entities Undocumented
Instance Variable for_statement Undocumented
Instance Variable from_clauses Undocumented
Instance Variable global_attributes Undocumented
Instance Variable group_by Undocumented
Instance Variable label_style Undocumented
Instance Variable order_by Undocumented
Instance Variable primary_columns Undocumented
Instance Variable secondary_columns Undocumented
Instance Variable select_statement Undocumented
Instance Variable statement Undocumented
Instance Variable use_legacy_query_style Undocumented
Class Method _create_entities_collection Creates a partial ORMSelectCompileState that includes the full collection of _MapperEntity and other _QueryEntity objects.
Method _adapt_col_list Undocumented
Method _adapt_polymorphic_element Undocumented
Method _adjust_for_extra_criteria Apply extra criteria filtering.
Method _all_equivs Undocumented
Method _compound_eager_statement Undocumented
Method _dump_option_struct Undocumented
Method _entity_zero Return the 'entity' (mapper or AliasedClass) associated with the first QueryEntity, or alternatively the 'select from' entity if specified.
Method _get_current_adapter Undocumented
Method _get_extra_criteria Undocumented
Method _get_select_from_alias_from_obj used only for legacy Query cases
Method _join Undocumented
Method _join_check_and_adapt_right_side transform the "right" side of the join as well as the onclause according to polymorphic mapping translations, aliasing on the query or on the join, special cases where the right and left side have overlapping tables.
Method _join_determine_implicit_left_side When join conditions don't express the left side explicitly, determine if an existing FROM or entity in this query can serve as the left hand side.
Method _join_left_to_right given raw "left", "right", "onclause" parameters consumed from a particular key within _join(), add a real ORMJoin object to our _from_obj list (or augment an existing one)
Method _join_place_explicit_left_side When join conditions express a left side explicitly, determine where in our existing list of FROM clauses we should join towards, or if we need to make a new join, and if so is it from one of our existing entities.
Method _mapper_zero return the Mapper associated with the first QueryEntity.
Method _only_entity_zero Undocumented
Method _only_full_mapper_zero Undocumented
Method _select_statement Undocumented
Method _set_select_from_alias used only for legacy Query cases
Method _setup_for_generate Undocumented
Method _simple_statement Undocumented
Class Variable _already_joined_edges Undocumented
Class Variable _has_mapper_entities Undocumented
Class Variable _has_orm_entities Undocumented
Instance Variable _entities Undocumented
Instance Variable _fallback_from_clauses Undocumented
Instance Variable _for_update_arg Undocumented
Instance Variable _from_obj_alias Undocumented
Instance Variable _having_criteria Undocumented
Instance Variable _join_entities Undocumented
Instance Variable _label_convention Undocumented
Instance Variable _memoized_entities Undocumented
Instance Variable _polymorphic_adapters Undocumented
Instance Variable _primary_entity Undocumented
Instance Variable _where_criteria Undocumented
Property _select_args Undocumented
Property _should_nest_selectable Undocumented

Inherited from ORMCompileState:

Class default_compile_options Undocumented
Class Method get_column_descriptions Undocumented
Class Method orm_pre_session_exec Undocumented
Class Method orm_setup_cursor_result Undocumented
Method __init__ Undocumented
Class Method _column_naming_convention Undocumented
Method _append_dedupe_col_collection Undocumented
Method _create_with_polymorphic_adapter given MapperEntity or ORMColumnEntity, setup polymorphic loading if called for by the Mapper.
Method _mapper_loads_polymorphically_with Undocumented
Property _lead_mapper_entities return all _MapperEntity objects in the lead entities collection.

Inherited from AbstractORMCompileState (via ORMCompileState):

Class Method orm_execute_statement Undocumented
Class Variable is_dml_returning Undocumented

Inherited from SelectState (via ORMCompileState, AbstractORMCompileState):

Class Method get_plugin_class Undocumented
Class Variable __slots__ Undocumented
Class Variable default_select_compile_options Undocumented
Instance Variable columns_plus_names Undocumented
Instance Variable froms Undocumented
Class Method _normalize_froms given an iterable of things to select FROM, reduce them to what would actually render in the FROM clause of a SELECT.
Class Method _plugin_not_implemented Undocumented
Method _get_display_froms Return the full list of 'from' clauses to be displayed.
Method _get_froms Undocumented
Method _memoized_attr__label_resolve_dict Undocumented
Method _setup_joins Undocumented
Instance Variable _ambiguous_table_name_map Undocumented

Inherited from MemoizedSlots (via ORMCompileState, AbstractORMCompileState, SelectState):

Method __getattr__ Undocumented
Method _fallback_getattr Undocumented

Inherited from CompileState (via ORMCompileState, AbstractORMCompileState, SelectState, MemoizedSlots):

Class Method plugin_for Undocumented
Class Variable plugins Undocumented
Class Method _get_plugin_class_for_plugin Undocumented
@classmethod
def all_selected_columns(cls, statement): (source)
@classmethod
def create_for_statement(cls, statement: Union[Select, FromStatement], compiler: Optional[SQLCompiler], **kw: Any) -> ORMSelectCompileState: (source)

compiler hook, we arrive here from compiler.visit_select() only.

@classmethod
def determine_last_joined_entity(cls, statement): (source)
@classmethod
def from_statement(cls, statement, from_statement): (source)
@classmethod
def get_columns_clause_froms(cls, statement): (source)
correlate_except = (source)

Undocumented

eager_adding_joins: bool = (source)

Undocumented

multi_row_eager_loaders: bool = (source)

Undocumented

compound_eager_adapter = (source)

Undocumented

correlate = (source)

Undocumented

current_path = (source)

Undocumented

distinct = (source)

Undocumented

distinct_on = (source)

Undocumented

eager_joins: dict = (source)

Undocumented

eager_order_by = (source)

Undocumented

extra_criteria_entities: dict = (source)

Undocumented

for_statement = (source)

Undocumented

group_by = (source)

Undocumented

label_style = (source)

Undocumented

order_by = (source)

Undocumented

@classmethod
def _create_entities_collection(cls, query, legacy): (source)

Creates a partial ORMSelectCompileState that includes the full collection of _MapperEntity and other _QueryEntity objects. Supports a few remaining use cases that are pre-compilation but still need to gather some of the column / adaption information.

def _adapt_col_list(self, cols, current_adapter): (source)

Undocumented

def _adapt_polymorphic_element(self, element): (source)

Undocumented

def _adjust_for_extra_criteria(self): (source)

Apply extra criteria filtering. For all distinct single-table-inheritance mappers represented in the columns clause of this query, as well as the "select from entity", add criterion to the WHERE clause of the given QueryContext such that only the appropriate subtypes are selected from the total results. Additionally, add WHERE criteria originating from LoaderCriteriaOptions associated with the global context.

def _all_equivs(self): (source)

Undocumented

def _compound_eager_statement(self): (source)

Undocumented

def _dump_option_struct(self): (source)

Undocumented

def _entity_zero(self): (source)

Return the 'entity' (mapper or AliasedClass) associated with the first QueryEntity, or alternatively the 'select from' entity if specified.

def _get_current_adapter(self): (source)

Undocumented

def _get_extra_criteria(self, ext_info): (source)

Undocumented

def _get_select_from_alias_from_obj(self, from_obj): (source)

used only for legacy Query cases

def _join(self, args, entities_collection): (source)

Undocumented

def _join_check_and_adapt_right_side(self, left, right, onclause, prop): (source)

transform the "right" side of the join as well as the onclause according to polymorphic mapping translations, aliasing on the query or on the join, special cases where the right and left side have overlapping tables.

def _join_determine_implicit_left_side(self, entities_collection, left, right, onclause): (source)

When join conditions don't express the left side explicitly, determine if an existing FROM or entity in this query can serve as the left hand side.

def _join_left_to_right(self, entities_collection, left, right, onclause, prop, outerjoin, full): (source)

given raw "left", "right", "onclause" parameters consumed from a particular key within _join(), add a real ORMJoin object to our _from_obj list (or augment an existing one)

def _join_place_explicit_left_side(self, entities_collection, left): (source)

When join conditions express a left side explicitly, determine where in our existing list of FROM clauses we should join towards, or if we need to make a new join, and if so is it from one of our existing entities.

def _mapper_zero(self): (source)

return the Mapper associated with the first QueryEntity.

def _only_entity_zero(self, rationale=None): (source)

Undocumented

def _only_full_mapper_zero(self, methname): (source)

Undocumented

def _select_statement(self, raw_columns, from_obj, where_criteria, having_criteria, label_style, order_by, for_update, hints, statement_hints, correlate, correlate_except, limit_clause, offset_clause, fetch_clause, fetch_clause_options, distinct, distinct_on, prefixes, suffixes, group_by): (source)

Undocumented

def _set_select_from_alias(self): (source)

used only for legacy Query cases

def _setup_for_generate(self): (source)

Undocumented

def _simple_statement(self): (source)

Undocumented

_already_joined_edges: tuple = (source)

Undocumented

_has_orm_entities: bool = (source)

Undocumented

_fallback_from_clauses: list = (source)

Undocumented

_for_update_arg = (source)

Undocumented

_from_obj_alias = (source)

Undocumented

_having_criteria = (source)

Undocumented

_join_entities: tuple = (source)

Undocumented

_memoized_entities = (source)

Undocumented

_where_criteria = (source)

Undocumented

@property
_select_args = (source)

Undocumented

@property
_should_nest_selectable = (source)

Undocumented