MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _annotate_fks

Method _annotate_fks

lib/sqlalchemy/orm/relationships.py:2633–2645  ·  view source on GitHub ↗

Annotate the primaryjoin and secondaryjoin structures with 'foreign' annotations marking columns considered as foreign.

(self)

Source from the content-addressed store, hash-verified

2631 )
2632
2633 def _annotate_fks(self) -> None:
2634 """Annotate the primaryjoin and secondaryjoin
2635 structures with 'foreign' annotations marking columns
2636 considered as foreign.
2637
2638 """
2639 if self._has_foreign_annotations:
2640 return
2641
2642 if self.consider_as_foreign_keys:
2643 self._annotate_from_fk_list()
2644 else:
2645 self._annotate_present_fks()
2646
2647 def _annotate_from_fk_list(self) -> None:
2648 def check_fk(element: _CE, **kw: Any) -> Optional[_CE]:

Callers 1

__init__Method · 0.95

Calls 2

_annotate_present_fksMethod · 0.95

Tested by

no test coverage detected