Re: [SQLObject] Tricky select with computed value
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Iwan V. <iw...@re...> - 2009-02-02 14:57:00
|
On Mon, 2009-02-02 at 17:12 +0300, Oleg Broytmann wrote: > 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")) Great, thanks Oleg, that works. -i |