MCPcopy Index your code
hub / github.com/sqlalchemy/sqlalchemy / __clause_element__

Method __clause_element__

lib/sqlalchemy/orm/mapper.py:2831–2852  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2829
2830 @HasMemoized.memoized_instancemethod
2831 def __clause_element__(self):
2832 annotations: Dict[str, Any] = {
2833 "entity_namespace": self,
2834 "parententity": self,
2835 "parentmapper": self,
2836 }
2837 if self.persist_selectable is not self.local_table:
2838 # joined table inheritance, with polymorphic selectable,
2839 # etc.
2840 annotations["dml_table"] = self.local_table._annotate(
2841 {
2842 "entity_namespace": self,
2843 "parententity": self,
2844 "parentmapper": self,
2845 }
2846 )._set_propagate_attrs(
2847 {"compile_state_plugin": "orm", "plugin_subject": self}
2848 )
2849
2850 return self.selectable._annotate(annotations)._set_propagate_attrs(
2851 {"compile_state_plugin": "orm", "plugin_subject": self}
2852 )
2853
2854 @util.memoized_property
2855 def select_identity_token(self):

Callers

nothing calls this directly

Calls 2

_set_propagate_attrsMethod · 0.45
_annotateMethod · 0.45

Tested by

no test coverage detected