MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / setup_compile_state

Method setup_compile_state

lib/sqlalchemy/orm/context.py:2958–2984  ·  view source on GitHub ↗
(self, compile_state)

Source from the content-addressed store, hash-verified

2956 )
2957
2958 def setup_compile_state(self, compile_state):
2959 adapter = self._get_entity_clauses(compile_state)
2960
2961 single_table_crit = self.mapper._single_table_criterion
2962 if (
2963 single_table_crit is not None
2964 or ("additional_entity_criteria", self.mapper)
2965 in compile_state.global_attributes
2966 ):
2967 ext_info = self.entity_zero
2968 compile_state.extra_criteria_entities[ext_info] = (
2969 ext_info,
2970 ext_info._adapter if ext_info.is_aliased_class else None,
2971 )
2972
2973 loading._setup_entity_query(
2974 compile_state,
2975 self.mapper,
2976 self,
2977 self.path,
2978 adapter,
2979 compile_state.primary_columns,
2980 with_polymorphic=self._with_polymorphic_mappers,
2981 only_load_props=compile_state.compile_options._only_load_props,
2982 polymorphic_discriminator=self._polymorphic_discriminator,
2983 )
2984 compile_state._fallback_from_clauses.append(self.selectable)
2985
2986
2987class _BundleEntity(_QueryEntity):

Callers

nothing calls this directly

Calls 2

_get_entity_clausesMethod · 0.95
appendMethod · 0.45

Tested by

no test coverage detected