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
  @comment   = nil
  @key       = nil
  @returning = []
end

Instance Attribute Details

#comment (rw)

[ GitHub ]

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

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

#groups (rw)

[ GitHub ]

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

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

#havings (rw)

[ GitHub ]

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

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

#key (rw)

[ GitHub ]

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

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

#limit (rw)

[ GitHub ]

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

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

#offset (rw)

[ GitHub ]

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

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

#orders (rw)

[ GitHub ]

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

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

#relation (rw)

[ GitHub ]

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

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

#returning (rw)

[ GitHub ]

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

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

#values (rw)

[ GitHub ]

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

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

#wheres (rw)

[ GitHub ]

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

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

Instance Method Details

#==(other)

Alias for #eql?.

[ GitHub ]

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

alias :== :eql?

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

[ GitHub ]

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

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.comment == other.comment &&
    self.key == other.key &&
    self.returning == other.returning
end

#hash

[ GitHub ]

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

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

#initialize_copy(other)

[ GitHub ]

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

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