Jonathan Viney
4f72feb84c
Move the transaction counter to the connection object rather than maintaining it on the current Thread.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#533 state:resolved]
2008-07-15 21:25:12 +02:00
Pratik Naik
98dc582742
Merge docrails.
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-05-25 12:29:00 +01:00
Pratik Naik
aa4af60aad
Improve documentation.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9226 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-05 03:52:58 +00:00
Jeremy Kemper
38f8252e2d
Remove leaky unused signal handler for transactions.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8484 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-22 19:05:26 +00:00
Jeremy Kemper
8b5f4e474f
Ruby 1.9 compat: fix warnings, shadowed block vars, and unitialized instance vars
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8481 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-22 11:26:03 +00:00
Tobias Lütke
a25b2e116c
Removed documentation for the removed rollback! method on transactions and mention ActiveRecord::Rollback [cody]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8240 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-11-29 22:25:42 +00:00
Marcel Molina
7143d80147
Smattering of grammatical fixes to documentation. Closes #10083 [BobSilva]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8113 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-11-08 03:37:16 +00:00
Marcel Molina
96fa4a2f52
Make transaction documentation example more realistic
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8097 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-11-06 19:11:42 +00:00
Marcel Molina
4f59aacb68
Explain semantics of having several different AR instances in a transaction block. Closes #9036 [jacobat, Marcel Molina]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8096 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-11-06 19:04:54 +00:00
Michael Koziarski
5b801b5960
Change the implementation of ActiveRecord's attribute reader and writer methods:
...
* 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
2007-08-14 08:53:02 +00:00
Michael Koziarski
f87db851c6
Remove deprecated object transactions. People relying on this functionality 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
2007-03-16 22:39:01 +00:00
David Heinemeier Hansson
25bb98e42d
Added database connection as a yield parameter to 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
2007-02-21 22:13:39 +00:00
Jeremy Kemper
3b6555acd4
Fix new_record? and id rollback. Closes #6910 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5886 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-12 05:10:06 +00:00
Rick Olson
1af2022cc3
Rollback #new_record? and #id values for created records that rollback in an after_save callback. Closes #6910 [Ben Curren]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5830 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-02 05:36:30 +00:00
Jeremy Kemper
88d9b32496
Deprecation: object transactions warning.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5405 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-02 18:12:18 +00:00
Jeremy Kemper
629b8af2b0
Wrap save! in a transaction. Closes #6324 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5281 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-10-10 19:34:25 +00:00
Jeremy Kemper
15aa6e0552
r4644@asus: jeremy | 2006-06-16 14:57:03 -0700
...
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
2006-06-19 22:48:51 +00:00
Marcel Molina
9f92dd3984
Replace alias method chaining with Module#alias_method_chain. [Marcel Molina Jr.]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4312 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-04-29 20:20:22 +00:00
Marcel Molina
6186490962
Replace Ruby's deprecated append_features in favor of included. [Marcel Molina Jr.]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4310 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-04-29 18:10:14 +00:00
David Heinemeier Hansson
a8eea0b04b
Fix docs ( closes #2491 )
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2744 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-26 13:05:48 +00:00
David Heinemeier Hansson
caaf40d535
Added AbstractAdapter#select_value and AbstractAdapter#select_values as 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
2005-09-24 19:50:57 +00:00
David Heinemeier Hansson
a677da209b
Added rollbacks of transactions if they're active as the dispatcher is killed gracefully (TERM signal) #1054 [Leon Bredt]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1136 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-04-10 17:34:29 +00:00
David Heinemeier Hansson
4eab375805
Finished polishing API docs
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@773 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-02-23 23:51:34 +00:00
David Heinemeier Hansson
098fa94356
Fixed documentation snafus #575 , #576 , #577 , #585
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@525 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-02-07 14:15:53 +00:00
David Heinemeier Hansson
50562c2a7e
Restored thread safety to Active Record [andreas]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@285 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-30 14:51:04 +00:00
David Heinemeier Hansson
3be52ef47c
Transactions are now actually working on the database level on save, but 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
2004-12-30 14:29:44 +00:00
David Heinemeier Hansson
44819b4717
Fixed that nested transactions now work by letting the outer most 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
2004-12-22 00:48:24 +00:00
David Heinemeier Hansson
db045dbbf6
Initial
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-11-24 01:04:44 +00:00