From 90457077c23a45e505b65224e2ca30704a7e95dd Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Tue, 3 Jan 2023 09:48:06 -0500 Subject: [PATCH] link to with_variant() narrative from API doc Change-Id: I5d8e4d7cb7871bedebe0fe89758be441e64b94c6 (cherry picked from commit 7f86be997eea27bc994b25c4fb65d72b3d4567f9) --- doc/build/core/type_basics.rst | 2 ++ lib/sqlalchemy/sql/type_api.py | 5 +++++ 2 files changed, 7 insertions(+) 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_)}) -- 2.47.3