diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2017-09-01 00:11:10 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2017-09-11 14:17:10 -0400 |
commit | 31f80b9eaeb3c3435b7f6679b41e434478b1d11c (patch) | |
tree | 9802d4470d78768ba2a8812b47fae0f91e689d5c /lib/sqlalchemy/engine/result.py | |
parent | 4c97ea116c3686cb03f566f16b0a0e9a9fd33968 (diff) | |
download | sqlalchemy-oracle_numeric.tar.gz |
Refactor for cx_Oracle version 6oracle_numeric
Drops support for cx_Oracle prior to version 5.x, reworks
numeric and binary support.
Fixes: #4064
Change-Id: Ib9ae9aba430c15cd2a6eeb4e5e3fd8e97b5fe480
Diffstat (limited to 'lib/sqlalchemy/engine/result.py')
-rw-r--r-- | lib/sqlalchemy/engine/result.py | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/lib/sqlalchemy/engine/result.py b/lib/sqlalchemy/engine/result.py index 907dc7bd2..3aae932f2 100644 --- a/lib/sqlalchemy/engine/result.py +++ b/lib/sqlalchemy/engine/result.py @@ -447,7 +447,6 @@ class ResultMetaData(object): def _merge_textual_cols_by_position( self, context, cursor_description, result_columns): dialect = context.dialect - typemap = dialect.dbapi_type_map num_ctx_cols = len(result_columns) if result_columns else None if num_ctx_cols > len(cursor_description): @@ -470,14 +469,13 @@ class ResultMetaData(object): "in textual SQL: %r" % obj[0]) seen.add(obj[0]) else: - mapped_type = typemap.get(coltype, sqltypes.NULLTYPE) + mapped_type = sqltypes.NULLTYPE obj = None yield idx, colname, mapped_type, coltype, obj, untranslated def _merge_cols_by_name(self, context, cursor_description, result_columns): dialect = context.dialect - typemap = dialect.dbapi_type_map case_sensitive = dialect.case_sensitive result_map = self._create_result_map(result_columns, case_sensitive) @@ -487,7 +485,7 @@ class ResultMetaData(object): try: ctx_rec = result_map[colname] except KeyError: - mapped_type = typemap.get(coltype, sqltypes.NULLTYPE) + mapped_type = sqltypes.NULLTYPE obj = None else: obj = ctx_rec[1] @@ -496,11 +494,9 @@ class ResultMetaData(object): def _merge_cols_by_none(self, context, cursor_description): dialect = context.dialect - typemap = dialect.dbapi_type_map for idx, colname, untranslated, coltype in \ self._colnames_from_description(context, cursor_description): - mapped_type = typemap.get(coltype, sqltypes.NULLTYPE) - yield idx, colname, mapped_type, coltype, None, untranslated + yield idx, colname, sqltypes.NULLTYPE, coltype, None, untranslated @classmethod def _create_result_map(cls, result_columns, case_sensitive=True): @@ -1385,8 +1381,10 @@ class BufferedColumnResultProxy(ResultProxy): fetchone() is called. If fetchmany() or fetchall() are called, the full grid of results is fetched. This is to operate with databases where result rows contain "live" results that fall out - of scope unless explicitly fetched. Currently this includes - cx_Oracle LOB objects. + of scope unless explicitly fetched. + + .. versionchanged:: 1.2 This :class:`.ResultProxy` is not used by + any SQLAlchemy-included dialects. """ |