MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / __init__

Method __init__

lib/sqlalchemy/sql/elements.py:3914–3932  ·  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

3912 modifier: Optional[OperatorType]
3913
3914 def __init__(
3915 self,
3916 element: ColumnElement[Any],
3917 *,
3918 operator: Optional[OperatorType] = None,
3919 modifier: Optional[OperatorType] = None,
3920 type_: Optional[_TypeEngineArgument[_T]] = None,
3921 wraps_column_expression: bool = False, # legacy, not used as of 2.0.42
3922 ):
3923 self.operator = operator
3924 self.modifier = modifier
3925 self._propagate_attrs = element._propagate_attrs
3926 self.element = element.self_group(
3927 against=self.operator or self.modifier
3928 )
3929
3930 # if type is None, we get NULLTYPE, which is our _T. But I don't
3931 # know how to get the overloads to express that correctly
3932 self.type = type_api.to_instance(type_) # type: ignore
3933
3934 def _wraps_unnamed_column(self):
3935 ungrouped = self.element._ungroup()

Callers

nothing calls this directly

Calls 1

self_groupMethod · 0.45

Tested by

no test coverage detected