server/sqlutils.py
changeset 8139 f9ebb6d1abc3
parent 7907 08320697ca1a
child 8755 1f3757ef3762
--- a/server/sqlutils.py	Wed Dec 21 18:04:07 2011 +0100
+++ b/server/sqlutils.py	Wed Dec 21 18:26:35 2011 +0100
@@ -214,31 +214,11 @@
         # callback lookup for each *cell* in results when there is nothing to
         # lookup
         if not column_callbacks:
-            return self._process_result(cursor)
+            return self.dbhelper.dbapi_module.process_cursor(cursor, self._dbencoding,
+                                                             Binary)
         assert session
         return self._cb_process_result(cursor, column_callbacks, session)
 
-    def _process_result(self, cursor):
-        # begin bind to locals for optimization
-        descr = cursor.description
-        encoding = self._dbencoding
-        process_value = self._process_value
-        binary = Binary
-        # /end
-        cursor.arraysize = 100
-        while True:
-            results = cursor.fetchmany()
-            if not results:
-                break
-            for line in results:
-                result = []
-                for col, value in enumerate(line):
-                    if value is None:
-                        result.append(value)
-                        continue
-                    result.append(process_value(value, descr[col], encoding, binary))
-                yield result
-
     def _cb_process_result(self, cursor, column_callbacks, session):
         # begin bind to locals for optimization
         descr = cursor.description