aboutsummaryrefslogblamecommitdiffstats
path: root/lib/arel/expressions.rb
blob: d40268c2925ad7f30cd8125f2d045b6054e20936 (plain) (tree)
1
2
3
4
5
6
7
8
9
10





                                       
           
                           

       
               
                           

       
               
                           

       
               
                           
       



                                      
 

     
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