(
self,
left: ColumnElement[Any],
right: ColumnElement[Any],
operator: OperatorType,
type_: Optional[_TypeEngineArgument[_T]] = None,
negate: Optional[OperatorType] = None,
modifiers: Optional[Mapping[str, Any]] = None,
)
| 4216 | modifiers: Mapping[str, Any] |
| 4217 | |
| 4218 | def __init__( |
| 4219 | self, |
| 4220 | left: ColumnElement[Any], |
| 4221 | right: ColumnElement[Any], |
| 4222 | operator: OperatorType, |
| 4223 | type_: Optional[_TypeEngineArgument[_T]] = None, |
| 4224 | negate: Optional[OperatorType] = None, |
| 4225 | modifiers: Optional[Mapping[str, Any]] = None, |
| 4226 | ): |
| 4227 | # allow compatibility with libraries that |
| 4228 | # refer to BinaryExpression directly and pass strings |
| 4229 | if isinstance(operator, str): |
| 4230 | operator = operators.custom_op(operator) |
| 4231 | self._orig = (left.__hash__(), right.__hash__()) |
| 4232 | self._propagate_attrs = left._propagate_attrs or right._propagate_attrs |
| 4233 | self.left = left.self_group(against=operator) |
| 4234 | self.right = right.self_group(against=operator) |
| 4235 | self.operator = operator |
| 4236 | |
| 4237 | # if type is None, we get NULLTYPE, which is our _T. But I don't |
| 4238 | # know how to get the overloads to express that correctly |
| 4239 | self.type = type_api.to_instance(type_) # type: ignore |
| 4240 | |
| 4241 | self.negate = negate |
| 4242 | self._is_implicitly_boolean = operators.is_boolean(operator) |
| 4243 | |
| 4244 | if modifiers is None: |
| 4245 | self.modifiers = {} |
| 4246 | else: |
| 4247 | self.modifiers = modifiers |
| 4248 | |
| 4249 | @property |
| 4250 | def _flattened_operator_clauses( |
nothing calls this directly
no test coverage detected