News for hackers. Stuff that matters.
Re:What ORMs have taught me: just learn SQL by akavi on Monday August 04, 2014 @05:44PM (#8134225)
>With a low level abstraction layer, I can do stuff like already_complicated_query.filter(another_param==5). Or I can write a function that does get_world_trade_aggregate(country="USA", aggregate="average") and it'll generate the right query for me. But then that's not even all, if I have to modify or filter that query further in some other part of the code, in some unexpected way totally doable. It's less often that I have to write a whole new function or duplicate code.

If you're working in Ruby, there's also Arel[1]. I have my complaints, but it seems to be the exact same thing: Composable, programmatic access to SQL from your application code.

[1] https://github.com/rails/arel

Re:What ORMs have taught me: just learn SQL by jeltz on Tuesday August 05, 2014 @05:57AM (#8136198)
If you are working with Ruby Sequel is a way better tool for building SQL queries.

http://sequel.jeremyevans.net/