Produce a type cast, i.e. ``CAST( AS )``. This is a shortcut to the :func:`_expression.cast` function. .. seealso:: :ref:`tutorial_casts` :func:`_expression.cast` :func:`_expression.type_coerce`
(self, type_: _TypeEngineArgument[_OPT])
| 1700 | return key, co |
| 1701 | |
| 1702 | def cast(self, type_: _TypeEngineArgument[_OPT]) -> Cast[_OPT]: |
| 1703 | """Produce a type cast, i.e. ``CAST(<expression> AS <type>)``. |
| 1704 | |
| 1705 | This is a shortcut to the :func:`_expression.cast` function. |
| 1706 | |
| 1707 | .. seealso:: |
| 1708 | |
| 1709 | :ref:`tutorial_casts` |
| 1710 | |
| 1711 | :func:`_expression.cast` |
| 1712 | |
| 1713 | :func:`_expression.type_coerce` |
| 1714 | |
| 1715 | """ |
| 1716 | return Cast(self, type_) |
| 1717 | |
| 1718 | def label(self, name: Optional[str]) -> Label[_T]: |
| 1719 | """Produce a column label, i.e. ``<columnname> AS <name>``. |