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

2021-03-01 Thread Mike Bayer
the before_compile event receives the Query object at the point it starts to turn it into a SQL construct. When this happens, it's in response to having said something like "query.all()". So there's no **kwarg that's specific to an operation like that. instead, when you want to send "message

[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: https://docs.sqlalchemy.org/en/13/orm/events.html?highlight=before_compile#sqlalchemy.orm.events.QueryEvents.before_compile