aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #6913 from lexmag/column_exists_optionsCarlos Antonio da Silva2012-06-301-4/+6
|\ | | | | | | | | | | | | | | | | Add :default and :null options to column_exists? method Examples: column_exists?(:testings, :taggable_id, :integer, null: false) column_exists?(:testings, :taggable_type, :string, default: 'Photo')
| * Add more options to column_exists? methodAleksey Magusev2012-06-301-4/+6
| | | | | | | | Also fix failures in check options for nil
* | Require URIChris Bandy2012-06-281-0/+2
| |
* | Support collate and ctype on the PostgreSQL.kennyj2012-06-291-1/+20
| |
* | fix: limit of enum columns of mysqlYamada Masaki2012-06-281-0/+2
|/
* Revert "Merge pull request #6344"Piotr Sarnacki2012-06-251-1/+1
| | | | | | | | | | | | | | This commit needs to be reverted because it introduces difficulties when using sqlite3 in development and other databases in production. This happens because when you create time column in sqlite3, it's dumped as datetime in schema.rb file. This reverts commit 57d534ee9e441d078fcc161c0c78ebaa5aacd736, reversing changes made to 20f049fb50daee0c5e5a69b55b529af5737e8e3f. Conflicts: activerecord/test/cases/adapters/sqlite3/sqlite3_adapter_test.rb
* add :nodoc: to internal implementations [ci skip]Francesco Rodriguez2012-06-221-1/+1
|
* Allow precision option for postgresql datetimesTony Schneider2012-06-221-0/+10
| | | | | | | | | | This patch addresses the difficulty of retrieving datetime fields. By default, the database holds a higher precision than the time as a String. This issue is discussed at length at the following links: - [#3519](https://github.com/rails/rails/issues/3519) - [#3520](https://github.com/rails/rails/issues/3520) Also, kudos to @mattscilipoti
* Change minimum (default) log level in PostgreSQL to warning.kennyj2012-06-181-1/+1
|
* Avoid unnecessary catching of Exception instead of StandardError.Dylan Smith2012-06-173-6/+6
|
* Simplify AR configuration code.Jon Leighton2012-06-151-6/+8
| | | | | Get rid of ActiveModel::Configuration, make better use of ActiveSupport::Concern + class_attribute, etc.
* Add uuid type support to PostgreSQL adapterKonstantin Shabanov2012-06-142-3/+8
|
* 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
| |
* | Merge pull request #6477 from steveklabnik/close_discovered_pg_connectionRafael Mendonça França2012-05-301-1/+2
|\ \ | | | | | | Properly discover a connection is closed in postgresql_adapter
| * | Properly discover a connection is closed in postgresql_adapterSteve Klabnik2012-05-241-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PQstatus doesn't properly test if future operations will succeed. A PQping function is added to libpq in PostgreSQL 9.1, but if we rely on it, everyone on earlier versions of Postgres is out of luck, and the pg gem wouldn't have the 'fix' until the next release. Thanks to @cbrecabarren and @ged for handling all the dirty details. Closes #3392.
* | | Merge pull request #6386 from kennyj/fix_logs_name_consistencyAaron Patterson2012-05-303-18/+15
|\ \ \ | | | | | | | | Fix logs name consistency.
| * | | Fix logs name consistency.kennyj2012-05-193-18/+15
| | | |
* | | | SchemaMigration should be loaded lazily.kennyj2012-05-291-1/+0
| |_|/ |/| |
* | | Merge pull request #5872 from evtuhovich/prepared_statement_fixAaron Patterson2012-05-251-10/+10
|\ \ \ | | | | | | | | Remove prepared statement from system query in postgresql adapter
| * | | Remove prepared statement from system query in postgresql adapterIvan Evtukhovich2012-05-121-10/+10
| | | |
* | | | Merge pull request #5244 from fotos/myqsl2_wait_timeoutRafael Mendonça França2012-05-251-1/+1
|\ \ \ \ | |_|_|/ |/| | | | | | | Maximum wait_timeout on Windows is 2147483
| * | | Maximum wait_timeout on Windows is 2147483Fotos Georgiadis2012-03-021-1/+1
| | | |
* | | | Whitespaces :scissors:Rafael Mendonça França2012-05-232-7/+7
| | | |
* | | | PGconn doesn't accepts :checkout_timeout option.Rafael Mendonça França2012-05-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This option was added on cb6f839359bd894feb0a1105b79af72b336aa41e renaming the :wait_timeout option. Fix build http://travis-ci.org/#!/rails/rails/jobs/1413405
* | | | 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
| | | |
* | | | Merge pull request #6397 from kennyj/fix_translate_exceptionAaron Patterson2012-05-191-3/+7
|\ \ \ \ | | | | | | | | | | Fix a problem of translate_exception method in a Japanese (non English) environment.
| * | | | Fix a problem of translate_exception method in Japanese.kennyj2012-05-201-3/+7
| | |_|/ | |/| |
* / | | Synchronize read and modification of @reserved_connections hash to avoid ↵Patrick Mahoney2012-05-191-4/+8
|/ / / | | | | | | | | | concurrency error.
* | | Merge pull request #6238 from pwnall/pgsql_bytea_limitAaron Patterson2012-05-171-8/+19
|\ \ \ | | | | | | | | Postgresql doesn't accept limits on binary (bytea) columns.
| * | | Postgresql doesn't accept limits on binary (bytea) columns.Victor Costan2012-05-091-8/+19
| | | |
* | | | Merge pull request #6192 from ↵Aaron Patterson2012-05-163-7/+65
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | danmcclain/add_inet_and_cidr_types_to_postgresql_adapter Add support for macaddr, inet, and cidr types to PostgreSQL adapter
| * | | | Removes NetAddr dependencyDan McClain2012-05-081-6/+7
| | | | |
| * | | | Converts inet and cidr columns to NetAddr::CIDRDan Seaver2012-05-073-3/+41
| | | | |
| * | | | Adds migration and schema dump support for INET, CIDR, and MACADDRDan Seaver2012-05-051-4/+23
| | | | |
* | | | | Merge pull request #6349 from erichmenge/patch-raise-type-errorsAaron Patterson2012-05-161-1/+1
|\ \ \ \ \ | | | | | | | | | | | | Integer limit out of range should be allowed to raise. Closes #6272
| * | | | | Integer limit out of range should be allowed to raise. Closes #6272Erich Menge2012-05-161-1/+1
| | | | | |
* | | | | | Merge pull request #6344 from erichmenge/patch_sqlite_time_typePiotr Sarnacki2012-05-151-1/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | SQLite3 doesn't actually support the 'time' type.
| * | | | | | SQLite3 doesn't actually support the 'time' type.Erich Menge2012-05-151-1/+1
| |/ / / / /
* / / / / / Remove useless check of adapterOscar Del Ben2012-05-151-4/+0
|/ / / / /
* | | | | Remove unnecessary calls to primary_key on sqlite3_adapterCarlos Galdino2012-05-151-1/+1
| | | | |
* | | | | Set the primary key during #copy_table if necessary. Fixes [#2312]Sean Scally2012-05-141-1/+5
| | | | |
* | | | | Merge pull request #6285 from ↵Vijay Dev2012-05-121-1/+1
|\ \ \ \ \ | |_|_|_|/ |/| | | | | | | | | | | | | | acapilleri/missplelling_error_in_abstract_mysql_adapter missplelling error in abstract_mysql_adapter
| * | | | missplelling error in abstract_mysql_adapterAngelo Capilleri2012-05-121-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