Would it make sense to instead give users an option to "filter" driver specific data to jdbc standard?
e.g.
conn = connect('oracle.jdbc.OracleDriver', ['jdbc:oracle:thin:@//foo:1521/bar'], jdbc_converters=dict(TIMESTAMP=lambda x: x.toJdbc()))
If fact, since we know this driver specific issue, we may have this map in the dbapi2 module itself:
jdbc_converters = { 'oracle.jdbc.OracleDriver': { 'TIMESTAMP': lambda x: x.toJdbc() } }
Your converter logic can then check if there is an additional jdbc converter required for a specific driver before doing the usual processing.
Since all we are doing here is converting Oracle specific data to a standardized jdbc data, we would normally just need:
def your_ora_ todatetime( java_val) : java_val)
java_val = java_val.toJdbc()
return _todatetime(
Would it make sense to instead give users an option to "filter" driver specific data to jdbc standard?
e.g. 'oracle. jdbc.OracleDriv er', ['jdbc: oracle: thin:@/ /foo:1521/ bar'],
jdbc_ converters= dict(TIMESTAMP= lambda x: x.toJdbc()))
conn = connect(
If fact, since we know this driver specific issue, we may have this map in the dbapi2 module itself: converters = {
' oracle. jdbc.OracleDriv er': {
'TIMESTAMP' : lambda x: x.toJdbc()
}
}
jdbc_
Your converter logic can then check if there is an additional jdbc converter required for a specific driver before doing the usual processing.