Re: [sqlalchemy] How to formulate a query using sqlalchemy ORM constructs that calculates the difference between entries in rows

2018-05-03 Thread Mike Bayer
On Thu, May 3, 2018 at 6:05 PM, Björn Nadrowski wrote: > > Thanks for your reply. I guessed that this should be possible using alias > and functions. But I was unable to write a simple script that achieves that. > Could you help me with that? > Or do you want me to show the things that I tried but

Re: [sqlalchemy] How to formulate a query using sqlalchemy ORM constructs that calculates the difference between entries in rows

2018-05-03 Thread Björn Nadrowski
Thanks for your reply. I guessed that this should be possible using alias and functions. But I was unable to write a simple script that achieves that. Could you help me with that? Or do you want me to show the things that I tried but do not work? Thanks, Bjoern Am Montag, 23. April 2018 14:3

Re: [sqlalchemy] How to override append and remove methods used in orm.relationships

2018-05-03 Thread Mike Bayer
On Thu, May 3, 2018 at 7:39 AM, Diego Quintana wrote: > Thanks again for your reply > >> at the core is that when you remove a child from the parent in the >> _remove_pets event, you want to prevent the _remove_children() event >> from actually happening, I think. > > > Yes, since it is a differen

Re: [sqlalchemy] How to override append and remove methods used in orm.relationships

2018-05-03 Thread Diego Quintana
Just wanted to note something, I tried to work on an implementation here which would also have to be > extremely clever but I realized I don't actually understand what this > is supposed to do. > > *if "remove child from parent" has two different flavors then there needs > to be all kinds of trick

Re: [sqlalchemy] How to override append and remove methods used in orm.relationships

2018-05-03 Thread Diego Quintana
Thanks again for your reply at the core is that when you remove a child from the parent in the > _remove_pets event, you want to prevent the _remove_children() event > from actually happening, I think. > Yes, since it is a different usage case or flavour. I was trying to pass kwargs to the event