(binary: BinaryExpression[Any])
| 2682 | return None |
| 2683 | |
| 2684 | def visit_binary(binary: BinaryExpression[Any]) -> None: |
| 2685 | if not isinstance( |
| 2686 | binary.left, sql.ColumnElement |
| 2687 | ) or not isinstance(binary.right, sql.ColumnElement): |
| 2688 | return |
| 2689 | |
| 2690 | if ( |
| 2691 | "foreign" not in binary.left._annotations |
| 2692 | and "foreign" not in binary.right._annotations |
| 2693 | ): |
| 2694 | col = is_foreign(binary.left, binary.right) |
| 2695 | if col is not None: |
| 2696 | if col.compare(binary.left): |
| 2697 | binary.left = binary.left._annotate({"foreign": True}) |
| 2698 | elif col.compare(binary.right): |
| 2699 | binary.right = binary.right._annotate( |
| 2700 | {"foreign": True} |
| 2701 | ) |
| 2702 | |
| 2703 | self.primaryjoin = visitors.cloned_traverse( |
| 2704 | self.primaryjoin, {}, {"binary": visit_binary} |
nothing calls this directly
no test coverage detected