Class: Arel::DeleteManager
Do not use. This class is for internal use only.
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
TreeManager
|
|
Instance Chain:
|
|
Inherits: |
Arel::TreeManager
|
Defined in: | activerecord/lib/arel/delete_manager.rb |
Class Method Summary
- .new(table = nil) ⇒ DeleteManager constructor
Instance Attribute Summary
Instance Method Summary
TreeManager::StatementMethods
- Included
TreeManager
- Inherited
FactoryMethods
- Included
#cast, #coalesce, #create_and, #create_false, #create_join, #create_on, #create_string_join, #create_table_alias, #create_true, #grouping, | |
#lower | Create a LOWER() function. |
Constructor Details
.new(table = nil) ⇒ DeleteManager
# File 'activerecord/lib/arel/delete_manager.rb', line 7
def initialize(table = nil) @ast = Nodes::DeleteStatement.new(table) end
Instance Method Details
#from(relation)
[ GitHub ]# File 'activerecord/lib/arel/delete_manager.rb', line 11
def from(relation) @ast.relation = relation self end
#group(columns)
[ GitHub ]# File 'activerecord/lib/arel/delete_manager.rb', line 16
def group(columns) columns.each do |column| column = Nodes::SqlLiteral.new(column) if String === column column = Nodes::SqlLiteral.new(column.to_s) if Symbol === column @ast.groups.push Nodes::Group.new column end self end
#having(expr)
[ GitHub ]# File 'activerecord/lib/arel/delete_manager.rb', line 27
def having(expr) @ast.havings << expr self end