Class: Arel::DeleteManager

Inherits:
TreeManager show all
Includes:
TreeManager::StatementMethods
Defined in:
activerecord/lib/arel/delete_manager.rb

Instance Attribute Summary

Attributes inherited from TreeManager

#ast

Instance Method Summary collapse

Methods included from TreeManager::StatementMethods

#key, #key=, #offset, #order, #take, #where, #wheres=

Methods inherited from TreeManager

#initialize_copy, #to_dot, #to_sql

Methods included from FactoryMethods

#coalesce, #create_and, #create_false, #create_join, #create_on, #create_string_join, #create_table_alias, #create_true, #grouping, #lower

Constructor Details

#initialize(table = nil) ⇒ DeleteManager

Returns a new instance of DeleteManager.


7
8
9
# File 'activerecord/lib/arel/delete_manager.rb', line 7

def initialize(table = nil)
  @ast = Nodes::DeleteStatement.new(table)
end

Instance Method Details

#from(relation) ⇒ Object


11
12
13
14
# File 'activerecord/lib/arel/delete_manager.rb', line 11

def from(relation)
  @ast.relation = relation
  self
end