diff options
Diffstat (limited to 'lib/sqlalchemy/sql/elements.py')
-rw-r--r-- | lib/sqlalchemy/sql/elements.py | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/lib/sqlalchemy/sql/elements.py b/lib/sqlalchemy/sql/elements.py index 22799dab5..b902ef4b4 100644 --- a/lib/sqlalchemy/sql/elements.py +++ b/lib/sqlalchemy/sql/elements.py @@ -859,6 +859,14 @@ class ColumnElement( This is a shortcut to the :func:`~.expression.cast` function. + .. seealso:: + + :ref:`coretutorial_casts` + + :func:`~.expression.cast` + + :func:`~.expression.type_coerce` + .. versionadded:: 1.0.7 """ @@ -2458,8 +2466,14 @@ class Cast(ColumnElement): .. seealso:: + :ref:`coretutorial_casts` + :func:`.cast` + :func:`.type_coerce` - an alternative to CAST that coerces the type + on the Python side only, which is often sufficient to generate the + correct SQL and data coercion. + """ __visit_name__ = "cast" @@ -2509,8 +2523,12 @@ class Cast(ColumnElement): .. seealso:: - :func:`.type_coerce` - Python-side type coercion without emitting - CAST. + :ref:`coretutorial_casts` + + :func:`.type_coerce` - an alternative to CAST that coerces the type + on the Python side only, which is often sufficient to generate the + correct SQL and data coercion. + """ self.type = type_api.to_instance(type_) @@ -2552,6 +2570,8 @@ class TypeCoerce(ColumnElement): :func:`.expression.type_coerce` + :func:`.cast` + """ __visit_name__ = "type_coerce" @@ -2614,6 +2634,8 @@ class TypeCoerce(ColumnElement): .. seealso:: + :ref:`coretutorial_casts` + :func:`.cast` """ |