On May 30, 2:06 pm, Michael Bayer <[EMAIL PROTECTED]> wrote:
> On May 30, 2007, at 4:50 PM, Eric Ongerth wrote:
> > Is there a way to, uh, de-generate a query?  E.g.,
> > ...
> > As it stands now, this is not actually difficult to do: I just store a
> > set of filters that have been added so far, and when the user clears
> > one of the search field boxes, the query is rebuilt from scratch with
> > all of the other stored filters, just without the one corresponding to
> > the newly unrestricted column.
>
> thats the way it should be done.  dont try to make SA, which is
> decidedly a library, the framework for your application.

<sigh> You're so right, of course.

> oh, come on :)  just use q0.

That would be great, but if the user adds six filters then removes
three of them in random order, it's not clear which saved query (if I
saved snapshots of the query through each level of adding filters to
it) to go back to.  So I'll just stick with rebuilding it from my
saved dict of criteria.

I appreciate the insight. Thanks.


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to