aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/transactions.rb
Commit message (Collapse)AuthorAgeFilesLines
* eliminate alias_method_chain from ActiveRecordwycats2010-05-091-12/+10
|
* edit pass in the transactions preamble rdocXavier Noria2010-05-021-24/+31
|
* after_(commit|rollback) rdoc, edit passXavier Noria2010-04-301-5/+5
|
* Update after_commit and after_rollback docs and tests to use new style API ↵Brian Durand2010-04-291-5/+0
| | | | | | | | with an :on options instead of on_* suffix. [#2991] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Add after_commit and after_rollback callbacks to ActiveRecord that are ↵Brian Durand2010-04-291-14/+117
| | | | | | | | called after transactions either commit or rollback on all records saved or destroyed in the transaction. [#2991 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* save(false) is gone, use save(:validate => false) instead.José Valim2010-01-171-2/+2
|
* 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.
* Use DependencyModule for included hooks in ActiveRecordBryan Helmkamp2009-05-111-7/+5
|
* Merge docrailsPratik Naik2009-04-051-0/+2
|
* Revert "Wrap calls to update_attributes in a transaction."Michael Koziarski2009-02-221-15/+1
| | | | | | | This caused failures on sqlite, sqlite3 and postgresql This reverts commit fc09ebc669bd58f415f7d3ef932ef02dab821ab5. [#922 state:reopened]
* Wrap calls to update_attributes in a transaction.Xavier Noria2009-02-221-1/+15
| | | | | Signed-off-by: Michael Koziarski <michael@koziarski.com> [#922 state:committed]
* Introduce transaction_joinable flag to mark that the fixtures transaction ↵Jeremy Kemper2009-01-101-15/+12
| | | | | | can't joined, a new savepoint is required even if :requires_new is not set. Use :requires_new option instead of :nest. Update changelog. [#383 state:committed]
* Merge branch 'master' into savepointsJeremy Kemper2009-01-101-2/+2
|\
| * Don't use the transaction instance method so that people with ↵Frederick Cheung2008-12-101-2/+2
| | | | | | | | | | | | | | | | has_one/belongs_to :transaction aren't fubared [#1551 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* | Rename ActiveRecord::Base#transaction's :force option to :nest. Improve ↵Hongli Lai (Phusion)2008-11-031-2/+57
| | | | | | | | documentation for nested transactions.
* | Improve documentation for DatabaseStatements#transactions and ↵Hongli Lai (Phusion)2008-11-031-0/+2
| | | | | | | | AbstractAdapter#transactional_fixtures, especially with regard to support for nested transactions.
* | Implement savepoints.Jonathan Viney2008-11-031-8/+4
|/
* Merge docrailsPratik Naik2008-10-051-18/+69
|
* Merge docrailsPratik Naik2008-09-031-1/+1
|
* Rollback the transaction when a before_* callback returns false.Xavier Noria2008-08-241-2/+14
| | | | | | | Previously this would have committed the transaction but not carried out save or destroy operation. [#891 state:committed] Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Merge docrails changesPratik Naik2008-07-281-3/+6
|
* Move the transaction counter to the connection object rather than ↵Jonathan Viney2008-07-151-14/+3
| | | | | | | maintaining it on the current Thread. Signed-off-by: Michael Koziarski <michael@koziarski.com> [#533 state:resolved]
* Merge docrails.Pratik Naik2008-05-251-2/+2
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Improve documentation.Pratik Naik2008-04-051-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9226 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove leaky unused signal handler for transactions.Jeremy Kemper2007-12-221-2/+0
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8484 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ruby 1.9 compat: fix warnings, shadowed block vars, and unitialized instance ↵Jeremy Kemper2007-12-221-3/+3
| | | | | | vars git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8481 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Removed documentation for the removed rollback! method on transactions and ↵Tobias Lütke2007-11-291-12/+2
| | | | | | mention ActiveRecord::Rollback [cody] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8240 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Smattering of grammatical fixes to documentation. Closes #10083 [BobSilva]Marcel Molina2007-11-081-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8113 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make transaction documentation example more realisticMarcel Molina2007-11-061-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8097 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Explain semantics of having several different AR instances in a transaction ↵Marcel Molina2007-11-061-0/+13
| | | | | | block. Closes #9036 [jacobat, Marcel Molina] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8096 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Change the implementation of ActiveRecord's attribute reader and writer methods:Michael Koziarski2007-08-141-1/+2
| | | | | | | | | | | * Generate Reader and Writer methods which cache attribute values in hashes. This is to avoid repeatedly parsing the same date or integer columns. * Move the attribute related methods out to attribute_methods.rb to de-clutter base.rb * Change exception raised when users use find with :select then try to access a skipped column. Plugins could override missing_attribute() to lazily load the columns. * Move method definition to the class, instead of the instance * Always generate the readers, writers and predicate methods. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7315 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove deprecated object transactions. People relying on this functionality ↵Michael Koziarski2007-03-161-39/+4
| | | | | | should install the object_transactions plugin at http://code.bitsweat.net/svn/object_transactions. Closes #5637 [Koz, Jeremy Kemper] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6439 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added database connection as a yield parameter to ↵David Heinemeier Hansson2007-02-211-0/+11
| | | | | | ActiveRecord::Base.transaction so you can manually rollback [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6196 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix new_record? and id rollback. Closes #6910.Jeremy Kemper2007-01-121-15/+14
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5886 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Rollback #new_record? and #id values for created records that rollback in an ↵Rick Olson2007-01-021-2/+19
| | | | | | after_save callback. Closes #6910 [Ben Curren] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5830 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Deprecation: object transactions warning.Jeremy Kemper2006-11-021-5/+14
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5405 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Wrap save! in a transaction. Closes #6324.Jeremy Kemper2006-10-101-2/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5281 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r4644@asus: jeremy | 2006-06-16 14:57:03 -0700Jeremy Kemper2006-06-191-17/+14
| | | | | | | | | | | | | | | | | | | | | locking r4645@asus: jeremy | 2006-06-17 12:41:30 -0700 missing reply fixture r4646@asus: jeremy | 2006-06-19 13:05:23 -0700 Use a per-thread (rather than global) transaction mutex so you may execute concurrent transactions on separate connections. r4647@asus: jeremy | 2006-06-19 13:07:23 -0700 PostgreSQL: introduce allow_concurrency option which determines whether to use blocking or asynchronous #execute. Adapters with blocking #execute will deadlock Ruby threads. The default value is ActiveRecord::Base.allow_concurrency. r4648@asus: jeremy | 2006-06-19 13:08:40 -0700 Pass the default allow_concurrency when instantiating new connections. r4649@asus: jeremy | 2006-06-19 13:11:12 -0700 Break out concurrent transaction tests and run them for PostgreSQLAdapter only (need to fork or system('some_test_script') for the other adapters) r4650@asus: jeremy | 2006-06-19 13:42:48 -0700 Row locking. Provide a locking clause with the :lock finder option or true for the default "FOR UPDATE". r4661@asus: jeremy | 2006-06-19 15:36:51 -0700 excise the junk mutex git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4460 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Replace alias method chaining with Module#alias_method_chain. [Marcel Molina ↵Marcel Molina2006-04-291-5/+3
| | | | | | Jr.] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4312 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Replace Ruby's deprecated append_features in favor of included. [Marcel ↵Marcel Molina2006-04-291-2/+1
| | | | | | Molina Jr.] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4310 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix docs (closes #2491)David Heinemeier Hansson2005-10-261-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2744 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added AbstractAdapter#select_value and AbstractAdapter#select_values as ↵David Heinemeier Hansson2005-09-241-3/+1
| | | | | | convenience methods for selecting single values, instead of hashes, of the first column in a SELECT #2283 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2323 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added rollbacks of transactions if they're active as the dispatcher is ↵David Heinemeier Hansson2005-04-101-0/+7
| | | | | | killed gracefully (TERM signal) #1054 [Leon Bredt] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1136 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Finished polishing API docsDavid Heinemeier Hansson2005-02-231-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@773 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed documentation snafus #575, #576, #577, #585David Heinemeier Hansson2005-02-071-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@525 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Restored thread safety to Active Record [andreas]David Heinemeier Hansson2004-12-301-10/+16
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@285 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Transactions are now actually working on the database level on save, but ↵David Heinemeier Hansson2004-12-301-1/+2
| | | | | | thread safety is currently out the window. Andreas is working on it git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@284 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that nested transactions now work by letting the outer most ↵David Heinemeier Hansson2004-12-221-13/+11
| | | | | | transaction have the responsibilty of starting and rolling back the transaction. If any of the inner transactions swallow the exception raised, though, the transaction will not be rolled back. So always let the transaction bubble up even when you've dealt with local issues. Closes #231 and #340. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@242 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* InitialDavid Heinemeier Hansson2004-11-241-0/+119
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4 5ecf4fe2-1ee6-0310-87b1-e25e094e27de