Made up of managers, Abstract Syntax Tree AST (nodes), visitors
-
Managers retain lists of nodes
- Select, update, insert, delete
-
Managers provide access to visitors, which visit nodes and construct sql
-
AST defines various portions of the query
- select, from/join, where, group, order, limit, offset
-
@user = User.arel_table@
-
@query = user.project('*')@
-
@query.to_sql@ == @SELECT * FROM "users"@