Re: [sqlalchemy] using sqlalchemy to track changes in database

2015-07-18 Thread Jonathan Rogers
On Thursday, July 16, 2015 at 6:54:29 AM UTC-4, Ivan Ogasawara wrote: I think you can write a trigger in your DB for all tables and actions you want to analyze .. and your triggers you can put the changes in some log tables. Using sqlalchemy you can put this changes inside your db

[sqlalchemy] Access foreign key value after collection modification before flush

2015-07-18 Thread Martin Pengelly-Phillips
Hello, I'm curious about the behaviour of foreign keys when modifying collections as I want to be able to get the value before flush for some business logic validation. The following is a cut down version of the association list example: import uuid from sqlalchemy import Column, ForeignKey,

[sqlalchemy] Error with union() + bindparam

2015-07-18 Thread Eli Collins
Hi All - I'm currently trying to use sql.union() to construct a union of sql.select() instances. My problem is that one of the columns in one of the selects is an expression that takes a bind parameter, which is causing an error. I initially tried to code things as follows ... from

Re: [sqlalchemy] Access foreign key value after collection modification before flush

2015-07-18 Thread Mike Bayer
On 7/18/15 5:22 AM, Martin Pengelly-Phillips wrote: Hello, I'm curious about the behaviour of foreign keys when modifying collections as I want to be able to get the value before flush for some business logic validation. The following is a cut down version of the association list example:

Re: [sqlalchemy] Error with union() + bindparam

2015-07-18 Thread Mike Bayer
On 7/18/15 12:35 PM, Eli Collins wrote: Hi All - I'm currently trying to use sql.union() to construct a union of sql.select() instances. My problem is that one of the columns in one of the selects is an expression that takes a bind parameter, which is causing an error. I initially tried