From: Mike Bayer Date: Tue, 3 Jan 2023 14:48:06 +0000 (-0500) Subject: link to with_variant() narrative from API doc X-Git-Tag: rel_1_4_46~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=90457077c23a45e505b65224e2ca30704a7e95dd;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git link to with_variant() narrative from API doc Change-Id: I5d8e4d7cb7871bedebe0fe89758be441e64b94c6 (cherry picked from commit 7f86be997eea27bc994b25c4fb65d72b3d4567f9) --- diff --git a/doc/build/core/type_basics.rst b/doc/build/core/type_basics.rst index 62d941e663..ed4d928e6d 100644 --- a/doc/build/core/type_basics.rst +++ b/doc/build/core/type_basics.rst @@ -127,6 +127,8 @@ API documentation for backend-specific types are in the dialect-specific documentation, listed at :ref:`dialect_toplevel`. +.. _types_with_variant: + Using "UPPERCASE" and Backend-specific types for multiple backends ------------------------------------------------------------------ diff --git a/lib/sqlalchemy/sql/type_api.py b/lib/sqlalchemy/sql/type_api.py index 30fc4189bb..8c786968e0 100644 --- a/lib/sqlalchemy/sql/type_api.py +++ b/lib/sqlalchemy/sql/type_api.py @@ -543,6 +543,11 @@ class TypeEngine(Traversible): :param dialect_name: base name of the dialect which uses this type. (i.e. ``'postgresql'``, ``'mysql'``, etc.) + .. seealso:: + + :ref:`types_with_variant` - illustrates the use of + :meth:`_types.TypeEngine.with_variant`. + """ return Variant(self, {dialect_name: to_instance(type_)})