MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / visit_binary

Function visit_binary

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

Source from the content-addressed store, hash-verified

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

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