Module: Arel::Attribute::Expressions

Included in:
Arel::Attribute, SqlLiteral
Defined in:
lib/arel/algebra/attributes/attribute.rb

Instance Method Summary collapse

Instance Method Details

#averageObject



246
247
248
# File 'lib/arel/algebra/attributes/attribute.rb', line 246

def average
  Average.new(self)
end

#count(distinct = false) ⇒ Object



230
231
232
# File 'lib/arel/algebra/attributes/attribute.rb', line 230

def count(distinct = false)
  distinct ?  Distinct.new(self).count :  Count.new(self)
end

#maximumObject



238
239
240
# File 'lib/arel/algebra/attributes/attribute.rb', line 238

def maximum
  Maximum.new(self)
end

#minimumObject



242
243
244
# File 'lib/arel/algebra/attributes/attribute.rb', line 242

def minimum
  Minimum.new(self)
end

#sumObject



234
235
236
# File 'lib/arel/algebra/attributes/attribute.rb', line 234

def sum
  Sum.new(self)
end