Hacker News new | ask | show | jobs
by tankerdude 1915 days ago
Others already pointed out that you can use a core method. What I see is that I actually rewrote a query that had 7 joins (yes, it was not great), and rewrote it in SQLAlchemy that made for a the query to have a lot fewer total lines of code to write.

I validated it by checking out what it would generate via its internal SQL compiler.

So for me, it was more like, am I competent enough to write less code and fewer mistakes, due to functions, autocomplete, etc. versus writing the full SQL.

It's a time saving for me, and the queries are expected. I also echo the SQL query to make sure that that's the exact query I want.

Lastly, I then groused at the engineer who decided that the query pulled in so much crap from so many tables in 1 query.