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



224
225
226
# File 'lib/arel/algebra/attributes/attribute.rb', line 224

def average
  Average.new(self)
end

#count(distinct = false) ⇒ Object



208
209
210
# File 'lib/arel/algebra/attributes/attribute.rb', line 208

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

#maximumObject



216
217
218
# File 'lib/arel/algebra/attributes/attribute.rb', line 216

def maximum
  Maximum.new(self)
end

#minimumObject



220
221
222
# File 'lib/arel/algebra/attributes/attribute.rb', line 220

def minimum
  Minimum.new(self)
end

#sumObject



212
213
214
# File 'lib/arel/algebra/attributes/attribute.rb', line 212

def sum
  Sum.new(self)
end