From fb991a4474fa0d4df69af10a808fe234016c6a52 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Wed, 13 Jun 2018 17:48:51 -0400 Subject: Add use_nchar_for_unicode flag; don't use nchar types for generic unicode The Oracle dialect will no longer use the NCHAR/NCLOB datatypes to represent generic unicode strings or clob fields in conjunction with :class:`.Unicode` and :class:`.UnicodeText` unless the flag ``use_nchar_for_unicode=True`` is passed to :func:`.create_engine`. Additionally, string types under Oracle now coerce to unicode under Python 2 in all cases, however unlike in previous iterations, we use SQLAlchemy's native unicode handlers which are very performant (when C extensions are enabled; when they are not, we use cx_Oracle's handlers). Change-Id: I3939012e9396520875bc52e69bf81f27393836ee Fixes: #4242 --- lib/sqlalchemy/engine/default.py | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/sqlalchemy/engine/default.py') diff --git a/lib/sqlalchemy/engine/default.py b/lib/sqlalchemy/engine/default.py index aa524cd51..f48217a4e 100644 --- a/lib/sqlalchemy/engine/default.py +++ b/lib/sqlalchemy/engine/default.py @@ -1135,6 +1135,7 @@ class DefaultExecutionContext(interfaces.ExecutionContext): dialect_impl = bindparam.type._unwrapped_dialect_impl(self.dialect) dialect_impl_cls = type(dialect_impl) dbtype = dialect_impl.get_dbapi_type(self.dialect.dbapi) + if dbtype is not None and ( not exclude_types or dbtype not in exclude_types and dialect_impl_cls not in exclude_types -- cgit v1.2.1