From 62d59088dfe86d7ecabd85ad626ee108b668acc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ilja=20Everil=C3=A4?= Date: Thu, 15 Mar 2018 10:18:13 -0400 Subject: Sqlite json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added support for SQLite's json functionality via the new SQLite implementation for :class:`.sqltypes.JSON`, :class:`.sqlite.JSON`. The name used for the type is ``JSON``, following an example found at SQLite's own documentation. Pull request courtesy Ilja Everilä. Fixes: #3850 Change-Id: I3d2714fb8655343a99d13dc751b16b93d05d7dda Pull-request: https://github.com/zzzeek/sqlalchemy/pull/434 --- lib/sqlalchemy/sql/sqltypes.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'lib/sqlalchemy/sql') diff --git a/lib/sqlalchemy/sql/sqltypes.py b/lib/sqlalchemy/sql/sqltypes.py index a2ae9de50..08af78606 100644 --- a/lib/sqlalchemy/sql/sqltypes.py +++ b/lib/sqlalchemy/sql/sqltypes.py @@ -1834,8 +1834,13 @@ class JSON(Indexable, TypeEngine): .. note:: :class:`.types.JSON` is provided as a facade for vendor-specific JSON types. Since it supports JSON SQL operations, it only - works on backends that have an actual JSON type, currently - PostgreSQL as well as certain versions of MySQL. + works on backends that have an actual JSON type, currently: + + * PostgreSQL + + * MySQL as of version 5.7 (MariaDB as of the 10.2 series does not) + + * SQLite as of version 3.9 :class:`.types.JSON` is part of the Core in support of the growing popularity of native JSON datatypes. -- cgit v1.2.1