> svilen ha scritto:
> > on a side note, here or for the query(), once i add .order_by()
> > and similar, will be a possibility to remove/cancel them?
> > e.g. .order_by(None) - similar to .join(None)?
> >
> > or should i keep a copy at the point before adding .order_by()?
> >
> > e.g.
> >  i want:
> >  q1 = query.filter( ...).order_by(z)    #the final most used
> > query ...
> >  q2 = q1.order_by(None)        #used sometimes e.g. for count
> >
> > vs
> >  i could do:
> >  q0 = query.filter( ...)     #saved
> >  q1 = q0.clone().order_by(z) #the final most used query
> >  ...
> >  q2 = q0                     #used sometimes e.g. for count
>
> and why not
>
> q = query.filter(...)
> q1 = q.order_by(z)
> ...
> q2 = q
>
> ??
because q1 with the order is _the_ query, made at point A somewhen, 
and stored there as a construct; much later at some point B i need to 
use that query but without the ordering - now i have to keep 2 copies 
of the query, w/ and w/out order. And this strip-the-ordering could 
be generic, applicable to any query...


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