]> 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:19 +0000 (11:57 -0400)
commite4a5da1c5a4ed038c1c28f236e2e963b27554549
tree33c4407fcf735412959c8b657a035848bc88013e
parent567ee8d6a90a150e5079fc6d1cdad2734172e2e7
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
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