From 19b88028924de7016c3792fb0d868dd713644078 Mon Sep 17 00:00:00 2001 From: Philip Jenvey Date: Tue, 18 Aug 2009 05:30:50 +0000 Subject: [PATCH] fix oracle+zxjdbc asdecimal conversions --- lib/sqlalchemy/dialects/oracle/zxjdbc.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/sqlalchemy/dialects/oracle/zxjdbc.py b/lib/sqlalchemy/dialects/oracle/zxjdbc.py index 8969ebdcf1..b42629feb3 100644 --- a/lib/sqlalchemy/dialects/oracle/zxjdbc.py +++ b/lib/sqlalchemy/dialects/oracle/zxjdbc.py @@ -33,14 +33,18 @@ class _JDBCNumeric(sqltypes.Numeric): def result_processor(self, dialect): if self.asdecimal: - return None + def process(value): + if isinstance(value, decimal.Decimal): + return value + else: + return decimal.Decimal(str(value)) else: def process(value): if isinstance(value, decimal.Decimal): return float(value) else: return value - return process + return process class Oracle_jdbcCompiler(OracleCompiler): -- 2.47.3