1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

adding sum to sql literal

This commit is contained in:
Aaron Patterson 2010-09-14 15:17:09 -07:00
parent 37620b0c39
commit 5d11fa9f6a

View file

@ -5,6 +5,10 @@ module Arel
Count.new [self], distinct
end
def sum
Nodes::Sum.new [self], Nodes::SqlLiteral.new('sum_id')
end
def maximum
Nodes::Max.new [self], Nodes::SqlLiteral.new('max_id')
end