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

Method __init__

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

2746 clauses: List[ColumnElement[Any]]
2747
2748 def __init__(
2749 self,
2750 *clauses: _ColumnExpressionArgument[Any],
2751 operator: OperatorType = operators.comma_op,
2752 group: bool = True,
2753 group_contents: bool = True,
2754 _literal_as_text_role: Type[roles.SQLRole] = roles.WhereHavingRole,
2755 ):
2756 self.operator = operator
2757 self.group = group
2758 self.group_contents = group_contents
2759 clauses_iterator: Iterable[_ColumnExpressionArgument[Any]] = clauses
2760 text_converter_role: Type[roles.SQLRole] = _literal_as_text_role
2761 self._text_converter_role = text_converter_role
2762
2763 if self.group_contents:
2764 self.clauses = [
2765 coercions.expect(
2766 text_converter_role, clause, apply_propagate_attrs=self
2767 ).self_group(against=self.operator)
2768 for clause in clauses_iterator
2769 ]
2770 else:
2771 self.clauses = [
2772 coercions.expect(
2773 text_converter_role, clause, apply_propagate_attrs=self
2774 )
2775 for clause in clauses_iterator
2776 ]
2777 self._is_implicitly_boolean = operators.is_boolean(self.operator)
2778
2779 @classmethod
2780 def _construct_raw(

Callers

nothing calls this directly

Calls 1

self_groupMethod · 0.45

Tested by

no test coverage detected