]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Use cx_Oracle.FIXED_NCHAR for sqltypes.NCHAR
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 15 Oct 2019 01:53:44 +0000 (21:53 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 15 Oct 2019 15:57:31 +0000 (11:57 -0400)
commit99b292c5c51bf80b16ccfa5aa44161f2edd0e486
tree7ced64867d103c858cd545ee32b8c4e024e2f13a
parent5fb472e66c21c1ba855c637e3370f77bb5cf9efa
Use cx_Oracle.FIXED_NCHAR for sqltypes.NCHAR

The :class:`.sqltypes.NCHAR` datatype will now bind to the
``cx_Oracle.FIXED_NCHAR`` DBAPI data bindings when used in a bound
parameter, which supplies proper comparison behavior against a
variable-length string.  Previously, the :class:`.sqltypes.NCHAR` datatype
would bind to ``cx_oracle.NCHAR`` which is not fixed length; the
:class:`.sqltypes.CHAR` datatype already binds to ``cx_Oracle.FIXED_CHAR``
so it is now consistent that :class:`.sqltypes.NCHAR` binds to
``cx_Oracle.FIXED_NCHAR``.

Fixes: #4913
Change-Id: I5bb111f2e06bbdd525bc5f716579baad31bbb3db
(cherry picked from commit e4a5da1c5a4ed038c1c28f236e2e963b27554549)
doc/build/changelog/unreleased_13/4913.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/oracle/cx_oracle.py
test/dialect/oracle/test_types.py