Example #1
0
 /**
  * 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'
  *
  * @param string &$sql    SQL statment.
  * @param array $options  TODO.
  */
 public function addLock(&$sql, array $options = array())
 {
     $this->_write->addLock($sql, $options);
     $this->_lastQuery = $this->_write->getLastQuery();
 }