flipbit03 / sqlalchemy-easy-softdelete

Easily add soft-deletion to your SQLAlchemy Models
Other
62 stars 13 forks source link

Avoid trying to rewrite an INSERT...RETURNING #7

Closed flipbit03 closed 2 years ago

flipbit03 commented 2 years ago

A select(X).from_statement(insert(...).returning(...)) is confusingly marked as a is_select=True in SQLAlchemy's ORMExecuteState. This PR integrates additional security measures in the Query Rewriter to ensure that we are only operating on Select-like statements.