Advanced aRel: When ActiveRecord Just Isn't Enough
summary
Claim: aRel lets Rails build arbitrarily complex queries in pure Ruby instead of SQL strings, and ActiveRecord delegates query construction to it. Tools demonstrated include arel-helpers (a tiny gem with JoinAssociation and a QueryBuilder), a JRuby + Antler parsing approach, and a working web tool scuttle.io that converts SQL to Arel for SELECT queries. A surprising detail: a prior related talk drew only about fifteen people. The built tools are real and demonstrably usable.
AI-written summary · about
chapters (18)
- 0:00Introduction
- 0:47Interactive Exercise
- 12:28Arrow Helpers
- 13:56Does a Return
- 16:35Terminal Methods
- 17:56Named Functions
- 19:56Where
- 22:31Join
- 24:56Join Association
- 26:23Join Tables
- 27:00Join Teachers
- 27:51Order Order
- 28:35SubQuery
- 29:00Matches
- 30:27Query Builder
- 31:00Post Query Builder
- 31:54Since Yesterday
- 32:45scuttle
related talks
32mArel: The Ruby Relational Algebra Library
25mActiveRecord can't do it? Arel can!
21mActiveRecord can't do it? Arel can!
28mActive Record Scopes and Arel
17mWrangle Your SQL With Arel
05mHow to use Arel? Wrong answers only!
30mBuilding an ORM with AReL: Walking up the (AS)Tree.
38mSequel: When ActiveRecord is not enough
