[sqlalchemy] Re: JOIN result as dict

2016-10-20 Thread Jonathan Vanasco
I'm sorry, I totally misunderstood your question. I thought you were trying to get all rows as a unified dict. Your result clarified things. It looks like you're using the ORM (and not core), right? I don't think it is entirely possible to do what you want. Several people have asked similar

Re: [sqlalchemy] invalidating Connection objects using DBAPI connections

2016-10-20 Thread Mike Bayer
On 10/19/2016 05:49 PM, Dave Vitek wrote: Hi all, I'm using sqlalchemy 0.9.7 (yes, I know we need to upgrade). I've recently started to employ psycopg2's psycopg2.extensions.set_wait_callback function to facilitate terminating ongoing queries in response to activity on other sockets (such as

Re: [sqlalchemy] Handling "generic" relations

2016-10-20 Thread Simon King
On Thu, Oct 20, 2016 at 12:11 PM, Lele Gaifax wrote: > Hi all, > > I'd like to have an Entity able to be "attached" to N different others, > avoiding the need of N intermediate/secondary tables. > > I imagine something like the following:: > > class Address(Base): >

[sqlalchemy] Handling "generic" relations

2016-10-20 Thread Lele Gaifax
Hi all, I'd like to have an Entity able to be "attached" to N different others, avoiding the need of N intermediate/secondary tables. I imagine something like the following:: class Address(Base): __tablename__ = 'addresses' id = Column(Integer, primary_key=True)