Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

if the point is length of code, then:

  SELECT p.*,b.* FROM employees p JOIN employees b ON (p.manager = b.id) WHERE (p.name = 'John')
is only 8 characters less than:

  (join (select (table {:employees :p}) (=* :name "John")) (table {:employees :b}) (=* :p.manager :b.id))
but that isn't the point. the point is composabilty. you can take 8 simple functions (select, project, join, rename, aggregate, take, drop, sort) and build any query you want. these queries can be passed around your code, reused, modified, and refined, in a way that plain SQL strings cannot.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: