>I also don't like #251 that much, but I'd take it over the >scary
>undocumented "_or" we've got now (and over raw SQL, >which sucks).

How about another solution to expression combination: wrapping query
expressions (the field__exact and friends) optionally in Query()
objects that implement __or__ and __and__ - that way you can do
Query(field__exact=blah)||Query(field__exact=blubb).

I did something like this for my active storage framework (a rather
weird database thingy - don't ask) and it worked quite nice. You would
need to extend the get_list() and friends to check for a parameter that
isinstance(Query) and than "compile" the query expression to SQL.

bye, Georg

Reply via email to