Re:Write an SQL query builder in 150 lines of Python
by huetius on Friday August 27, 2021 @09:50AM
(#28327787)
Ymmv, but I like the both/and approach. I’ve seen high quality codebases where the benefits of both are leveraged: ORM for simple queries, idiomatic code reuse; raw sql for complex or performance critical queries. Being smart about when to use which is the key, but I have seen it work very well.
[ Parent
| on HN ]
Re:Write an SQL query builder in 150 lines of Python
by GVIrish on Friday August 27, 2021 @10:04AM
(#28327926)
This is what I think is the reasonable take on ORMs. If you're using one because you don't wanna learn SQL, that is a bad reason that will most likely result in more work in the long run.
But if you're using it to increase productivity for straightforward database calls, it can be a useful tool in a lot of scenarios.