diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-12-17 15:13:39 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-12-17 15:13:39 -0500 |
commit | 73013914e7eae2a0480492ece085b48c5938dd84 (patch) | |
tree | 7a79331a1a2d868b83c020e0c0d1f2c83fe68f9c /lib/sqlalchemy/dialects/postgresql/psycopg2.py | |
parent | 10ac89cef3dafc7a23c8947255f26d60db2c4d84 (diff) | |
download | sqlalchemy-73013914e7eae2a0480492ece085b48c5938dd84.tar.gz |
- rework JSON expressions to be based off __getitem__ exclusively
- add support for "standalone" JSON objects; this involves getting CAST
to upgrade the given type of a bound parameter. should add a core-only test
for this.
- add tests for "standalone" json round trips both with and without unicode
- add mechanism by which we remove psycopg2's "json" handler in order to get
the effect of using our non-native result handlers
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/psycopg2.py')
-rw-r--r-- | lib/sqlalchemy/dialects/postgresql/psycopg2.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/psycopg2.py b/lib/sqlalchemy/dialects/postgresql/psycopg2.py index 4a9248e5f..ceb04b580 100644 --- a/lib/sqlalchemy/dialects/postgresql/psycopg2.py +++ b/lib/sqlalchemy/dialects/postgresql/psycopg2.py @@ -179,7 +179,7 @@ from .base import PGDialect, PGCompiler, \ ENUM, ARRAY, _DECIMAL_TYPES, _FLOAT_TYPES,\ _INT_TYPES from .hstore import HSTORE -from .pgjson import JSON +from .json import JSON logger = logging.getLogger('sqlalchemy.dialects.postgresql') @@ -236,9 +236,7 @@ class _PGHStore(HSTORE): class _PGJSON(JSON): - # I've omitted the bind processor here because the method of serializing - # involves registering specific types to auto-serialize, and the adapter - # just a thin wrapper over json.dumps. + def result_processor(self, dialect, coltype): if dialect._has_native_json: return None |