MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / visit_binary

Function visit_binary

lib/sqlalchemy/sql/util.py:822–838  ·  view source on GitHub ↗
(binary)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 7

NullClass · 0.85
col_isFunction · 0.85
shares_lineageMethod · 0.80
differenceMethod · 0.45
addMethod · 0.45
appendMethod · 0.45
referencesMethod · 0.45

Tested by

no test coverage detected