Our great sponsors
-
activerecord-cte
Brings Common Table Expressions support to ActiveRecord and makes it super easy to build and chain complex CTE queries
-
brick
Auto-generate models, views, controllers, and routes in a Rails app based on database structure (by lorint)
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
Yes -- the whole CTE functionality was originally put in by Vlado Cingel (author of the activerecord-cte gem), and included support for recursion. Before the PR was merged though the recursive part got pulled out, leaving just .with(). In the future a .with_recursive() method might be put in to fill this gap.
I had put this together in order to put it into a gem I maintain -- The Brick. The recursive part will be used to rapidly calculate inherited permissions.