]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Return given type when it matches the adaptation
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 26 Jun 2017 16:44:15 +0000 (12:44 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 26 Jun 2017 16:46:53 +0000 (12:46 -0400)
commitfae82dda00aaba597deae862088f15c9b5255716
tree242f1b858fbf9ce37d2394cb066d28b089b4ab02
parente04594339c19c3cd8b8e0d96ce83e5ded961dbb7
Return given type when it matches the adaptation

The rules for type coercion between :class:`.Numeric`, :class:`.Integer`,
and date-related types now include additional logic that will attempt
to preserve the settings of the incoming type on the "resolved" type.
Currently the target for this is the ``asdecimal`` flag, so that
a math operation between :class:`.Numeric` or :class:`.Float` and
:class:`.Integer` will preserve the "asdecimal" flag as well as
if the type should be the :class:`.Float` subclass.

Change-Id: Idfaba17220d6db21ca1ca4dcb4c19834cd397817
Fixes: #4018
doc/build/changelog/changelog_12.rst
doc/build/changelog/migration_12.rst
lib/sqlalchemy/sql/sqltypes.py
test/sql/test_types.py