diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2018-06-13 17:48:51 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2018-09-22 21:34:32 -0400 |
| commit | fb991a4474fa0d4df69af10a808fe234016c6a52 (patch) | |
| tree | c4243c5a6f8f45b163adb87fc393d11dbed38bb2 /lib/sqlalchemy/engine | |
| parent | a4da6452c35daaa057acb895206b9104c2b70ac4 (diff) | |
| download | sqlalchemy-fb991a4474fa0d4df69af10a808fe234016c6a52.tar.gz | |
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
Diffstat (limited to 'lib/sqlalchemy/engine')
| -rw-r--r-- | lib/sqlalchemy/engine/default.py | 1 |
1 files changed, 1 insertions, 0 deletions
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 |
