Re:BMG: A Production Ready Relational Algebra in Ruby
by bdcravens on Tuesday July 14, 2020 @12:27PM
(#23833952)
The Rails ORM (ActiveRecord) is built atop of a relational algebra gem (arel, which was eventually pulled into the AR library). I'm pretty sure the arel functions are considered private API, so it's not necessarily best practice, but you have the option to call those functions directly when you find the ORM lacking and don't want to pass around raw SQL.
[ Parent
| on HN ]
Re:BMG: A Production Ready Relational Algebra in Ruby
by blambeau on Tuesday July 14, 2020 @12:47PM
(#23834325)
AFAIK Arel is not a real algreba, since it does not really allow composing relations the way we want.
More info here: http://www.try-alf.org/blog/2013-10-21-relations-as-first-cl...