]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
call setinputsizes() for integer types
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 18 May 2018 16:51:40 +0000 (12:51 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 18 May 2018 23:29:16 +0000 (19:29 -0400)
commitc7ae04d1c5c4aa6c6099584ae386d6ab9ef7b290
tree96f7e6fa64fc7e693018a5f46afe6561d8e401b7
parentd2bacad469c0b07cc707b563e37e835abcf96eb8
call setinputsizes() for integer types

Altered the Oracle dialect such that when an :class:`.Integer` type is in
use, the cx_Oracle.NUMERIC type is set up for setinputsizes().  In
SQLAlchemy 1.1 and earlier, cx_Oracle.NUMERIC was passed for all numeric
types unconditionally, and in 1.2 this was removed to allow for better
numeric precision.  However, for integers, some database/client setups
will fail to coerce boolean values True/False into integers which introduces
regressive behavior when using SQLAlchemy 1.2.  Overall, the setinputsizes
logic seems like it will need a lot more flexibility going forward so this
is a start for that.

Change-Id: Ida80cc2c2c37ffc0e05da4b5df2dadfab55a01f2
Fixes: #4259
doc/build/changelog/unreleased_12/4259.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/oracle/cx_oracle.py
lib/sqlalchemy/engine/default.py
test/dialect/oracle/test_types.py