Class: Arel::DeleteManager

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

Instance Attribute Summary

Attributes inherited from TreeManager

#ast, #engine

Instance Method Summary collapse

Methods inherited from TreeManager

#initialize_copy, #to_dot, #to_sql, #visitor, #where

Methods included from FactoryMethods

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

Constructor Details

#initialize(engine) ⇒ DeleteManager


3
4
5
6
7
# File 'lib/arel/delete_manager.rb', line 3

def initialize engine
  super
  @ast = Nodes::DeleteStatement.new
  @ctx = @ast
end

Instance Method Details

#from(relation) ⇒ Object


9
10
11
12
# File 'lib/arel/delete_manager.rb', line 9

def from relation
  @ast.relation = relation
  self
end

#wheres=(list) ⇒ Object


14
15
16
# File 'lib/arel/delete_manager.rb', line 14

def wheres= list
  @ast.wheres = list
end