Produce a type cast, i.e. ``CAST(<expression> AS <type>)``. 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])
| 1762 | return key, co |
| 1763 | |
| 1764 | def cast(self, type_: _TypeEngineArgument[_OPT]) -> Cast[_OPT]: |
| 1765 | class="st">"""Produce a type cast, i.e. ``CAST(<expression> AS <type>)``. |
| 1766 | |
| 1767 | This is a shortcut to the :func:`_expression.cast` function. |
| 1768 | |
| 1769 | .. seealso:: |
| 1770 | |
| 1771 | :ref:`tutorial_casts` |
| 1772 | |
| 1773 | :func:`_expression.cast` |
| 1774 | |
| 1775 | :func:`_expression.type_coerce` |
| 1776 | |
| 1777 | class="st">""" |
| 1778 | return Cast(self, type_) |
| 1779 | |
| 1780 | def label(self, name: Optional[str]) -> Label[_T]: |
| 1781 | class="st">"""Produce a column label, i.e. ``<columnname> AS <name>``. |