TOFU day? Okay, me too. ;) If I may cast a vote: yes, please add these 10 methods (if they are remotely connected to selecting or changing rows) and start with .filter(). I'm working with assign_mapped objects most the time and just have to use a completely different (Query) syntax if I want to .filter(). It's great that the .filter() exists and that Query has adopted the functionality of SelectResults. But even if it would be extra work I'd love to see the methods be available both for the bare Query object as well as for a mapped class. That keeped my code more consistent. Otherwise I'll probably stop using assign_mapper - what would a pity - for not having to explain to my coworkers why using two different way to play with the database.
Christoph On Thu, May 31, 2007 at 08:47:01PM -0700, Michael Bayer wrote: > heres the question. Query gets 10 new methods one day. do we then > add 10 methods to assign_mapper() ? must the user class be a total > clone of Query ? assign_mapper just bugs me for this reason. hence > i like entity.query() better. im not sure which one youre saying you > prefer ? > > On May 31, 5:46 pm, "Mike Orr" <[EMAIL PROTECTED]> wrote: > > What are future plans for the assign_mapper query methods? > > > > MyClass.select(...) > > -- works great. A clear advantage for assign_mapper over the > > regular mapper. > > > > MyClass.filter(...) > > -- doesn't exist. > > > > MyClass.query().filter(...) > > -- works but is undocumented and requires a convoluted monkeypatch > > in the source. Not so clear an advantage over the regular mapper > > because it's so verbose. > > > > The third is the one I've found most useful. That way I can have > > functions that return a Query, and the caller can call .select(), > > .select(offset=,limit=), or .count() as they wish. > > > > -- > > Mike Orr <[EMAIL PROTECTED]> > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---