diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2016-11-22 15:36:32 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2016-11-22 16:39:16 -0500 |
commit | df9b6492e5ca47e26d539d2283fa816a2d5c8ad6 (patch) | |
tree | bf85a7744760077d38d9ad59043c68d95d80321c /lib/sqlalchemy/dialects/postgresql/base.py | |
parent | 7de0d1785335961ce0f723877ca7a8fd85b2c0ca (diff) | |
download | sqlalchemy-df9b6492e5ca47e26d539d2283fa816a2d5c8ad6.tar.gz |
Ensure Variant passes along impl right-hand type
Fixed issue in :class:`.Variant` where the "right hand coercion" logic,
inherited from :class:`.TypeDecorator`, would
coerce the right-hand side into the :class:`.Variant` itself, rather than
what the default type for the :class:`.Variant` would do. In the
case of :class:`.Variant`, we want the type to act mostly like the base
type so the default logic of :class:`.TypeDecorator` is now overridden
to fall back to the underlying wrapped type's logic. Is mostly relevant
for JSON at the moment.
This patch additionally adds documentation and basic tests to allow
for backend-agnostic comparison of JSON index elements to other objects.
A future version should attempt to improve upon this by providing
"astext", "asint" types of operators.
Change-Id: I7b7b45d604a4ae8d1dc236a5a1248695aab5232e
Fixes: #3859
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/base.py')
0 files changed, 0 insertions, 0 deletions