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

Method __init__

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

Source from the content-addressed store, hash-verified

1548 cls._register = True
1549
1550 def __init__(
1551 self, *args: _ColumnExpressionOrLiteralArgument[Any], **kwargs: Any
1552 ) -> None:
1553 parsed_args = kwargs.pop("_parsed_args", None)
1554 if parsed_args is None:
1555 parsed_args = [
1556 coercions.expect(
1557 roles.ExpressionElementRole,
1558 c,
1559 name=self.name,
1560 apply_propagate_attrs=self,
1561 )
1562 for c in args
1563 ]
1564 self._has_args = self._has_args or bool(parsed_args)
1565 self.packagenames = ()
1566
1567 self.clause_expr = Grouping(
1568 ClauseList(
1569 operator=operators.comma_op, group_contents=True, *parsed_args
1570 )
1571 )
1572
1573 self.type = type_api.to_instance( # type: ignore
1574 kwargs.pop("type_", None) or getattr(self, "type", None)
1575 )
1576
1577
1578register_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