aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
Commit message (Collapse)AuthorAgeFilesLines
* Remove dead code. Closes #10698 [garru]Jeremy Kemper2008-01-191-5/+0
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8670 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* More thoroughly quote table names. Exposes some issues with sqlite2 adapter. ↵Jeremy Kemper2008-01-051-1/+6
| | | | | | Closes #10698. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8571 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ruby 1.9 compat: fix warnings, shadowed block vars, and unitialized instance ↵Jeremy Kemper2007-12-221-0/+1
| | | | | | vars git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8481 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Use debug, not info as log_info will discard the information if info is used.Michael Koziarski2007-11-171-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8162 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Foxy fixtures. Adapter#disable_referential_integrity. Closes #9981.Jeremy Kemper2007-10-261-0/+7
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8036 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Quote table names. Defaults to column quoting. Closes #4593.Jeremy Kemper2007-10-161-0/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7932 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
* Speed up and simplify query caching.Jeremy Kemper2007-09-171-0/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7498 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix @logger.debug? conditional considering @logger may be nil.Jeremy Kemper2007-03-111-14/+10
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6375 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Enable active record cache automatically for all actionsTobias Lütke2007-02-211-11/+11
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6189 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Made sure that connections are only removed for SQLiteDavid Heinemeier Hansson2007-01-151-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5955 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* If only life was that simple (it didnt help)David Heinemeier Hansson2006-12-011-0/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5658 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Replace the elaborate reloading connection checking scheme, just fix the ↵David Heinemeier Hansson2006-12-011-6/+0
| | | | | | Ruby-based MySQL adapter, ye? git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5656 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Only reload connections in development mode that supports (and requires ↵David Heinemeier Hansson2006-11-261-0/+6
| | | | | | that) -- in other words, only do it for SQLite (closes #6687, #6700) [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5637 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Oracle: fix limited id selection for eager loading. Closes #6515.Jeremy Kemper2006-11-101-6/+0
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5480 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* automatically add primary key to #select_limited_ids_list order by clause ↵Rick Olson2006-10-131-0/+6
| | | | | | for databases that require order columns in the distinct statements (postgresql) [Rick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5292 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r4704@asus: jeremy | 2006-06-27 12:00:19 -0700Jeremy Kemper2006-07-081-0/+2
| | | | | | | | | | | | | | | decimal r4705@asus: jeremy | 2006-06-27 12:20:47 -0700 current_adapter? checks whether any of its arguments is the name of the current adapter class r4834@asus: jeremy | 2006-07-08 13:08:24 -0700 Room to float. r4835@asus: jeremy | 2006-07-08 13:09:18 -0700 Give lock test a few chances. r4836@asus: jeremy | 2006-07-08 13:12:05 -0700 Numeric and decimal columns map to BigDecimal instead of Float. Those with scale 0 map to Integer. Closes #5454. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4596 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Provide access to the underlying database connection with ↵Michael Koziarski2006-03-181-0/+7
| | | | | | Adapter#raw_connection, allows the use of db-specific methods such as postgresql's lo_* . Closes #2090 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3914 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Speed up class -> connection caching and stale connection verification. ↵Jeremy Kemper2006-02-271-1/+14
| | | | | | Closes #3979. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3693 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* ActiveRecord::Base.remove_connection explicitly closes database connections ↵Jeremy Kemper2006-02-261-1/+7
| | | | | | and doesn't corrupt the connection cache. Introducing the disconnect! instance method for the PostgreSQL, MySQL, and SQL Server adapters; implementations for the others are welcome. References #3591. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3674 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* * Fix pagination problems when using includeMichael Koziarski2006-02-091-0/+6
| | | | | | | | | | * Introduce Unit Tests for pagination * Allow count to work with :include by using count distinct. [Kevin Clark & Jeremy Hopple] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3553 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Move dummy active? and reconnect! from sqlite to base adapter. References #428.Jeremy Kemper2005-12-041-0/+13
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3219 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Connection cache to speed up retrieve_connection and get rid of dirty ↵Jeremy Kemper2005-12-041-4/+1
| | | | | | connection marking. References #428. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3218 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r3181@asus: jeremy | 2005-11-19 02:52:24 -0800Jeremy Kemper2005-11-191-28/+5
| | | | | | | Mark connections for verification. Retrieve connection verifies before returning a connection. Verification tests whether the connection is marked then reconnects if the connection is inactive. All active connections are marked for verification after a request is handled. References #428. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3096 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r3118@asus: jeremy | 2005-11-16 00:32:48 -0800Jeremy Kemper2005-11-161-1/+1
| | | | | | | correct prefetch_primary_key? table_name param git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3053 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r3095@asus: jeremy | 2005-11-15 22:40:51 -0800Jeremy Kemper2005-11-161-0/+8
| | | | | | | | | | | | | | | | | | | | | | | Ticket #1874 - Firebird adapter r3107@asus: jeremy | 2005-11-16 00:06:14 -0800 quote column aliases r3108@asus: jeremy | 2005-11-16 00:08:12 -0800 quote columns in construct_conditions_from_arguments. update sequence_name docs. introduce prefetched primary keys. r3109@asus: jeremy | 2005-11-16 00:09:08 -0800 double-quote rather than single-quote sqlite columns r3110@asus: jeremy | 2005-11-16 00:09:56 -0800 quote column names and use attribute_condition in validates_uniqueness_of r3111@asus: jeremy | 2005-11-16 00:12:24 -0800 Use QUOTED_TYPE constant in tests r3112@asus: jeremy | 2005-11-16 00:13:28 -0800 restrict test_inserts_with_pre_and_suffix to those adapters which support migrations r3113@asus: jeremy | 2005-11-16 00:14:09 -0800 Use QUOTED_TYPE constant in tests r3114@asus: jeremy | 2005-11-16 00:14:30 -0800 Use QUOTED_TYPE constant in tests git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3051 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix reconnect success rate to report as percentage. References #428.Jeremy Kemper2005-11-141-5/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3024 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r3046@asus: jeremy | 2005-11-13 02:31:21 -0800Jeremy Kemper2005-11-131-4/+8
| | | | | | | AbstractAdapter#reconnect_if_inactive! returns boolean success. AbstractAdapter#log alters exception message on reconnect failure rather than raising ConnectionFailed. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3002 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r3042@asus: jeremy | 2005-11-13 01:51:08 -0800Jeremy Kemper2005-11-131-4/+16
| | | | | | | | | | | MySQL active? and reconnect! References #428. r3043@asus: jeremy | 2005-11-13 01:58:28 -0800 SQLite active? and reconnect! References #428. r3044@asus: jeremy | 2005-11-13 02:02:27 -0800 Update CHANGELOG with admonishment regarding avoidance of the log method. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3001 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r3032@asus: jeremy | 2005-11-12 23:16:52 -0800Jeremy Kemper2005-11-131-16/+25
| | | | | | | | | Ticket 428 - stale connections r3040@asus: jeremy | 2005-11-13 00:22:29 -0800 When AbstractAdapter#log rescues an exception, attempt to detect and reconnect to an inactive database connection. Connection adapter must respond to the active? and reconnect! instance methods. Initial support for PostgreSQL. References #428. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3000 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Refactor DB exceptions and deal more with DB2 (closes #2624)David Heinemeier Hansson2005-10-271-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2761 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Change default logging colors to work on both white and black backgrounds.Sam Stephenson2005-10-151-6/+7
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2614 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Move require_library_or_gem out of AR's abstract_adapter and into ↵Marcel Molina2005-10-081-23/+0
| | | | | | ActiveSupport. closes #1992 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2490 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add extensive documentation to the ActiveRecord::AbstractAdapter. #2250Marcel Molina2005-09-271-2/+10
| | | | 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-521/+15
| | | | | | and style for the OSS adapters git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2339 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Standardize the interpretation of boolean columns in the Mysql and Sqlite ↵Jamis Buck2005-09-251-5/+10
| | | | | | adapters. (Use MysqlAdapter.emulate_booleans = false to disable this behavior) git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2335 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added AbstractAdapter#select_value and AbstractAdapter#select_values as ↵David Heinemeier Hansson2005-09-241-0/+13
| | | | | | 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
* Post the postgresql adapter (and hopefully other adapters) pass all testsJamis Buck2005-09-231-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2316 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add ActiveRecord::SchemaDumper for dumping a DB schema to a pure-ruby file, ↵Jamis Buck2005-09-231-8/+51
| | | | | | making it easier to consolidate large migration lists and port database schemas between databases. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2312 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added dump of schema version to the db_structure_dump task for databases ↵David Heinemeier Hansson2005-09-121-1/+11
| | | | | | that support migrations #1835 [Rick Olson] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2215 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Rolled back broken #1814David Heinemeier Hansson2005-09-111-9/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2203 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added better exception error when unknown column types are used with ↵David Heinemeier Hansson2005-09-111-1/+8
| | | | | | migrations #1814 [fbeausoleil@ftml.net] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2201 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow add_column and create_table to specify NOT NULL #1712 ↵Jamis Buck2005-07-301-6/+12
| | | | | | [emptysands@gmail.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1955 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix create_table so that id column is implicitly added [Rick Olson]Jamis Buck2005-07-271-5/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1949 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Made Oracle a first-class connection adapter by adhering closer to idiomatic ↵David Heinemeier Hansson2005-07-241-1/+1
| | | | | | Oracle style #1798 [The Gang of Oracles] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1912 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added migration support for SQLite (using temporary tables to simulate ALTER ↵David Heinemeier Hansson2005-07-221-16/+30
| | | | | | TABLE) #1771 [Sam Stephenson] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1893 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove extra definition of supports_migrations? from abstract_adaptor.rbNicholas Seckar2005-07-221-4/+0
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1892 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed incompatibility in DB2 adapter with the new limit/offset approach ↵David Heinemeier Hansson2005-07-171-0/+2
| | | | | | #1718 [Maik Schmidt] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1850 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that each request with the WEBrick adapter would open a new database ↵David Heinemeier Hansson2005-07-101-6/+12
| | | | | | connection #1685 [Sam Stephenson]. Added ActiveRecord::Base.threaded_connections flag to turn off 1-connection per thread (required for thread safety). By default it's on, but WEBrick in Rails need it off #1685 [Sam Stephenson] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1792 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed first run of "rake migrate" on PostgreSQL by not expecting a return ↵David Heinemeier Hansson2005-07-071-1/+1
| | | | | | value on the id #1640 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1755 5ecf4fe2-1ee6-0310-87b1-e25e094e27de