aboutsummaryrefslogblamecommitdiffstats
path: root/lib/arel/algebra/relations/operations/lock.rb
blob: 0d6c12e65bcc5db100d630347ffacb43e3936531 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12











                                                        
module Arel
  class Lock < Compound
    attributes :relation, :locked
    deriving :initialize, :==

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