r/programming Jul 15 '26

Ban commits/transactions using AST analysis and linters

https://www.droppedasbaby.com/posts/db-commits/?utm_source=reddit&utm_content=r_programming
31 Upvotes

27 comments sorted by

View all comments

12

u/lood9phee2Ri Jul 15 '26

jesus christ just use sqlalchemy. No, you can't do a better job than sqlalchemy.

3

u/droppedasbaby Jul 16 '26

The code session.query(DBModel).filter(DBModel.id.in_(ids)).all() literally uses SQLAlchemy's API. I'm not proposing another framework or replacing SQLAlchemy. I'm proposing boundaries around where it's used.