[ActiveRecord] Easily build and chain Common Table Expressions queries
Following on my 6 months old PR to bring CTE support to Rails out of the box I released the code as a Ruby gem https://github.com/vlado/activerecord-cte.
It uses Arel in the background and is database agnostic. Always returns ActiveRecord::Relation
so it is easy to chain, cache, count, aggregate, …
Post a comment