aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/algebra/relations/operations/lock.rb
blob: 394ad6f0ecd13cc92d9687902f0d88131c1a4afa (plain) (blame)
1
2
3
4
5
6
7
8
9
10
module Arel
  class Lock < Compound
    attr_reader :locked

    def initialize(relation, locked)
      super(relation)
      @locked = true == locked ? " FOR UPDATE" : locked
    end
  end
end