class Arel::Nodes::AggregateFunctionName

Attributes

alias[RW]
distinct[RW]
expressions[RW]
name[RW]
orderings[RW]

Public Class Methods

new(name, expr, distinct = false) click to toggle source
Calls superclass method
# File lib/active_record_extended/arel/aggregate_function_name.rb, line 10
def initialize(name, expr, distinct = false)
  super()
  @name        = name.to_s.upcase
  @expressions = expr
  @distinct    = distinct
end

Public Instance Methods

==(other)
Alias for: eql?
as(aliaz) click to toggle source
# File lib/active_record_extended/arel/aggregate_function_name.rb, line 22
def as(aliaz)
  self.alias = SqlLiteral.new(aliaz)
  self
end
eql?(other) click to toggle source
# File lib/active_record_extended/arel/aggregate_function_name.rb, line 31
def eql?(other)
  self.class == other.class &&
    expressions == other.expressions &&
    orderings == other.orderings &&
    distinct == other.distinct
end
Also aliased as: ==
hash() click to toggle source
# File lib/active_record_extended/arel/aggregate_function_name.rb, line 27
def hash
  [@name, @expressions, @distinct, @alias, @orderings].hash
end
order_by(expr) click to toggle source
# File lib/active_record_extended/arel/aggregate_function_name.rb, line 17
def order_by(expr)
  @orderings = expr
  self
end