aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/delete_manager.rb
blob: 4759f116f1919155e6fc250856a6285b35298a31 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
module Arel
  class DeleteManager < Arel::TreeManager
    def initialize engine
      super
      @head = Nodes::DeleteStatement.new
    end

    def from relation
      @head.relation = relation
      self
    end

    def where expression
      @head.wheres << expression
      self
    end

    def wheres= list
      @head.wheres = list
    end
  end
end