From 0620a76b582cc93d55e3ddfb74ac22682e148a36 Mon Sep 17 00:00:00 2001 From: Jeong YunWon Date: Mon, 11 Apr 2016 23:16:04 -0400 Subject: Add `sqlalchemy.ext.index` for indexed attributes for ORM Add `sqlalchemy.ext.index.index_property` which subscribe an index of a column with `Indexable` type. Co-authored-by: Mike Bayer Change-Id: I238c23131e4fded5dc7f7a25eb02e26008099d00 Pull-request: https://github.com/zzzeek/sqlalchemy/pull/235 --- lib/sqlalchemy/sql/sqltypes.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/sqlalchemy/sql') diff --git a/lib/sqlalchemy/sql/sqltypes.py b/lib/sqlalchemy/sql/sqltypes.py index 81630fe4f..166e61822 100644 --- a/lib/sqlalchemy/sql/sqltypes.py +++ b/lib/sqlalchemy/sql/sqltypes.py @@ -1808,6 +1808,10 @@ class JSON(Indexable, TypeEngine): comparator_factory = Comparator + @property + def python_type(self): + return dict + @property def should_evaluate_none(self): return not self.none_as_null -- cgit v1.2.1