[sqlalchemy] Re: interval data type

2006-12-03 Thread Manlio Perillo
Michael Bayer ha scritto: > > Manlio Perillo wrote: >> For now I'm using this: >> >> class TimeDelta(types.TypeEngine): >> def __init__(self, precision=6): >> self.precision = precision >> >> def get_col_spec(self): >> return "INTERVAL(%(precision)s)" % {'precision': s

[sqlalchemy] Re: interval data type

2006-12-03 Thread Michael Bayer
Manlio Perillo wrote: > For now I'm using this: > > class TimeDelta(types.TypeEngine): > def __init__(self, precision=6): > self.precision = precision > > def get_col_spec(self): > return "INTERVAL(%(precision)s)" % {'precision': self.precision} > does psycopg2 take/

[sqlalchemy] Re: interval data type

2006-12-03 Thread Manlio Perillo
Michael Bayer ha scritto: > ive never seen this type used before but it appears to be part of the > SQL standard, so if someone submits a patch it will go in. > psycopg2 support interval out of the box, so adding support for it should be very easy (I'm not able to submit a patch since I'm not a

[sqlalchemy] Re: interval data type

2006-12-01 Thread Manlio Perillo
Rick Morrison ha scritto: > That's going to be a tough one - date interval support is pretty spotty > and has widely varying implementations among the databases that SA targets. > I have written a simple implementation for SQLite, but using ISO 8601 format. Now I'm going to add support for th

[sqlalchemy] Re: interval data type

2006-12-01 Thread Rick Morrison
That's going to be a tough one - date interval support is pretty spotty and has widely varying implementations among the databases that SA targets. That said, I would love to see some sort of SA plugin or extension that attempted to ease database independence by somehow normalizing some of the myr

[sqlalchemy] Re: interval data type

2006-12-01 Thread Michael Bayer
ive never seen this type used before but it appears to be part of the SQL standard, so if someone submits a patch it will go in. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this g