class Arel::Nodes::Function

Attributes

alias[RW]
distinct[RW]
expressions[RW]

Public Class Methods

new(expr, aliaz = nil) click to toggle source
Calls superclass method Arel::Nodes::Node.new
# File lib/arel/nodes/function.rb, line 9
def initialize expr, aliaz = nil
  super()
  @expressions = expr
  @alias       = aliaz && SqlLiteral.new(aliaz)
  @distinct    = false
end

Public Instance Methods

as(aliaz) click to toggle source
# File lib/arel/nodes/function.rb, line 16
def as aliaz
  self.alias = SqlLiteral.new(aliaz)
  self
end
eql?(other) click to toggle source
# File lib/arel/nodes/function.rb, line 25
def eql? other
  self.class == other.class &&
    self.expressions == other.expressions &&
    self.alias == other.alias &&
    self.distinct == other.distinct
end
hash() click to toggle source
# File lib/arel/nodes/function.rb, line 21
def hash
  [@expressions, @alias, @distinct].hash
end