summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/sqlite/json.py
diff options
context:
space:
mode:
authorGord Thompson <gord@gordthompson.com>2020-08-01 15:56:12 -0600
committerMike Bayer <mike_mp@zzzcomputing.com>2020-08-19 11:05:52 -0400
commit0c7a867ac73f1ed0ecfa134e907654fd4f7c084b (patch)
treec645f7514e9f6b977b2440413b6572b40c0edbd5 /lib/sqlalchemy/dialects/sqlite/json.py
parent0901190bb440580f0664fe3f6310173762b908e0 (diff)
downloadsqlalchemy-0c7a867ac73f1ed0ecfa134e907654fd4f7c084b.tar.gz
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
Diffstat (limited to 'lib/sqlalchemy/dialects/sqlite/json.py')
-rw-r--r--lib/sqlalchemy/dialects/sqlite/json.py12
1 files changed, 9 insertions, 3 deletions
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 <https://www.sqlite.org/loadext.html>`_ 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