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

Method __init__

lib/sqlalchemy/sql/functions.py:1636–1661  ·  view source on GitHub ↗
(
        self, *args: _ColumnExpressionOrLiteralArgument[Any], **kwargs: Any
    )

Source from the content-addressed store, hash-verified

1634 cls._register = True
1635
1636 def __init__(
1637 self, *args: _ColumnExpressionOrLiteralArgument[Any], **kwargs: Any
1638 ) -> None:
1639 parsed_args = kwargs.pop("_parsed_args", None)
1640 if parsed_args is None:
1641 parsed_args = [
1642 coercions.expect(
1643 roles.ExpressionElementRole,
1644 c,
1645 name=self.name,
1646 apply_propagate_attrs=self,
1647 )
1648 for c in args
1649 ]
1650 self._has_args = self._has_args or bool(parsed_args)
1651 self.packagenames = ()
1652
1653 self.clause_expr = Grouping(
1654 ClauseList(
1655 operator=operators.comma_op, group_contents=True, *parsed_args
1656 )
1657 )
1658
1659 self.type = type_api.to_instance( # type: ignore
1660 kwargs.pop("type_", None) or getattr(self, "type", None)
1661 )
1662
1663
1664register_function("cast", Cast) # type: ignore

Callers

nothing calls this directly

Calls 3

GroupingClass · 0.85
ClauseListClass · 0.85
popMethod · 0.45

Tested by

no test coverage detected