Hacker News new | ask | show | jobs
by breatheoften 2467 days ago
Query builders can be so good at making it easy to work with the database ... the popularity of ORMs over query builders is a really big collective reasoning failure in my opinion.

With a good query builder in hand - it is very unclear to me why anyone would ever want to use an orm.

1 comments

I like query builders but if everything were done with query builders there'd still be an awful lot of DRY pertaining to business logic that needs to go somewhere. Maybe you replace the ORM with some sort of 'results act as <something>' abstraction, but things like that often work out much better with consistent scaffolding of some sort, which is mostly what successful ORMs seem to be.
This is why I love Sqlalchemy. We use it as half orm, half query builder and it’s pretty great.