Class: Fatalistic::PostgresLocker
Overview
Table locking for Postgres.
Instance Attribute Summary
Attributes inherited from Locker
Instance Method Summary collapse
Methods inherited from Locker
Constructor Details
This class inherits a constructor from Fatalistic::Locker
Instance Method Details
#lock(lock_statement = nil) ⇒ Object
46 47 48 49 50 |
# File 'lib/fatalistic.rb', line 46 def lock(lock_statement = nil) stmt = "LOCK TABLE #{quoted_table_name}" stmt.insert(-1, " #{lock_statement}") if lock_statement connection.execute(stmt) end |