Re: [sqlalchemy] Metadata default schema

2013-05-16 Thread rdunklau
My bad, I didn't notice those notes in the documentation, thank you for pointing that out. I understand the reason for the table test1 showing twice, but why doesn't it when I reflect the public schema (explicitly, not via the None default schema) after the test2 table ? If I understand

[sqlalchemy] Re: Sqlalchemy 0.7.6 and mappers _save_obj methods.

2012-04-16 Thread rdunklau
... On Apr 13, 5:33 pm, rdunklau rdunk...@gmail.com wrote: On Apr 13, 3:12 pm, Michael Bayer mike...@zzzcomputing.com wrote: On Apr 13, 2012, at 6:08 AM, Ronan Dunklau wrote: Hello. Prior to sqlalchemy 0.7.6, we implemented our own mappers to override the _save_obj and _delete_obj methods

[sqlalchemy] Re: Sqlalchemy 0.7.6 and mappers _save_obj methods.

2012-04-16 Thread rdunklau
._sa_instance_state) On Apr 16, 2012, at 9:33 AM, rdunklau wrote: I followed your suggestions, and implemented it in the following way: - a SessionListener class, responsible for maintaining the alternate state of the sesssion is instantiated. The class defines a before_flush

[sqlalchemy] Re: Sqlalchemy 0.7.6 and mappers _save_obj methods.

2012-04-13 Thread rdunklau
On Apr 13, 3:12 pm, Michael Bayer mike...@zzzcomputing.com wrote: On Apr 13, 2012, at 6:08 AM, Ronan Dunklau wrote: Hello. Prior to sqlalchemy 0.7.6, we implemented our own mappers to override the _save_obj and _delete_obj methods. that's very interesting.  There is an old ticket to

[sqlalchemy] Re: Replacing columns in a Select

2012-03-15 Thread rdunklau
Thank you, I did not think of with_only_columns for the last part. The part that bother me the most is how to build the column list. I rewrote my code to only use public attributes and methods: columns = ColumnCollection(*myselect.inner_columns) columns.replace(my_column)

[sqlalchemy] Re: column_property and relationship

2012-01-19 Thread rdunklau
Thank you, that is exactly what I needed. For the record, it also works with primaryjoin defined on the ColumnProperties (Table2.code etc...) and with a column property. I'm not sure which side here you'd want to consider foreign, that is, the column which seeks to match an existing column.  

[sqlalchemy] Python to pl/python

2011-10-28 Thread rdunklau
Hello guys. As a proof of concept, I implemented a hacky python to pl/python converter using python3 function annotations. You can see it there if it's of interest to any of you: https://github.com/rdunklau/pytoplpython This led me to some questions. SQLAlchemy automatically manages tables

[sqlalchemy] Re: Postgresql and reflection: system tables VS information_schema

2011-10-05 Thread rdunklau
Thanks for everything. On 5 oct, 16:39, Michael Bayer mike...@zzzcomputing.com wrote: On Oct 5, 2011, at 2:58 AM, rdunklau wrote: the correct value t_id is returned. I ran this exact same test on my postgresql 9.1.1 install, and it fails. OK then its a PG 9 thing.  We had an almost

[sqlalchemy] Postgresql and reflection: system tables VS information_schema

2011-10-04 Thread rdunklau
Hello. I'm having a problem with sqlalchemy and postgresql, and I really don't know what should I do to correct it. I'm using sqlalchemy. 0.7.3 with postgresql 2.7.2, with the psycopg2 driver and dialect. I'm using the ORM with reflection, and as I renamed a primary key column (from id to