Annotate the primaryjoin and secondaryjoin structures with 'remote' annotations marking columns considered as part of the 'remote' side.
(self)
| 2741 | ) |
| 2742 | |
| 2743 | def _annotate_remote(self) -> None: |
| 2744 | """Annotate the primaryjoin and secondaryjoin |
| 2745 | structures with 'remote' annotations marking columns |
| 2746 | considered as part of the 'remote' side. |
| 2747 | |
| 2748 | """ |
| 2749 | if self._has_remote_annotations: |
| 2750 | return |
| 2751 | |
| 2752 | if self.secondary is not None: |
| 2753 | self._annotate_remote_secondary() |
| 2754 | elif self._local_remote_pairs or self._remote_side: |
| 2755 | self._annotate_remote_from_args() |
| 2756 | elif self._refers_to_parent_table(): |
| 2757 | self._annotate_selfref( |
| 2758 | lambda col: "foreign" in col._annotations, False |
| 2759 | ) |
| 2760 | elif self._tables_overlap(): |
| 2761 | self._annotate_remote_with_overlap() |
| 2762 | else: |
| 2763 | self._annotate_remote_distinct_selectables() |
| 2764 | |
| 2765 | def _annotate_remote_secondary(self) -> None: |
| 2766 | """annotate 'remote' in primaryjoin, secondaryjoin |
no test coverage detected