summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql
diff options
context:
space:
mode:
authorJeong YunWon <jeong@youknowone.org>2016-04-11 23:16:04 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2016-06-15 13:05:21 -0400
commit0620a76b582cc93d55e3ddfb74ac22682e148a36 (patch)
treef3a5b97fb769ca380d5d0d27becfda5910c6fefa /lib/sqlalchemy/sql
parentcfb59ecc9bbd2f5040dd5bb8c82491851b186681 (diff)
downloadsqlalchemy-0620a76b582cc93d55e3ddfb74ac22682e148a36.tar.gz
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 <mike_mp@zzzcomputing.com> Change-Id: I238c23131e4fded5dc7f7a25eb02e26008099d00 Pull-request: https://github.com/zzzeek/sqlalchemy/pull/235
Diffstat (limited to 'lib/sqlalchemy/sql')
-rw-r--r--lib/sqlalchemy/sql/sqltypes.py4
1 files changed, 4 insertions, 0 deletions
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
@@ -1809,6 +1809,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