improved oparsing of CLOB in Oracle, thanks Daniel
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 2.00.0 (2012-08-24 09:15:19) dev
|
Version 2.00.0 (2012-08-24 09:23:07) dev
|
||||||
|
|||||||
@@ -2735,6 +2735,14 @@ class OracleAdapter(BaseAdapter):
|
|||||||
self.execute('SELECT %s.currval FROM dual;' % sequence_name)
|
self.execute('SELECT %s.currval FROM dual;' % sequence_name)
|
||||||
return int(self.cursor.fetchone()[0])
|
return int(self.cursor.fetchone()[0])
|
||||||
|
|
||||||
|
def parse_value(self, value, field_type, blob_decode=True):
|
||||||
|
if blob_decode and isinstance(value, cx_Oracle.LOB):
|
||||||
|
try:
|
||||||
|
value = value.read()
|
||||||
|
except cx_Oracle.ProgrammingError:
|
||||||
|
# After a subsequent fetch the LOB value is not valid anymore
|
||||||
|
pass
|
||||||
|
return BaseAdapter.parse_value(self, value, field_type, blob_decode)
|
||||||
|
|
||||||
class MSSQLAdapter(BaseAdapter):
|
class MSSQLAdapter(BaseAdapter):
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user