Jorge Godoy schrieb:
> "Diez B. Roggisch" <[EMAIL PROTECTED]> writes:
> 
>> To be honest: I wasn't aware of it. But then, more complicated queries 
>> might need OR'ed expressions and joins for sorting. So - I guess it depends.
> 
> The filter creates ANDs.  :-)  To have ORs you can write the query by hand or:

Writing it by hand was exactly what I did...

>     results = model.class.select()
>     filtered_1 = results.filter(condition_1)
>     filtered_2 = results.filter(condition_2)
> 
> Then, an OR is equivalent to both sets of results (condition_1 OR
> condition_2). 
> 
> Remember boolean algebra ;-)

I certainly do, but having it executed in the DB, especially with 
sort-criteria and distinct results combined is better - remember, 
context switches and efficiency...

Diez

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to