[sqlalchemy] SQLAlchemy 1.3.23 turn off before_compile with **kwargs?

2021-03-01 Thread Chris Simpson
Hello I'd like to understand how to turn off a before_compile listener (e.g. soft delete, to include deleted items). For example, I've adapted the example from the docs:

Re: [sqlalchemy] Re: SQLAlchemy join/has query with example code

2021-02-09 Thread Chris Simpson
Thanks Mike, the assurance it's the right idea was what I wanted to check. All sorted much appreciated. On Sun, 7 Feb 2021, 21:49 Mike Bayer, wrote: > > > On Sat, Feb 6, 2021, at 8:56 AM, Chris Simpson wrote: > > After posting, I have arrived at *a* solution (which might be awfu

[sqlalchemy] Re: SQLAlchemy join/has query with example code

2021-02-06 Thread Chris Simpson
==PlanRequirements.plan_id)\ .filter(PlanRequirements.subscription==1).all() Kind regards, Chris On Saturday, 6 February 2021 at 13:42:54 UTC Chris Simpson wrote: > Hello, > > I'm trying to convert this working SQL query: (SQLAlchemy models are below) > > SELECT COUNT(*) >

[sqlalchemy] SQLAlchemy join/has query with example code

2021-02-06 Thread Chris Simpson
Hello, I'm trying to convert this working SQL query: (SQLAlchemy models are below) SELECT COUNT(*) FROM person JOIN subscription ON person.id = subscription.person_id JOIN plan ON subscription.sku_uuid = plan.uuid JOIN plan_requirements ON plan.id = plan_requirements.plan_id WHERE