On Monday 12 May 2008 18:12:39 Bobby Impollonia wrote: > I dont see how this: > cls.query.left_bracket().filter_or(cls.y == > 17).filter_or(cls.x==27).right_bracket() > is clearer than this: > cls.query.filter(or_(cls.y == 17, cls.x==27)) it's not. it's not about replacing the or_. noone should use it that way...
u have horses and owners with houses and hats. give me horses (whose owners have a hat of size 10 and color green) or (whose owners have a house of color red) or (have no tail) > On Mon, May 12, 2008 at 11:58 AM, <[EMAIL PROTECTED]> wrote: > > On Monday 12 May 2008 17:01:23 Michael Bayer wrote: > > > what does > > > q.filter(x==5).filter_or(x==9).filter(y=17).filter_or(x==27) > > > do ? (x=5 or x=9) and (y=17 or x=27) ? ((x=5 or x=9) and > > > y=17) or x=27 ? etc .. > > > > what pythons/C x==5 or x==9 and y==17 or x==27 does? > > > > i know... the parenthesises. cant we invent something? it's not > > for tomorrow... > > the resetjoinpoint is one possibility, and some > > left_bracket()/right_bracket() is another. > > another way is to be able to do boolean arithmetics over whole > > queries, maybe thats even better? > > > > query.or_( > > query.filter(this).join(that), query.filter(that).join(this) > > > > ) > > > > > On May 12, 2008, at 8:06 AM, [EMAIL PROTECTED] wrote: > > > > one thing that might go in a wishlist - query.filter_or() > > > > http://groups.google.com/group/sqlalchemy/browse_thread/thre > > > >ad/f6 798eb5ef2c0bfe should i make it into a ticket? > > > > > > > >> as you might have noticed we've merged 0.5 into the trunk. > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---