aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/algebra/relations/operations/lock.rb
blob: 4520fd668b95904885bb2d90ae1e2db306e2cf7f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
module Arel
  class Lock < Compound
    attributes :relation, :locked
    deriving :==

    def initialize(relation, locked)
      @relation = relation
      @locked   = locked.blank? ? " FOR UPDATE" : locked
    end
  end
end