From 31f80b9eaeb3c3435b7f6679b41e434478b1d11c Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Fri, 1 Sep 2017 00:11:10 -0400 Subject: Refactor for cx_Oracle version 6 Drops support for cx_Oracle prior to version 5.x, reworks numeric and binary support. Fixes: #4064 Change-Id: Ib9ae9aba430c15cd2a6eeb4e5e3fd8e97b5fe480 --- lib/sqlalchemy/sql/type_api.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib/sqlalchemy/sql') diff --git a/lib/sqlalchemy/sql/type_api.py b/lib/sqlalchemy/sql/type_api.py index 69dd80938..89c2c9de5 100644 --- a/lib/sqlalchemy/sql/type_api.py +++ b/lib/sqlalchemy/sql/type_api.py @@ -477,6 +477,15 @@ class TypeEngine(Visitable): d[coltype] = rp = d['impl'].result_processor(dialect, coltype) return rp + def _cached_custom_processor(self, dialect, key, fn): + try: + return dialect._type_memos[self][key] + except KeyError: + d = self._dialect_info(dialect) + impl = d['impl'] + d[key] = result = fn(impl) + return result + def _dialect_info(self, dialect): """Return a dialect-specific registry which caches a dialect-specific implementation, bind processing -- cgit v1.2.1