(binary)
| 820 | """ |
| 821 | |
| 822 | def visit_binary(binary): |
| 823 | if ( |
| 824 | isinstance(binary.left, BindParameter) |
| 825 | and binary.left._identifying_key in nulls |
| 826 | ): |
| 827 | # reverse order if the NULL is on the left side |
| 828 | binary.left = binary.right |
| 829 | binary.right = Null() |
| 830 | binary.operator = operators.is_ |
| 831 | binary.negate = operators.is_not |
| 832 | elif ( |
| 833 | isinstance(binary.right, BindParameter) |
| 834 | and binary.right._identifying_key in nulls |
| 835 | ): |
| 836 | binary.right = Null() |
| 837 | binary.operator = operators.is_ |
| 838 | binary.negate = operators.is_not |
| 839 | |
| 840 | return visitors.cloned_traverse(crit, {}, {"binary": visit_binary}) |
| 841 |
nothing calls this directly
no test coverage detected