README.markdown in arel-3.0.3 vs README.markdown in arel-4.0.0.beta1
- old
+ new
@@ -52,10 +52,10 @@
users.take(5) # => SELECT * FROM users LIMIT 5
users.skip(4) # => SELECT * FROM users OFFSET 4
`GROUP BY` is called `group`:
- users.group(users[:name]) # => SELECT * FROM users GROUP BY name
+ users.project(users[:name]).group(users[:name]) # => SELECT users.name FROM users GROUP BY users.name
The best property of the Relational Algebra is its "composability", or closure under all operations. For example, to restrict AND project, just "chain" the method invocations:
users \
.where(users[:name].eq('amy')) \