aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb
Commit message (Collapse)AuthorAgeFilesLines
* Fix bug with rolling back frozen attributes.Brian Durand2010-06-181-2/+2
| | | | | | [#2991] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Revert "Temporarily revert "Update after_commit and after_rollback docs and ↵Jeremy Kemper2010-06-081-0/+56
| | | | | | | | tests to use new style API with an :on options instead of on_* suffix." and "Add after_commit and after_rollback callbacks to ActiveRecord that are called after transactions either commit or rollback on all records saved or destroyed in the transaction."" This reverts commit 1b2941cba1165b0721f57524645fe378bee2a950. [#2991]
* Temporarily revert "Update after_commit and after_rollback docs and tests to ↵Jeremy Kemper2010-06-081-56/+0
| | | | | | | | | | | | | | use new style API with an :on options instead of on_* suffix." and "Add after_commit and after_rollback callbacks to ActiveRecord that are called after transactions either commit or rollback on all records saved or destroyed in the transaction." This reverts commits d2a49e4b1f30c5997e169110eed94a55aee53f56 and da840d13da865331297d5287391231b1ed39721b. [#2991] Conflicts: activerecord/CHANGELOG activerecord/lib/active_record/transactions.rb activerecord/test/cases/transaction_callbacks_test.rb
* Add after_commit and after_rollback callbacks to ActiveRecord that are ↵Brian Durand2010-04-291-0/+56
| | | | | | | | 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>
* Add add_limit_offset! to adapters.Emilio Tagua2010-03-251-0/+23
|
* avoid @transaction_joinable not initialized warningSantiago Pastorino2010-02-221-1/+1
|
* Remove locking related unused codePratik Naik2009-12-281-12/+0
|
* Create is now powered by Arel. Removed methods that are no longer used.Emilio Tagua2009-07-011-2/+2
|
* Removed unused methods.Emilio Tagua2009-06-231-27/+0
|
* Refactors to work with latest Arel implementation.Emilio Tagua2009-06-021-2/+2
|
* Fix PostgreSQL unit test failures that only occur when using the old ↵Hongli Lai (Phusion)2009-01-131-4/+8
| | | | | | | | 'postgres' driver. [#1748 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Introduce transaction_joinable flag to mark that the fixtures transaction ↵Jeremy Kemper2009-01-101-15/+16
| | | | | | 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 commit 'origin/master' into savepointsHongli Lai (Phusion)2008-12-031-4/+4
|\ | | | | | | | | | | Conflicts: activerecord/lib/active_record/fixtures.rb activerecord/test/cases/defaults_test.rb
| * undef abstract methods instead of raising NotImplementedError. Still need ↵Jeremy Kemper2008-11-071-4/+4
| | | | | | | | the definitions for rdoc though.
* | Reimplement Jeremy's PostgreSQL automatic transaction state introspection code.Hongli Lai (Phusion)2008-11-031-2/+18
| | | | | | | | | | | | - Fixed compatibility with the old 'postgres' driver which doesn't support transaction state introspection. - Added unit tests for it.
* | Improve documentation for DatabaseStatements#transactions and ↵Hongli Lai (Phusion)2008-11-031-6/+69
| | | | | | | | AbstractAdapter#transactional_fixtures, especially with regard to support for nested transactions.
* | Implement savepoints.Jonathan Viney2008-11-031-6/+10
|/
* Add documentation for AbstractAdapter#sanitize_limit, and make its code more ↵Hongli Lai (Phusion)2008-10-091-4/+15
| | | | | | | readable. Signed-off-by: Michael Koziarski <michael@koziarski.com> [#1068 status:committed]
* Merge docrailsPratik Naik2008-10-051-1/+7
|
* Support :limit on update_all so that has_many with :limit can be safely updatedTarmo Tänav2008-09-101-0/+4
| | | | Signed-off-by: Michael Koziarski <michael@koziarski.com>
* validates_uniqueness_of uses database case sensitivity support instead of ↵Tarmo Tänav2008-07-311-0/+4
| | | | | | using ruby Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Added SQL escaping for :limit and :offset [#288 state:closed] (Aaron Bedra, ↵David Heinemeier Hansson2008-05-311-2/+7
| | | | Steven Bristol, Jonathan Wiess)
* Merge docrails.Pratik Naik2008-05-251-2/+2
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Smattering of grammatical fixes to documentation. Closes #10083 [BobSilva]Marcel Molina2007-11-081-2/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8113 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Quote table names. Defaults to column quoting. Closes #4593.Jeremy Kemper2007-10-161-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7932 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Send the correct INSERT statement when dealing with objects with only ↵Michael Koziarski2007-10-061-0/+4
| | | | | | primary keys. Closes #9523 [tarmo] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7753 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed spelling errors (closes #9706) [tarmo/rmm5t]David Heinemeier Hansson2007-09-281-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7666 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Don't worry about retrieving the last inserted id. [tarmo_t]Jeremy Kemper2007-09-171-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7503 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Speed up and simplify query caching.Jeremy Kemper2007-09-171-8/+27
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7498 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* connection.select_rows 'sql' returns an array (rows) of arrays (field ↵Jeremy Kemper2007-09-161-2/+6
| | | | | | values). Closes #2329. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7497 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* minor speedups + forward-compat syntaxJeremy Kemper2007-09-131-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7471 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Mock the beginning of the transaction also. References #8642.Jeremy Kemper2007-06-231-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7089 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Rollback if commit raises an exception. Closes #8642.Jeremy Kemper2007-06-231-2/+9
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7088 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Oracle binary fixtures; pull fixture insertion into the adapters. Closes #7987.Jeremy Kemper2007-05-261-0/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6859 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Replace the transaction {|transaction|..} semantics with a new Exception ↵Michael Koziarski2007-05-181-8/+3
| | | | | | ActiveRecord::Rollback. Closes #8030 [Koz] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6754 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added database connection as a yield parameter to ↵David Heinemeier Hansson2007-02-211-1/+6
| | | | | | 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
* Oracle: resolve test failures, use prefetched primary key for inserts, check ↵Jeremy Kemper2006-11-011-4/+19
| | | | | | for null defaults. Factor out some common methods from all adapters. Closes #6515. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5384 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r4644@asus: jeremy | 2006-06-16 14:57:03 -0700Jeremy Kemper2006-06-191-0/+11
| | | | | | | | | | | | | | | | | | | | | 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
* r3616@asus: jeremy | 2005-09-26 23:09:28 -0700Jeremy Kemper2005-10-161-0/+9
| | | | | | | | | | | | | | | | | | | | | | | Ticket 2292 - Sequences, schemas, and fixtures r3917@asus: jeremy | 2005-10-15 10:43:24 -0700 fix pk assert r3918@asus: jeremy | 2005-10-15 10:46:52 -0700 rework query cache connection= override r3919@asus: jeremy | 2005-10-15 10:47:45 -0700 correct fixtures usage r3920@asus: jeremy | 2005-10-15 10:53:23 -0700 correct attr assignment r3921@asus: jeremy | 2005-10-15 12:59:10 -0700 sequences r3922@asus: jeremy | 2005-10-15 16:36:09 -0700 reset fixtures work with sequences r3951@asus: jeremy | 2005-10-15 23:23:12 -0700 cut down excess features r3952@asus: jeremy | 2005-10-15 23:40:30 -0700 don't test for PostgreSQL specifically git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2639 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Optimization refactoring for add_limit_offset!. In partial fullfilment of #1236.Marcel Molina2005-10-091-5/+7
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2509 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Forced newer versions of RedCloth to use hard breaks [DHH]David Heinemeier Hansson2005-10-021-2/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2436 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix broken testcase for transactionsNicholas Seckar2005-09-291-6/+10
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2409 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix transactions so that calling return while inside a transaction will not ↵Nicholas Seckar2005-09-281-4/+7
| | | | | | leave an open transaction on the connection. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2398 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add extensive documentation to the ActiveRecord::AbstractAdapter. #2250Marcel Molina2005-09-271-9/+20
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2371 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Refactored the AbstractAdapter to be a lot less scary. Cleaned up the docs ↵David Heinemeier Hansson2005-09-251-0/+73
and style for the OSS adapters git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2339 5ecf4fe2-1ee6-0310-87b1-e25e094e27de