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

Method __init__

lib/sqlalchemy/sql/elements.py:3031–3060  ·  view source on GitHub ↗
(
        self,
        *clauses: _ColumnExpressionArgument[Any],
        operator: OperatorType = operators.comma_op,
        group: bool = True,
        group_contents: bool = True,
        _literal_as_text_role: Type[roles.SQLRole] = roles.WhereHavingRole,
    )

Source from the content-addressed store, hash-verified

3029 clauses: List[ColumnElement[Any]]
3030
3031 def __init__(
3032 self,
3033 *clauses: _ColumnExpressionArgument[Any],
3034 operator: OperatorType = operators.comma_op,
3035 group: bool = True,
3036 group_contents: bool = True,
3037 _literal_as_text_role: Type[roles.SQLRole] = roles.WhereHavingRole,
3038 ):
3039 self.operator = operator
3040 self.group = group
3041 self.group_contents = group_contents
3042 clauses_iterator: Iterable[_ColumnExpressionArgument[Any]] = clauses
3043 text_converter_role: Type[roles.SQLRole] = _literal_as_text_role
3044 self._text_converter_role = text_converter_role
3045
3046 if self.group_contents:
3047 self.clauses = [
3048 coercions.expect(
3049 text_converter_role, clause, apply_propagate_attrs=self
3050 ).self_group(against=self.operator)
3051 for clause in clauses_iterator
3052 ]
3053 else:
3054 self.clauses = [
3055 coercions.expect(
3056 text_converter_role, clause, apply_propagate_attrs=self
3057 )
3058 for clause in clauses_iterator
3059 ]
3060 self._is_implicitly_boolean = operators.is_boolean(self.operator)
3061
3062 @classmethod
3063 def _construct_raw(

Callers

nothing calls this directly

Calls 1

self_groupMethod · 0.45

Tested by

no test coverage detected