(
self, *args: _ColumnExpressionOrLiteralArgument[Any], **kwargs: Any
)
| 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 | |
| 1578 | register_function("cast", Cast) # type: ignore |
nothing calls this directly
no test coverage detected