auto_convert_lobs=False should pass through LOB in all cases

Issue #1178 resolved
Mike Bayer repo owner created an issue

patch:

Index: lib/sqlalchemy/databases/oracle.py
===================================================================
--- lib/sqlalchemy/databases/oracle.py  (revision 5124)
+++ lib/sqlalchemy/databases/oracle.py  (working copy)
@@ -93,6 +93,9 @@

     def result_processor(self, dialect):
         super_process = super(OracleText, self).result_processor(dialect)
+        if not dialect.auto_convert_lobs:
+            return super_process
+
         lob = dialect.dbapi.LOB
         def process(value):
             if isinstance(value, lob):
@@ -123,6 +126,9 @@
         return None

     def result_processor(self, dialect):
+        if not dialect.auto_convert_lobs:
+            return None
+            
         lob = dialect.dbapi.LOB
         def process(value):
             if isinstance(value, lob):
Index: CHANGES
===================================================================
--- CHANGES (revision 5124)
+++ CHANGES (working copy)
@@ -33,6 +33,10 @@
       than strptime/strftime, to generically support
       pre-1900 dates, dates with microseconds.  #968

+- oracle
+    - Setting the auto_convert_lobs flag to False on 
+      create_engine() will also instruct the OracleBinary type
+      to return the cx_oracle LOB object unchanged.

 0.5.0rc1
 ========

Comments (2)

  1. Log in to comment