by murkt · 8mo ago · 0 comments
With SQLAlchemy approach I can easily find all usages of a particular column everywhere.
.filter(Folder.user_id == user_id)
Versus .filter(user_id=user_id)
Grepping by user_id will obviously produce hundreds and thousands of matches, probably from dozens of tables.When they’re 30 lines apart, because it’s a function that builds a complex query with joins and filters based on some function arguments: not easy.
I don’t really understand how .pyi will give me proper Find usages here. I haven’t used them a lot, though, and just rely on pycharm Find Usages or just rg.
Also, what about foreign keys? Let’s say it’s a filter on user__email__startswith. Are you able to find it when executing Find Usages on User.email field?