Hello!
On Wed, May 13, 2009 at 07:11:22PM +0000, Matthew Wilson wrote:
> Hi -- I wrote some code to add a TimedeltaCol type. I only tested it in
> postgresql.
I applied both your patches to the trunk, commit 4088. Thank you! Sorry
it took so long.
> By the way, how do I write a converter that converts a python object one
> way for one database (sqlite) and another way for another database
> (postgres)? Are there any examples of this already?
> +def TimedeltaConverter(value, db):
> +
> + return """INTERVAL '%d days %d seconds'""" % \
> + (value.days, value.seconds)
db is the name of the database. See StringLikeConverter for an example.
Oleg.
--
Oleg Broytman http://phd.pp.ru/ ph...@ph...
Programmers don't die, they just GOSUB without RETURN.
|