On Thursday, February 25, 2016 at 2:33:13 PM UTC+1, Simon King wrote:

Maybe I'm not understanding your question properly. The return value from 
> query.all() is a plain python list. You're asking for it to return a 
> different kind of object, that wraps the underlying list and allows you to 
> specify arbitrary operations that should be applied to each object in that 
> list? I guess I could imagine a complicated class that might support 
> something like that, but I don't think it exists at the moment, and it 
> would seem like a lot of work just to avoid a simple loop...
>

Well, after calling .all() you indeed get plain python list and you can't 
do anything but iterate over it; it's "too late". In this case it appears 
one should not call .all() and instead call something on the query itself 
i.e. session.query(Text).???.update(...). I would like to know if and what 
to insert so that SA would generate UPDATE for objects _related_ (those 
accessible via association proxy) to these selected objects.

Regards,
Piotr

>

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to