[sqlalchemy] When building a query, option to only join once

2021-11-26 Thread Michael Elsdörfer
I keep running into this issue where I have a complex set of filter parameters, some of which need a join, and it would be nice to have an ergonomic way to say: join this table, but not if there already is a join. I found this old post on the subject:

Re: [sqlalchemy] Turn off connections invalidation functionality

2021-11-26 Thread Mike Bayer
I've spent some time thinking about what might be being asked here.the only thing I can think of is that when a particular database connection is found to be in what we call a "disconnect" state, the connection is invalidated, so that the connection will reconnect and make a new connection.

Re: [sqlalchemy] Turn off connections invalidation functionality

2021-11-26 Thread Mike Bayer
Im not sure if I understand the question? if you don't call .invalidate(), then the connection is not invalidated. what does "turn off" mean ? On Fri, Nov 26, 2021, at 11:17 AM, Anupama Goparaju wrote: > Hi, > > Is there a way to safely turn off connection invalidation functionality >

[sqlalchemy] Turn off connections invalidation functionality

2021-11-26 Thread Anupama Goparaju
Hi, Is there a way to safely turn off connection invalidation functionality (based on invalidation time set, all the connections created prior to the timestamp are invalidated) in sqlalchemy? https://github.com/Noethys/Connecthys/blob/master/connecthys/lib/sqlalchemy/pool.py#L574 Thanks,

Re: [sqlalchemy] Using replacement_traverse() to augment a join

2021-11-26 Thread Mike Bayer
hey there - replacement_traverse is a mostly internal API that is very fickle and is not guaranteed to work in generic situations; it's tuned very specifically to cases that the ORM needs internally and one of the architectural trends in SQLAlchemy is to try to reduce dependence on it. Can we