Re: [sqlalchemy] Help with a custom "seconds_interval()" construct

2016-05-31 Thread Kent Bower
Thanks Mike. I'm not sure FunctionElement is most appropriate or if Interval() is the best "type," but for future readers, as a recipe, this seems to work: class seconds_interval(FunctionElement): type = Interval() name = 'seconds' def __init__(self, *args, **kwargs):

Re: [sqlalchemy] Help with a custom "seconds_interval()" construct

2016-05-29 Thread Mike Bayer
On 05/28/2016 09:44 AM, Kent wrote: I'm interested in being able to use second time intervals on PostgreSQL, Oracle 8 /and /modern Oracle versions, agnostically. The native python timedelta works great for the postgres and cx_Oracle drivers. However /cx_Oracle connected to Oracle 8 won't

[sqlalchemy] Help with a custom "seconds_interval()" construct

2016-05-28 Thread Kent
I'm interested in being able to use second time intervals on PostgreSQL, Oracle 8 *and *modern Oracle versions, agnostically. The native python timedelta works great for the postgres and cx_Oracle drivers. However *cx_Oracle connected to Oracle 8 won't support this* so I'm building my own