aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/locking
Commit message (Collapse)AuthorAgeFilesLines
* Make it the responsibility of the connection to hold onto an ARel visitor ↵Jon Leighton2011-08-081-2/+2
| | | | for generating SQL. This improves the code architecture generally, and solves some problems with marshalling. Adapter authors please take note: you now need to define an Adapter.visitor_for method, but it degrades gracefully with a deprecation warning for now.
* lock_optimistically is typically true, so evaluate the common failure case firstAaron Patterson2011-06-281-1/+1
|
* Closes GH #1032John Paul Ashenfelter2011-05-191-1/+1
| | | | Fixed what looks like minor cut/paste error in documentation for ActiveRecord::Locking:Pessimistic
* Better doc styling in ActiveRecord::LockingSebastian Martinez2011-05-172-17/+17
|
* Don't quote ID's as Arel will quote them -- follow same conventions as the ↵Christopher Meiklejohn2011-05-081-1/+1
| | | | delete method.
* remove some blanksPaco Guzman2011-03-112-4/+4
|
* fixed broken link to postgresql docsSergii Boiko2011-02-151-1/+1
| | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* removed some duplication from LH issue 5505 regarding AR touch and ↵Josh Kalderimis2011-02-091-4/+10
| | | | | | optimistic locking [#5505 state:resolved] Signed-off-by: Santiago Pastorino and José Ignacio Costa <santiago+jose@wyeworks.com>
* removing more calls to deprecated methodsAaron Patterson2010-12-021-2/+4
|
* Remove explicit return.Emilio Tagua2010-11-251-1/+1
| | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Reuse lock_col variable instead calling locking_column class method.Emilio Tagua2010-11-251-3/+4
| | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Don't create local vars.Emilio Tagua2010-11-241-4/+1
|
* use persisted? instead of new_record? wherever possibleDavid Chelimsky2010-11-092-2/+2
| | | | | | | | | | | - persisted? is the API defined in ActiveModel - makes it easier for extension libraries to conform to ActiveModel APIs without concern for whether the extended object is specifically ActiveRecord [#5927 state:committed] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Use new finders syntax in docs.Emilio Tagua2010-09-011-3/+3
|
* Set destroyed=true in opt locking's destroy [#5058 state:resolved]Jacob Lewallen2010-07-141-0/+1
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Use arel instead of sql stringsPratik Naik2010-05-111-6/+5
|
* eliminate alias_method_chain from ActiveRecordwycats2010-05-091-19/+8
|
* Destroy respects optimistic locking.Curtis Hawthorne2010-04-271-1/+34
| | | | | | | | | | Now works with :dependent => :destroy and includes unit tests for that case. Also includes better error messages when updating/deleting stale objects. [#1966 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Dont delegate Relation#update to arelPratik Naik2010-01-201-1/+1
|
* Give preference to to_a over arel from Relation#method_missingPratik Naik2010-01-191-2/+2
|
* Rename Model.active_relation to Model.unscopedPratik Naik2010-01-171-1/+1
|
* Rename Model.arel_table to Model.active_relationPratik Naik2010-01-021-4/+4
|
* Remove unncessary arguments passed to arel_tablePratik Naik2010-01-011-1/+1
|
* Revert "Ensure Model#destroy respects optimistic locking"Jeremy Kemper2009-11-171-34/+0
| | | | | | | | | | [#1966 state:open] This reverts commit 0d922885fb54c19f04680482f024452859218910. Conflicts: activerecord/lib/active_record/locking/optimistic.rb
* Merge commit 'rails/master'Emilio Tagua2009-09-141-22/+0
|\
| * Removed the copyright notice not to show it in the result of 'ri ActiveRecord'.Shugo Maeda2009-09-111-22/+0
| |
* | Cache arel_table when possible, use class method arel_table insteadEmilio Tagua2009-08-181-2/+6
| | | | | | | | instance method.
* | Performance: cache/reload arel relation when possible to speed up things.Emilio Tagua2009-07-211-2/+2
| |
* | Merge commit 'rails/master'Emilio Tagua2009-06-021-1/+1
|\| | | | | | | | | | | Conflicts: activerecord/lib/active_record.rb
| * Break up DependencyModule's dual function of providing a "depend_on" DSL and ↵Joshua Peek2009-05-281-1/+1
| | | | | | | | "included" block DSL into separate modules. But, unify both approaches under AS::Concern.
* | Merge commit 'rails/master'Emilio Tagua2009-05-121-8/+8
|\|
| * Use DependencyModule for included hooks in ActiveRecordBryan Helmkamp2009-05-111-8/+8
| |
* | Refactor to use arel_table method, and also use the same method name for ↵Emilio Tagua2009-05-021-6/+6
| | | | | | | | instance and class methods.
* | Removed ARel table assignmentEmilio Tagua2009-05-021-1/+0
| |
* | Added arel_attributes_values methods, refactored locking and AR#update to ↵Emilio Tagua2009-04-301-8/+1
| | | | | | | | use this method
* | Refactored locking updateEmilio Tagua2009-04-241-7/+9
| |
* | Changed locking to use Arel. Arel updatedEmilio Tagua2009-04-241-14/+19
|/
* Ensure Model#destroy respects optimistic locking [#1966 state:resolved]Curtis Hawthorne2009-03-091-0/+33
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Partial updates don't update lock_version if nothing changed. [#426 ↵Daniel Morrison2008-06-221-0/+1
| | | | state:resolved]
* Merge docrails.Pratik Naik2008-05-251-7/+7
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Improve documentation coverage and markupXavier Noria2008-05-021-2/+2
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Fixed that pessimistic locking you reference the quoted table name (Josh ↵David Heinemeier Hansson2008-04-301-1/+1
| | | | Susser) [#67 state:resolved]
* Partial updates include only unsaved attributes. Off by default; set ↵Jeremy Kemper2008-03-311-3/+6
| | | | | | YourClass.partial_updates = true to enable. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9157 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ensure optimistic locking handles nil #lock_version values properly. Closes ↵Rick Olson2007-12-151-1/+1
| | | | | | #10510 [rick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8395 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* attr_readonly behaves well with optimistic locking. Closes #10188.Jeremy Kemper2007-11-161-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8156 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Optimistic locking: revert the lock version when an update fails. Closes ↵Jeremy Kemper2007-05-251-16/+23
| | | | | | #7840. Also return the number of affected rows instead of true. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6843 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Provide brief introduction to what optimistic locking is. Closes #8097. ↵Marcel Molina2007-05-061-0/+10
| | | | | | [fearoffish] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6682 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Consistent public/protected/private visibility for chained methods. Closes ↵Jeremy Kemper2007-03-131-28/+28
| | | | | | #7813. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6396 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Made increment_counter/decrement_counter play nicely with optimistic ↵Jamis Buck2007-02-071-2/+23
| | | | | | locking, and added a more general update_counters method git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6139 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Don't create instance writer methods for class attributes. Closes #7401 [Rick]Rick Olson2007-01-281-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6051 5ecf4fe2-1ee6-0310-87b1-e25e094e27de