123456789_123456789_123456789_123456789_123456789_

Class: Arel::Nodes::BindParam

Do not use. This class is for internal use only.
Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, Node
Instance Chain:
Inherits: Arel::Nodes::Node
Defined in: activerecord/lib/arel/nodes/bind_param.rb

Class Method Summary

Instance Attribute Summary

Instance Method Summary

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(value) ⇒ BindParam

[ GitHub ]

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

def initialize(value)
  @value = value
  super()
end

Instance Attribute Details

#infinite?Boolean (readonly)

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/bind_param.rb', line 35

def infinite?
  value.respond_to?(:infinite?) && value.infinite?
end

#nil?Boolean (readonly)

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/bind_param.rb', line 23

def nil?
  value.nil?
end

#unboundable?Boolean (readonly)

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/bind_param.rb', line 39

def unboundable?
  value.respond_to?(:unboundable?) && value.unboundable?
end

#value (readonly)

[ GitHub ]

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

attr_reader :value

Instance Method Details

#==(other)

Alias for #eql?.

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/bind_param.rb', line 21

alias :== :eql?

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

[ GitHub ]

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

def eql?(other)
  other.is_a?(BindParam) &&
    value == other.value
end

#hash

[ GitHub ]

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

def hash
  [self.class, self.value].hash
end

#value_before_type_cast

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/bind_param.rb', line 27

def value_before_type_cast
  if value.respond_to?(:value_before_type_cast)
    value.value_before_type_cast
  else
    value
  end
end