~/talk

Arel: The Ruby Relational Algebra Library

Talkat GoGaRuCo 2010 · 2010-09-17..09-18· [ruby-on-rails, databases]
slides:none on file

Arel is the Ruby relational algebra engine that replaces fragile SQL string concatenation with an object model for SQL queries and is the foundation inside ActiveRecord in Rails 3. It produces lazy, chainable Relation objects that are immutable, support where/group/order/limit/update_all/delete_all, and execute only on iteration so fragment caching stops extra queries. Arel ships with SQL and in-memory engines, exposes attribute predicates (gt, matches, in, etc.), lets code build complex AND/OR predicates, and enables future engines like Redis or memcache for cross‑engine joins.

AI-written summary · about

  1. 0:00Start
  2. 2:26What is Arel?
  3. 5:39What's a Relation?
  4. 6:46Core Operations
  5. 7:43Closure!
  6. 8:58Original: Hash queries
  7. 10:16Rails 2.1: Named scopes
  8. 12:20Lazy class RubyistsController
  9. 14:18New Finder Methods
  10. 16:52Example
  11. 23:13Exposing the Attributes
  12. 24:21Compound Predicates
  13. 25:41Map any relation to a class
  14. 27:28Map any relation as an association class User Active Records Base
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.