Re: [SQLObject] Tricky select with computed value
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Oleg B. <ph...@ph...> - 2009-02-02 14:12:39
|
On Mon, Feb 02, 2009 at 03:22:05PM +0200, Iwan Vosloo wrote: > Article.select("(age(article.published_date)) < (article.running_time * > '1 day'::interval)") Try from sqlobject.sqlbuilder import func, SQLConstant Article.select(func.age(Article.q.publishedDate) < Article.q.runningTime * SQLConst("'1 day'::interval")) Oleg. -- Oleg Broytmann http://phd.pp.ru/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |