Re: [sqlalchemy] Re: Can I make bulk update through association proxy?

2016-03-18 Thread Piotr Dobrogost
On Saturday, February 27, 2016 at 10:26:53 PM UTC+1, Mike Bayer wrote: > > > If I can just wrap this up, do i understand correctly that this would > the functionality of "joined eager loading", except applied to something > like an UPDATE..FROM ? > I think so although I can't say I'm 100% sure

Re: [sqlalchemy] Re: Can I make bulk update through association proxy?

2016-02-27 Thread Mike Bayer
On 02/27/2016 07:26 AM, Piotr Dobrogost wrote: On Friday, February 26, 2016 at 7:45:46 PM UTC+1, Jonathan Vanasco wrote: I'm not either, and I'm scared of the SQL that would be generated and the wire traffic/memory if there were. That would be subselects within subqueryloads

Re: [sqlalchemy] Re: Can I make bulk update through association proxy?

2016-02-27 Thread Piotr Dobrogost
On Friday, February 26, 2016 at 7:45:46 PM UTC+1, Jonathan Vanasco wrote: I'm not either, and I'm scared of the SQL that would be generated and the > wire traffic/memory if there were. That would be subselects within > subqueryloads within... this also seems a bit more about "updates to >

Re: [sqlalchemy] Re: Can I make bulk update through association proxy?

2016-02-26 Thread Jonathan Vanasco
On Friday, February 26, 2016 at 4:54:01 AM UTC-5, Simon King wrote: > > > I'm not aware of any way to do this. > > I'm not either, and I'm scared of the SQL that would be generated and the wire traffic/memory if there were. That would be subselects within subqueryloads within... this also

Re: [sqlalchemy] Re: Can I make bulk update through association proxy?

2016-02-26 Thread Piotr Dobrogost
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 >

Re: [sqlalchemy] Re: Can I make bulk update through association proxy?

2016-02-25 Thread Simon King
On Thu, Feb 25, 2016 at 12:01 PM, Piotr Dobrogost < p...@2016.groups.google.dobrogost.net> wrote: > On Thursday, February 25, 2016 at 11:10:36 AM UTC+1, Simon King wrote >> >> >> I can't think of a way you could do this with objects you've already >> loaded into memory. Perhaps you could use

Re: [sqlalchemy] Re: Can I make bulk update through association proxy?

2016-02-25 Thread Piotr Dobrogost
On Thursday, February 25, 2016 at 11:10:36 AM UTC+1, Simon King wrote > > > I can't think of a way you could do this with objects you've already > loaded into memory. Perhaps you could use Query.update to issue the > appropriate SQL directly to the database? > > >

Re: [sqlalchemy] Re: Can I make bulk update through association proxy?

2016-02-25 Thread Simon King
On Thu, Feb 25, 2016 at 9:03 AM, Piotr Dobrogost < p...@2016.groups.google.dobrogost.net> wrote: > On Wednesday, February 24, 2016 at 2:41:43 PM UTC+1, Piotr Dobrogost wrote: >> >> Hi! >> >> Let's say I have a model Text with attribute "values" which is >> association proxy. >> I can update

[sqlalchemy] Re: Can I make bulk update through association proxy?

2016-02-25 Thread Piotr Dobrogost
On Wednesday, February 24, 2016 at 2:41:43 PM UTC+1, Piotr Dobrogost wrote: > > Hi! > > Let's say I have a model Text with attribute "values" which is association > proxy. > I can update single object like this: > text = session.query(Text).one() > text.values.update(...) > > How can I update