]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
call setinputsizes for cx_Oracle.DATETIME
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 3 Oct 2019 18:09:54 +0000 (14:09 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 3 Oct 2019 19:03:35 +0000 (15:03 -0400)
commit4ab16144b077dbb7691c814c144d77b44ba8d738
tree55c83399f787f4db9d1dfb6b05309dc714c2624d
parent5188afe8703b7c8e03086d3898a4f44038316a57
call setinputsizes for cx_Oracle.DATETIME

Restored adding cx_Oracle.DATETIME to the setinputsizes() call when a
SQLAlchemy :class:`.Date`, :class:`.DateTime` or :class:`.Time` datatype is
used, so that in the case where a bound parameter is passed as NULL
in some complex queries (in particular this happens with some lazy load
situations), the type is still present.  This was removed
in the 1.2 series for arbitrary reasons.

Also adds a suite test for this generic situation.

What's not clear is that do we really need setinputsizes() for all
datatypes if we are supporting NULL in bound parameters.

Fixes: #4886
Change-Id: If99215c31861f9ea6f60a30d47f2f320adc4797f
(cherry picked from commit e21afbcd8c78e4e3f9400da1a2565472682de825)
doc/build/changelog/unreleased_13/4886.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/oracle/cx_oracle.py
lib/sqlalchemy/testing/requirements.py
lib/sqlalchemy/testing/suite/test_types.py