123456789_123456789_123456789_123456789_123456789_

Class: Arel::Nodes::NamedFunction

Do not use. This class is for internal use only.

Class Method Summary

Instance Attribute Summary

Instance Method Summary

Function - Inherited

::Arel::FilterPredications - Included

::Arel::WindowPredications - Included

::Arel::Math - Included

#&, #*, #+, #-, #/, #<<, #>>, #^, #|, #~@

::Arel::OrderPredications - Included

::Arel::AliasPredication - Included

#as

::Arel::Predications - Included

::Arel::Expressions - Included

Node - Inherited

#and

Factory method to create an And node.

#fetch_attribute, #invert,
#not

Factory method to create a Nodes::Not node that has the recipient of the caller as a child.

#or

Factory method to create a Grouping node that has an Or node as a child.

#to_sql

FIXME: this method should go away.

::Arel::FactoryMethods - Included

Constructor Details

.new(name, expr, aliaz = nil) ⇒ NamedFunction

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/named_function.rb', line 8

def initialize(name, expr, aliaz = nil)
  super(expr, aliaz)
  @name = name
end

Instance Attribute Details

#name (rw)

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/named_function.rb', line 6

attr_accessor :name

Instance Method Details

#==(other)

Alias for #eql?.

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/named_function.rb', line 20

alias :== :eql?

#eql?(other) ⇒ Boolean Also known as: #==

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/named_function.rb', line 17

def eql?(other)
  super && self.name == other.name
end

#hash

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/named_function.rb', line 13

def hash
  super ^ @name.hash
end