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

Method __init__

lib/sqlalchemy/sql/elements.py:3630–3648  ·  view source on GitHub ↗
(
        self,
        element: ColumnElement[Any],
        *,
        operator: Optional[OperatorType] = None,
        modifier: Optional[OperatorType] = None,
        type_: Optional[_TypeEngineArgument[_T]] = None,
        wraps_column_expression: bool = False,  # legacy, not used as of 2.0.42
    )

Source from the content-addressed store, hash-verified

3628 modifier: Optional[OperatorType]
3629
3630 def __init__(
3631 self,
3632 element: ColumnElement[Any],
3633 *,
3634 operator: Optional[OperatorType] = None,
3635 modifier: Optional[OperatorType] = None,
3636 type_: Optional[_TypeEngineArgument[_T]] = None,
3637 wraps_column_expression: bool = False, # legacy, not used as of 2.0.42
3638 ):
3639 self.operator = operator
3640 self.modifier = modifier
3641 self._propagate_attrs = element._propagate_attrs
3642 self.element = element.self_group(
3643 against=self.operator or self.modifier
3644 )
3645
3646 # if type is None, we get NULLTYPE, which is our _T. But I don't
3647 # know how to get the overloads to express that correctly
3648 self.type = type_api.to_instance(type_) # type: ignore
3649
3650 def _wraps_unnamed_column(self):
3651 ungrouped = self.element._ungroup()

Callers

nothing calls this directly

Calls 1

self_groupMethod · 0.45

Tested by

no test coverage detected