diff options
author | Damian Dimmich <damian@tauri-tec.com> | 2014-06-28 23:11:03 +0400 |
---|---|---|
committer | Damian Dimmich <damian@tauri-tec.com> | 2014-06-28 23:11:03 +0400 |
commit | 4eca136e0914252a291046d8c2ed281fe6c56d94 (patch) | |
tree | 910f821dd5ed19f2b6e0542e99fb6fac4b861a53 /lib/sqlalchemy/dialects/postgresql/json.py | |
parent | 4e5fcee975040d6d82baceb8e0535a548411faa6 (diff) | |
download | sqlalchemy-4eca136e0914252a291046d8c2ed281fe6c56d94.tar.gz |
minor cleanup of the jsonb - had extraneous operators that where copied
from hstore that don't apply.
Add tests for ? and @> operators.
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/json.py')
-rw-r--r-- | lib/sqlalchemy/dialects/postgresql/json.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/json.py b/lib/sqlalchemy/dialects/postgresql/json.py index 262ec20bd..183cb2695 100644 --- a/lib/sqlalchemy/dialects/postgresql/json.py +++ b/lib/sqlalchemy/dialects/postgresql/json.py @@ -280,7 +280,7 @@ class JSONB(JSON): def _adapt_expression(self, op, other_comparator): if isinstance(op, custom_op): - if op.opstring in ['?', '?&', '?|', '@>', '<@']: + if op.opstring in ['?', '@>']: return op, sqltypes.Boolean if op.opstring == '->': return op, sqltypes.Text @@ -299,8 +299,4 @@ class JSONB(JSON): """ return self.expr.op('@>')(other) - - - - ischema_names['jsonb'] = JSONB
\ No newline at end of file |