(binary)
| 832 | """ |
| 833 | |
| 834 | def visit_binary(binary): |
| 835 | if ( |
| 836 | isinstance(binary.left, BindParameter) |
| 837 | and binary.left._identifying_key in nulls |
| 838 | ): |
| 839 | # reverse order if the NULL is on the left side |
| 840 | binary.left = binary.right |
| 841 | binary.right = Null() |
| 842 | binary.operator = operators.is_ |
| 843 | binary.negate = operators.is_not |
| 844 | elif ( |
| 845 | isinstance(binary.right, BindParameter) |
| 846 | and binary.right._identifying_key in nulls |
| 847 | ): |
| 848 | binary.right = Null() |
| 849 | binary.operator = operators.is_ |
| 850 | binary.negate = operators.is_not |
| 851 | |
| 852 | return visitors.cloned_traverse(crit, {}, {"binary": visit_binary}) |
| 853 |
nothing calls this directly
no test coverage detected