Re: [sqlalchemy] NoSuchColumnError and _key_fallback

2013-10-11 Thread Michael Bayer
Redshift has all kinds of limitations and weird behaviors. They developed it as a simplified cloud db only generally based off of Postgres. Sent from my iPhone On Oct 10, 2013, at 11:11 PM, Wu Jiang wujian...@gmail.com wrote: Yes. Thank you, Michael. Still wondering why Redshift is case

Re: [sqlalchemy] Session creation without scoped session?

2013-10-11 Thread Michael Bayer
On Oct 10, 2013, at 8:57 PM, Iain Duncan iainduncanli...@gmail.com wrote: Seems like there are some variety of opinion on some stuff on the pyramid list so I thought I'd come straight to the source. In Pyramid, I can attach a server wide shared object to the registry which is created on

Re: [sqlalchemy] Debug insights into QueuePool

2013-10-11 Thread Michael Bayer
On Oct 10, 2013, at 9:11 PM, John Anderson son...@gmail.com wrote: Hey, I was wondering if it would be possible to add some extra logging to the QueuePool for when its using overflow connections vs a connection out of the pool. I'd just use a checkout event handler and then log out

[sqlalchemy] Collections and outer joins with core

2013-10-11 Thread Gustavo Baratto
Hello there, I'm looking into the cheapest way of, in core, building collections into each row on fairly large left and right tables (the collections themselves are small though). By collection i mean the same thing as in sqlalchemy orm: an outer left join, that to each row of the left table with

Re: [sqlalchemy] Collections and outer joins with core

2013-10-11 Thread Michael Bayer
On Oct 11, 2013, at 1:25 PM, Gustavo Baratto gbara...@gmail.com wrote: - is it possible to know which columns in the result of a join belong to each of the tables? sure: for row in result: cols_from_table_a = [row[col] for col in tablea.c] cols_from_table_b = [row[col] for col

Re: [sqlalchemy] Session creation without scoped session?

2013-10-11 Thread Iain Duncan
Thanks Michael, that's very helpful. Iain On Fri, Oct 11, 2013 at 7:18 AM, Michael Bayer mike...@zzzcomputing.comwrote: On Oct 10, 2013, at 8:57 PM, Iain Duncan iainduncanli...@gmail.com wrote: Seems like there are some variety of opinion on some stuff on the pyramid list so I thought

[sqlalchemy] Trying to get a 'global' session to work for SQLAlchemy database library tests

2013-10-11 Thread Ken Lareau
In the process of trying to find an efficient way to manage a test database for a large set of tests for a database library I'm writing that uses SQLAlchemy, I came across this page: http://alextechrants.blogspot.fi/2013/08/unit-testing-sqlalchemy-apps.html This is definitely what I want to do,

Re: [sqlalchemy] Trying to get a 'global' session to work for SQLAlchemy database library tests

2013-10-11 Thread Michael Bayer
On Oct 11, 2013, at 7:14 PM, Ken Lareau klar...@tagged.com wrote: In the process of trying to find an efficient way to manage a test database for a large set of tests for a database library I'm writing that uses SQLAlchemy, I came across this page:

Re: [sqlalchemy] Trying to get a 'global' session to work for SQLAlchemy database library tests

2013-10-11 Thread Ken Lareau
On Fri, Oct 11, 2013 at 5:53 PM, Michael Bayer mike...@zzzcomputing.comwrote: On Oct 11, 2013, at 7:14 PM, Ken Lareau klar...@tagged.com wrote: In the process of trying to find an efficient way to manage a test database for a large set of tests for a database library I'm writing that uses

[sqlalchemy] Introspection: finding out more about relationships

2013-10-11 Thread Alexey Vihorev
Hi! I'm trying to do some introspection on a class's one-to-many relationships. I'm trying to find out which attribute in many table points to the one table. Is that possible? Thanks! -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To unsubscribe

Re: [sqlalchemy] Introspection: finding out more about relationships

2013-10-11 Thread Michael Bayer
take a look at local_columns, remote_side, local_remote_pairs (all views of the same thing): MyClass.attribute.property.local_remote_pairs that gives you Column objects. If your mappings have attributes without the same names, you can relate them together mapper.get_property_by_column()