123456789_123456789_123456789_123456789_123456789_

Class: Arel::Nodes::DeleteStatement

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/delete_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, wheres = []) ⇒ DeleteStatement

[ GitHub ]

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

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

Instance Attribute Details

#groups (rw)

[ GitHub ]

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

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

#havings (rw)

[ GitHub ]

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

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

#key (rw)

[ GitHub ]

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

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

#limit (rw)

[ GitHub ]

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

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

#offset (rw)

[ GitHub ]

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

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

#orders (rw)

[ GitHub ]

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

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

#relation (rw)

[ GitHub ]

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

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

#wheres (rw)

[ GitHub ]

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

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

Instance Method Details

#==(other)

Alias for #eql?.

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/delete_statement.rb', line 41

alias :== :eql?

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

[ GitHub ]

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

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

#hash

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/delete_statement.rb', line 26

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

#initialize_copy(other)

[ GitHub ]

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

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