Re: [SQLObject] PATCH: adds support for an interval timedelta column
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Oleg B. <ph...@ph...> - 2009-05-15 17:43:48
|
On Fri, May 15, 2009 at 10:09:01AM -0700, Daniel Fetchinson wrote: > Actually, I think TimedeltaCol could be implemented for sqlite as > well. Although it doesn't have an INTERVAL data type it could use a > plain TEXT instead and python would do the conversion. As far as I > know sqlite only knows TEXT anyway so IntCol, StringCol, etc, all > these things are implemented as TEXT and the data conversion is done > by python. The TimedeltaCol could be similar. Well, not exactly - SQLite understands and produces some data types - pysqlite passes them unmodified AFAIU. But anyway I did a similar trick with DecimalStringCol - it stores decimals as strings to work around SQLite's "type affinity" feature. Oleg. -- Oleg Broytmann http://phd.pp.ru/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |