MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / setup_compile_state

Method setup_compile_state

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

Source from the content-addressed store, hash-verified

2815 )
2816
2817 def setup_compile_state(self, compile_state):
2818 adapter = self._get_entity_clauses(compile_state)
2819
2820 single_table_crit = self.mapper._single_table_criterion
2821 if (
2822 single_table_crit is not None
2823 or ("additional_entity_criteria", self.mapper)
2824 in compile_state.global_attributes
2825 ):
2826 ext_info = self.entity_zero
2827 compile_state.extra_criteria_entities[ext_info] = (
2828 ext_info,
2829 ext_info._adapter if ext_info.is_aliased_class else None,
2830 )
2831
2832 loading._setup_entity_query(
2833 compile_state,
2834 self.mapper,
2835 self,
2836 self.path,
2837 adapter,
2838 compile_state.primary_columns,
2839 with_polymorphic=self._with_polymorphic_mappers,
2840 only_load_props=compile_state.compile_options._only_load_props,
2841 polymorphic_discriminator=self._polymorphic_discriminator,
2842 )
2843 compile_state._fallback_from_clauses.append(self.selectable)
2844
2845
2846class _BundleEntity(_QueryEntity):

Callers

nothing calls this directly

Calls 2

_get_entity_clausesMethod · 0.95
appendMethod · 0.45

Tested by

no test coverage detected