Flowdock
method

add_lock!

Importance_1
v2.0.0 - Show latest stable - 0 notes - Class: ActiveRecord::ConnectionAdapters::DatabaseStatements
add_lock!(sql, options) public

Appends a locking clause to an SQL statement. This method modifies the sql parameter.

  # SELECT * FROM suppliers FOR UPDATE
  add_lock! 'SELECT * FROM suppliers', :lock => true
  add_lock! 'SELECT * FROM suppliers', :lock => ' FOR UPDATE'
Show source
Register or log in to add new notes.