aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/abstract
Commit message (Collapse)AuthorAgeFilesLines
* Make connection pool retrieval fasterJon Leighton2012-08-311-10/+13
| | | | | | * Loop rather than recurse in retrieve_connection_pool * Key the hash by class rather than class name. This avoids creating unnecessary strings.
* use Hash#fetch to eliminate conditionalAaron Patterson2012-08-241-8/+3
|
* This method is useless without a block, so remove testAaron Patterson2012-08-201-11/+9
|
* remove unused variableAaron Patterson2012-08-201-1/+1
|
* initialize instance variables to avoid conditionalsAaron Patterson2012-08-201-2/+7
|
* load active_support/deprecation in active_support/railsXavier Noria2012-08-021-1/+0
|
* load active_support/core_ext/object/blank in active_support/railsXavier Noria2012-08-021-1/+0
|
* Deprecate Relation#all.Jon Leighton2012-07-271-1/+1
| | | | | | It has been moved to active_record_deprecated_finders. Use #to_a instead.
* Add fkey attributes to `join_table` migration generatorAleksey Magusev2012-07-191-3/+3
|
* revert Default timestamps to non-nullDave Kroondyk2012-07-181-1/+1
| | | | | | | Commit 3dbedd2 added NOT NULL constraints to timestamps. Commit fcef728 started to revert this, but was incomplete. With this commit, 3dbedd2 should be fully reverted and timestamps will no longer default to NOT NULL.
* Add join table migration generatorAleksey Magusev2012-07-181-2/+5
| | | | | | | | | | | | | For instance, running rails g migration CreateMediaJoinTable artists musics:uniq will create a migration with create_join_table :artists, :musics do |t| # t.index [:artist_id, :music_id] t.index [:music_id, :artist_id], unique: true end
* Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-07-071-2/+4
|\
| * fix AR::SchemaStatements#column_exists? example [ci skip]Francesco Rodriguez2012-06-301-1/+1
| |
| * update AR::SchemaStatements#column_exists? documentation [ci skip]Francesco Rodriguez2012-06-301-2/+4
| |
* | Refactor locked? method in query cacheCarlos Antonio da Silva2012-07-071-5/+2
| | | | | | | | Introduced in 75b340d1a4bcf2f1233fb65a15ff6b8059e2230e
* | Disable query cache for lock queriesDamir Zekic2012-07-061-1/+9
| | | | | | | | Fixes #867
* | fix quoting for ActiveSupport::Duration instancesFrancesco Rodriguez2012-07-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes quoting for ActiveSupport::Duration instances: # before >> ActiveRecord::Base.connection.quote 30.minutes => "'--- 1800\n...\n'" # after >> ActiveRecord::Base.connection.quote 30.minutes => "1800" Also, adds a test for type casting ActiveSupport::Duration instances. Related to #1119.
* | Don't need to use delete in the options hashRafael Mendonça França2012-07-032-3/+2
| |
* | Refactor references schema definitionsAleksey Magusev2012-07-031-18/+12
| |
* | Add references schema statementsAleksey Magusev2012-07-031-0/+37
| | | | | | | | | | | | | | | | | | | | Examples: add_reference :products, :supplier, polymorphic: true, index: true remove_reference :products, :user `add_belongs_to` and `remove_belongs_to` are acceptable.
* | Add more options to column_exists? methodAleksey Magusev2012-06-301-4/+6
|/ | | | Also fix failures in check options for nil
* add :nodoc: to internal implementations [ci skip]Francesco Rodriguez2012-06-221-1/+1
|
* Avoid unnecessary catching of Exception instead of StandardError.Dylan Smith2012-06-171-2/+2
|
* Simplify AR configuration code.Jon Leighton2012-06-151-6/+8
| | | | | Get rid of ActiveModel::Configuration, make better use of ActiveSupport::Concern + class_attribute, etc.
* Merge pull request #6492 from pmahoney/fair-connection-pool2Rafael Mendonça França2012-06-111-37/+174
|\ | | | | | | | | | | | | Fair connection pool2 Conflicts: activerecord/test/cases/associations/eager_test.rb
| * Make connection pool fair with respect to waiting threads.Patrick Mahoney2012-05-251-37/+174
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The core of this fix is a threadsafe, fair Queue class. It is very similar to Queue in stdlib except that it supports waiting with a timeout. The issue this solves is that if several threads are contending for database connections, an unfair queue makes is possible that a thread will timeout even while other threads successfully acquire and release connections. A fair queue means the thread that has been waiting the longest will get the next available connection. This includes a few test fixes to avoid test ordering issues that cropped up during development of this patch.
* | Symbol responds_to :upcase & :downcase in Ruby >= 1.9Akira Matsuda2012-06-061-1/+1
| |
* | Work around undiagnosed bug that's draining a relation's bind_valuesJeremy Kemper2012-05-311-0/+1
| |
* | SchemaMigration should be loaded lazily.kennyj2012-05-291-1/+0
|/
* Whitespaces :scissors:Rafael Mendonça França2012-05-231-6/+6
|
* ConnectionPool wait_timeout no longer used for different types of timeouts. ↵Jonathan Rochkind2012-05-231-7/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | #6441 An AR ConnectionSpec `wait_timeout` is pre-patch used for three different things: * mysql2 uses it for MySQL's own wait_timeout (how long MySQL should allow an idle connection before closing it), and defaults to 2592000 seconds. * ConnectionPool uses it for "number of seconds to block and wait for a connection before giving up and raising a timeout error", default 5 seconds. * ConnectionPool uses it for the Reaper, for deciding if a 'dead' connection can be reaped. Default 5 seconds. Previously, if you want to change these from defaults, you need to change them all together. This is problematic _especially_ for the mysql2/ConnectionPool conflict, you will generally _not_ want them to be the same, as evidenced by their wildly different defaults. This has caused real problems for people #6441 #2894 But as long as we're changing this, forcing renaming the ConnectionPool key to be more specific, it made sense to seperate the two ConnectionPool uses too -- these two types of ConnectionPool timeouts ought to be able to be changed independently, you won't neccesarily want them to be the same, even though the defaults are (currently) the same.
* Revert "Merge pull request #6416 from pmahoney/threadsafe-connection-pool"Rafael Mendonça França2012-05-221-86/+34
| | | | | | | | | | | | This reverts commit d2901f0fc4270a765717ad572d559dc49a56b3a8, reversing changes made to 525839fdd8cc34d6d524f204528d5b6f36fe410c. Conflicts: activerecord/test/cases/connection_pool_test.rb Reason: This change broke the build (http://travis-ci.org/#!/rails/rails/builds/1391490) and we don't have any solution until now. I asked the author to try to fix it and open a new pull request.
* Make connection pool fair with respect to waiting threads.Patrick Mahoney2012-05-201-34/+86
|
* Synchronize read and modification of @reserved_connections hash to avoid ↵Patrick Mahoney2012-05-191-4/+8
| | | | concurrency error.
* Integer limit out of range should be allowed to raise. Closes #6272Erich Menge2012-05-161-1/+1
|
* remove unnecessary 'examples' noise [ci skip]Vijay Dev2012-05-112-28/+18
|
* Merge pull request #5362 from zenprogrammer/quoting_bugAaron Patterson2012-05-091-0/+1
|\ | | | | Fixed bug in ActiveRecord that caused classes to be quoted incorrectly
| * Fixed bug in Quoting that caused classes to be quoted incorrectlyRyan Oblak2012-03-091-0/+1
| |
* | Refactored remove_columnEdgars Beigarts2012-05-022-3/+1
| |
* | Remove unused assignmentsMark Rushakoff2012-04-291-5/+3
| |
* | Merge pull request #5698 from dougcole/support_postgresql_partitioningAaron Patterson2012-04-271-2/+2
|\ \ | | | | | | Support postgresql partitioning by making INSERT RETURNING optional
| * | add use_returning as a postgresql connection configDoug Cole2012-03-311-2/+2
| | |
* | | Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-04-181-1/+1
|\ \ \
| * | | Fix typo on the add_index.kennyj2012-04-131-1/+1
| | | |
* | | | opening a connection will block if the pool is fullAaron Patterson2012-04-151-20/+39
| | | |
* | | | Automatically create indexes for references/belongs_to statements in migrations.Joshua Wood2012-04-142-4/+21
|/ / /
* | | Fix delete_all when chained with joins.Rafael Mendonça França2012-04-101-3/+17
| | | | | | | | | | | | Closes #5202 and #919
* | | Merge pull request #5716 from jurriaan/tr-gsub-cleanupSantiago Pastorino2012-04-041-1/+1
|\ \ \ | | | | | | | | Updated/changed unneeded tr/gsubs
| * | | Updated/changed useless tr/gsubsJurriaan Pruis2012-04-031-1/+1
| |/ /
* / / Remove unnecessary articles.Waseem Ahmad2012-04-031-3/+3
|/ /