mirror of
https://github.com/github/rails.git
synced 2026-01-29 16:28:09 -05:00
r4667@asus: jeremy | 2006-06-20 00:59:15 -0700
tpyo git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4463 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
*SVN*
|
||||
|
||||
* Row locking. Provide a locking clause with the :lock finder option or true for the default "FOR UPDATE". Use the #lock method to obtain a row lock on a single reload (reloads the record with :lock => true). [Shugo Maeda]
|
||||
* Row locking. Provide a locking clause with the :lock finder option or true for the default "FOR UPDATE". Use the #lock! method to obtain a row lock on a single record (reloads the record with :lock => true). [Shugo Maeda]
|
||||
# Obtain an exclusive lock on person 1 so we can safely increment visits.
|
||||
Person.transaction do
|
||||
# select * from people where id=1 for update
|
||||
|
||||
Reference in New Issue
Block a user