diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2022-09-13 11:00:46 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2022-09-13 11:18:19 -0400 |
commit | 14b634d7065446d146456eed006c4969a7972b1a (patch) | |
tree | aa94ea605196a585de4b43f195df9db143133a0f /lib/sqlalchemy/dialects/postgresql/array.py | |
parent | 479dbc99e7fc5a60f846992c0cca8542047a8933 (diff) | |
download | sqlalchemy-14b634d7065446d146456eed006c4969a7972b1a.tar.gz |
Add type awareness to evaluator
Fixed regression where using ORM update() with synchronize_session='fetch'
would fail due to the use of evaluators that are now used to determine the
in-Python value for expressions in the the SET clause when refreshing
objects; if the evaluators make use of math operators against non-numeric
values such as PostgreSQL JSONB, the non-evaluable condition would fail to
be detected correctly. The evaluator now limits the use of math mutation
operators to numeric types only, with the exception of "+" that continues
to work for strings as well. SQLAlchemy 2.0 may alter this further by
fetching the SET values completely rather than using evaluation.
Fixes: #8507
Change-Id: Icf7120ccbf4266499df6bb3e05159c9f50971d69
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/array.py')
0 files changed, 0 insertions, 0 deletions