diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/arel/select_manager.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/arel/select_manager.rb b/lib/arel/select_manager.rb index 7a1fbbe438..ce8a9caf23 100644 --- a/lib/arel/select_manager.rb +++ b/lib/arel/select_manager.rb @@ -139,6 +139,14 @@ module Arel @ctx.projections = projections end + def distinct(value = true) + if value + @ctx.set_quantifier = Arel::Nodes::Distinct.new + else + @ctx.set_quantifier = nil + end + end + def order *expr # FIXME: We SHOULD NOT be converting these to SqlLiteral automatically @ast.orders.concat expr.map { |x| |