diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/arel/select_manager.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/arel/select_manager.rb b/lib/arel/select_manager.rb index 4a652f2c9c..5a05e7e181 100644 --- a/lib/arel/select_manager.rb +++ b/lib/arel/select_manager.rb @@ -155,6 +155,15 @@ module Arel self end + def distinct_on(value) + if value + @ctx.set_quantifier = Arel::Nodes::DistinctOn.new(value) + else + @ctx.set_quantifier = nil + end + self + end + def order *expr # FIXME: We SHOULD NOT be converting these to SqlLiteral automatically @ast.orders.concat expr.map { |x| |