123456789_123456789_123456789_123456789_123456789_

Class: Arel::Nodes::UpdateStatement

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/update_statement.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(relation = nil) ⇒ UpdateStatement

[ GitHub ]

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

def initialize(relation = nil)
  super()
  @relation = relation
  @wheres   = []
  @values   = []
  @groups   = []
  @havings  = []
  @orders   = []
  @limit    = nil
  @offset   = nil
  @key      = nil
end

Instance Attribute Details

#groups (rw)

[ GitHub ]

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

attr_accessor :relation, :wheres, :values, :groups, :havings, :orders, :limit, :offset, :key

#havings (rw)

[ GitHub ]

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

attr_accessor :relation, :wheres, :values, :groups, :havings, :orders, :limit, :offset, :key

#key (rw)

[ GitHub ]

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

attr_accessor :relation, :wheres, :values, :groups, :havings, :orders, :limit, :offset, :key

#limit (rw)

[ GitHub ]

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

attr_accessor :relation, :wheres, :values, :groups, :havings, :orders, :limit, :offset, :key

#offset (rw)

[ GitHub ]

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

attr_accessor :relation, :wheres, :values, :groups, :havings, :orders, :limit, :offset, :key

#orders (rw)

[ GitHub ]

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

attr_accessor :relation, :wheres, :values, :groups, :havings, :orders, :limit, :offset, :key

#relation (rw)

[ GitHub ]

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

attr_accessor :relation, :wheres, :values, :groups, :havings, :orders, :limit, :offset, :key

#values (rw)

[ GitHub ]

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

attr_accessor :relation, :wheres, :values, :groups, :havings, :orders, :limit, :offset, :key

#wheres (rw)

[ GitHub ]

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

attr_accessor :relation, :wheres, :values, :groups, :havings, :orders, :limit, :offset, :key

Instance Method Details

#==(other)

Alias for #eql?.

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/update_statement.rb', line 43

alias :== :eql?

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

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/update_statement.rb', line 31

def eql?(other)
  self.class == other.class &&
    self.relation == other.relation &&
    self.wheres == other.wheres &&
    self.values == other.values &&
    self.groups == other.groups &&
    self.havings == other.havings &&
    self.orders == other.orders &&
    self.limit == other.limit &&
    self.offset == other.offset &&
    self.key == other.key
end

#hash

[ GitHub ]

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

def hash
  [@relation, @wheres, @values, @orders, @limit, @offset, @key].hash
end

#initialize_copy(other)

[ GitHub ]

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

def initialize_copy(other)
  super
  @wheres = @wheres.clone
  @values = @values.clone
end