Class: Arel::DeleteManager
- Inherits:
-
TreeManager
- Object
- TreeManager
- Arel::DeleteManager
- Defined in:
- lib/arel/delete_manager.rb
Instance Attribute Summary
Attributes inherited from TreeManager
Instance Method Summary collapse
- #from(relation) ⇒ Object
-
#initialize ⇒ DeleteManager
constructor
A new instance of DeleteManager.
- #take(limit) ⇒ Object
- #wheres=(list) ⇒ Object
Methods inherited from TreeManager
#initialize_copy, #to_dot, #to_sql, #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 ⇒ DeleteManager
Returns a new instance of DeleteManager.
4 5 6 7 8 |
# File 'lib/arel/delete_manager.rb', line 4 def initialize super @ast = Nodes::DeleteStatement.new @ctx = @ast end |
Instance Method Details
#from(relation) ⇒ Object
10 11 12 13 |
# File 'lib/arel/delete_manager.rb', line 10 def from relation @ast.relation = relation self end |
#take(limit) ⇒ Object
15 16 17 18 |
# File 'lib/arel/delete_manager.rb', line 15 def take limit @ast.limit = Nodes::Limit.new(Nodes.build_quoted(limit)) if limit self end |
#wheres=(list) ⇒ Object
20 21 22 |
# File 'lib/arel/delete_manager.rb', line 20 def wheres= list @ast.wheres = list end |