1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/lib/arel/expressions.rb
Sean Griffin 5437df4a79 Revert "Revert "Merge pull request #300 from jpcody/master""
This reverts commit 9b92af7098.

beta2 is out, and we've fixed the issue that this caused in Rails
2014-10-31 08:40:28 -06:00

28 lines
401 B
Ruby

module Arel
module Expressions
def count distinct = false
Nodes::Count.new [self], distinct
end
def sum
Nodes::Sum.new [self]
end
def maximum
Nodes::Max.new [self]
end
def minimum
Nodes::Min.new [self]
end
def average
Nodes::Avg.new [self]
end
def extract field
Nodes::Extract.new [self], field
end
end
end