size, precision, scale):
# convert all NUMBER with precision + positive scale to Decimal
# this almost allows "native decimal" mode.
+
if self.supports_native_decimal and \
defaultType == cx_Oracle.NUMBER and \
precision and scale > 0:
def is_disconnect(self, e, connection, cursor):
error, = e.args
- if isinstance(e, self.dbapi.InterfaceError):
+ if isinstance(e, (
+ self.dbapi.InterfaceError, self.dbapi.DatabaseError)):
return "not connected" in str(e)
elif hasattr(error, 'code'):
# ORA-00028: your session has been killed
self.meta.drop_all()
self.engine.dispose()
+ @testing.crashes(
+ "oracle",
+ "cx_oracle 6 doesn't allow a close like this due to open cursors")
@testing.fails_if([
'+mysqlconnector', '+mysqldb', '+cymysql', '+pymysql', '+pg8000'],
"Buffers the result set and doesn't check for connection close")
such as 319438950232418390.273596, 87673.594069654243
"""
+ def cx_oracle_6_config(config):
+ return config.db.driver == "cx_oracle" and \
+ config.db.dialect.cx_oracle_ver >= (6, )
+
return fails_if(
- [('sqlite', None, None, 'TODO'),
+ [cx_oracle_6_config,
+ ('sqlite', None, None, 'TODO'),
("firebird", None, None, "Precision must be from 1 to 18"),
("sybase+pysybase", None, None, "TODO"),
('mssql+pymssql', None, None,