]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Add do_setinputsizes event for cx_Oracle
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 26 Jun 2018 20:53:51 +0000 (16:53 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 27 Jun 2018 18:37:55 +0000 (14:37 -0400)
commit9cc8bff5b73a60c39469040b0f6e8df4e757671e
treecb32b27c6cf7cc9ef0fcc49198e598c0b91d9064
parent199b483ae02653e8178a2b055737401da8c243af
Add do_setinputsizes event for cx_Oracle

Added a new event currently used only by the cx_Oracle dialect,
:meth:`.DialectEvents.setiputsizes`.  The event passes a dictionary of
:class:`.BindParameter` objects to DBAPI-specific type objects that will be
passed, after conversion to parameter names, to the cx_Oracle
``cursor.setinputsizes()`` method.  This allows both visibility into the
setinputsizes process as well as the ability to alter the behavior of what
datatypes are passed to this method.

Change-Id: I43b97c8e3c840cad6f01edb274dc9cfed19cb5fc
Fixes: #4290
(cherry picked from commit c270efdfb38a266ac042be2a0d11b6ff7e5ee619)
doc/build/changelog/unreleased_12/4290.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/oracle/cx_oracle.py
lib/sqlalchemy/engine/default.py
lib/sqlalchemy/events.py
test/dialect/oracle/test_types.py