aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/algebra/relations/writes/insert.rb
blob: 6d85e9769a08d2ae7923fc6c82305d54648f2ac2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
module Arel
  class Insert < Compound
    attributes :relation, :record
    deriving :==

    def initialize(relation, record)
      @relation, @record = relation, record.bind(relation)
    end

    def call
      engine.create(self)
    end
  end
end