which join are u mentioning? and which result u want to save?
the query itself or the objects it returns after execution?
q = query(Line).join( Fiber, ...condition ).filter()
if ... return q.filter( 123...)
else: return q.filter( 456...)
building that q is not expensive;
saving it is fine b
On Tue, Jan 20, 2009 at 8:24 AM, wrote:
>
> mmh, cant really grasp what u want to do.
> what are Line.* attributes?
>
> .filter does and(), so this can be simplified:
> q = query(Line).filter( models.Line.LineDiscarded == LineDiscarded )
> if ...:
> return q.filter( sites...)
> else:
> return q
mmh, cant really grasp what u want to do.
what are Line.* attributes?
.filter does and(), so this can be simplified:
q = query(Line).filter( models.Line.LineDiscarded == LineDiscarded )
if ...:
return q.filter( sites...)
else:
return q.filter( sites...)
On Monday 19 January 2009 23:28:55 boude