2017-02-13 13:58:58 -05:00
|
|
|
# frozen_string_literal: true
|
2018-02-24 01:45:50 -05:00
|
|
|
|
2018-02-24 02:41:47 -05:00
|
|
|
module Arel # :nodoc: all
|
2010-08-18 14:32:44 -04:00
|
|
|
class DeleteManager < Arel::TreeManager
|
2018-09-30 05:30:47 -04:00
|
|
|
include TreeManager::StatementMethods
|
|
|
|
|
2014-11-29 19:22:17 -05:00
|
|
|
def initialize
|
2010-08-18 14:32:44 -04:00
|
|
|
super
|
2010-11-05 17:09:09 -04:00
|
|
|
@ast = Nodes::DeleteStatement.new
|
2010-12-07 13:46:30 -05:00
|
|
|
@ctx = @ast
|
2010-08-18 14:32:44 -04:00
|
|
|
end
|
|
|
|
|
2018-02-24 01:45:50 -05:00
|
|
|
def from(relation)
|
2010-11-05 17:09:09 -04:00
|
|
|
@ast.relation = relation
|
2010-08-18 14:32:44 -04:00
|
|
|
self
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|