Module: Sequel::PG::Locker

Defined in:
lib/sequel-pg-locker.rb

Class Method Summary collapse

Class Method Details

.lock(id) ⇒ Object



8
9
10
# File 'lib/sequel-pg-locker.rb', line 8

def self.lock(id)
  db["SELECT pg_try_advisory_lock(#{id})"].get
end