From 0c7a867ac73f1ed0ecfa134e907654fd4f7c084b Mon Sep 17 00:00:00 2001 From: Gord Thompson Date: Sat, 1 Aug 2020 15:56:12 -0600 Subject: Add JSON support for mssql Added support for the :class:`_types.JSON` datatype on the SQL Server dialect using the :class:`_mssql.JSON` implementation, which implements SQL Server's JSON functionality against the ``NVARCHAR(max)`` datatype as per SQL Server documentation. Implementation courtesy Gord Thompson. Fixes: #4384 Change-Id: I28af79a4d8fafaa68ea032228609bba727784f18 --- lib/sqlalchemy/dialects/sqlite/json.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'lib/sqlalchemy/dialects/sqlite') diff --git a/lib/sqlalchemy/dialects/sqlite/json.py b/lib/sqlalchemy/dialects/sqlite/json.py index 775f557f8..fadec3ce3 100644 --- a/lib/sqlalchemy/dialects/sqlite/json.py +++ b/lib/sqlalchemy/dialects/sqlite/json.py @@ -9,6 +9,14 @@ class JSON(sqltypes.JSON): `loadable extension `_ and as such may not be available, or may require run-time loading. + :class:`_sqlite.JSON` is used automatically whenever the base + :class:`_types.JSON` datatype is used against a SQLite backend. + + .. seealso:: + + :class:`_types.JSON` - main documenation for the generic + cross-platform JSON datatype. + The :class:`_sqlite.JSON` type supports persistence of JSON values as well as the core index operations provided by :class:`_types.JSON` datatype, by adapting the operations to render the ``JSON_EXTRACT`` @@ -16,11 +24,9 @@ class JSON(sqltypes.JSON): Extracted values are quoted in order to ensure that the results are always JSON string values. - .. versionadded:: 1.3 - .. seealso:: + .. versionadded:: 1.3 - JSON1_ .. _JSON1: https://www.sqlite.org/json1.html -- cgit v1.2.1