method

add_lock!

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

Appends a locking clause to a SQL statement. *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.