Re: [sqlalchemy] Rewriting input/output values on columns with core

2013-10-08 Thread Gustavo Baratto
Nice! I did not associate the custom typing in the docs with this functionality before. It would have saved me a lot of time! Thank you very much again! g. On Tue, Oct 8, 2013 at 7:12 AM, Michael Bayer wrote: > > On Oct 7, 2013, at 10:26 PM, tiadobatima wrote: > > > Hello there, > > > > I see

Re: [sqlalchemy] Rewriting input/output values on columns with core

2013-10-08 Thread Michael Bayer
On Oct 7, 2013, at 10:26 PM, tiadobatima wrote: > Hello there, > > I see that Column() has "default", "onupdate", and "server_default" to be > used when the value for that column is not present when inserting and > updating... > What would be the best way of rewriting a value that is present

[sqlalchemy] Mocking sqlalchemy query results for tests

2013-10-08 Thread Henning Sprang
I searched a bit but didn't quite find something that I recognized as being what I'm looking for. What are you doing to test the part of your application that deals directly with SQLAlchemy results, wehn it comes to mocking the behaviour of the result object? The background: I am developing an

Re: [sqlalchemy] contains_eager and order_by

2013-10-08 Thread Julien Cigar
On Mon, Oct 07, 2013 at 11:28:21AM -0400, Michael Bayer wrote: > > On Oct 7, 2013, at 6:06 AM, Julien Cigar wrote: > > > Hello, > > > > I have the following query: > > > > entity = orm.with_polymorphic( > >Content, [Event, News] > > ) > > > > q = db.Session.query(entity) > > > > The "Eve