(binary: BinaryExpression[Any])
| 2599 | return None |
| 2600 | |
| 2601 | def visit_binary(binary: BinaryExpression[Any]) -> None: |
| 2602 | if not isinstance( |
| 2603 | binary.left, sql.ColumnElement |
| 2604 | ) or not isinstance(binary.right, sql.ColumnElement): |
| 2605 | return |
| 2606 | |
| 2607 | if ( |
| 2608 | "foreign" not in binary.left._annotations |
| 2609 | and "foreign" not in binary.right._annotations |
| 2610 | ): |
| 2611 | col = is_foreign(binary.left, binary.right) |
| 2612 | if col is not None: |
| 2613 | if col.compare(binary.left): |
| 2614 | binary.left = binary.left._annotate({"foreign": True}) |
| 2615 | elif col.compare(binary.right): |
| 2616 | binary.right = binary.right._annotate( |
| 2617 | {"foreign": True} |
| 2618 | ) |
| 2619 | |
| 2620 | self.primaryjoin = visitors.cloned_traverse( |
| 2621 | self.primaryjoin, {}, {"binary": visit_binary} |
nothing calls this directly
no test coverage detected