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:
parent
37620b0c39
commit
5d11fa9f6a
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue