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': self.precision}
>>
> 
> does psycopg2 take/return a datetime.timedelta object for this ?
> 

Yes.
The problem is that this will only work with PostgreSQL and Oracle(?).

MySQL seems to have no support for INTERVAL data type, and for pysqlite2 
you have to write the parser/formatter.




Regards  Manlio Perillo

--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to