aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Changed logging of SQL statements to use the DEBUG level instead of INFO. ↵David Heinemeier Hansson2005-07-051-1/+1
| | | | | | Added logging of the request URI in the benchmark statement (makes it easy to grep for slow actions). Changed the default logging level in config/environment.rb to INFO for production (so SQL statements won't be logged) git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1714 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Made default changes work in both postgresql and mysql #1612 [Tobias Luetke]David Heinemeier Hansson2005-07-051-1/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1703 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Sugared up migrations with even more bling #1609 [Tobias Luekte]David Heinemeier Hansson2005-07-051-19/+77
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1697 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added new Migrations framework for describing schema transformations in a ↵David Heinemeier Hansson2005-07-041-4/+15
| | | | | | way that can be easily applied across multiple databases #1604 [Tobias Luetke] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1672 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed migration initialization of tableDavid Heinemeier Hansson2005-07-041-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1655 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r1612@asus: jeremy | 2005-07-03 04:35:59 -0700Jeremy Kemper2005-07-031-5/+3
| | | | | | | don't include Benchmark into AbstractAdapter directly. call Benchmark.realtime instead of bm = Benchmark.measure, bm.real git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1630 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r1611@asus: jeremy | 2005-07-03 04:21:52 -0700Jeremy Kemper2005-07-031-10/+11
| | | | | | | No longer pass superfluous connection to AbstractAdapter#log. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1629 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r1610@asus: jeremy | 2005-07-03 00:19:06 -0700Jeremy Kemper2005-07-031-2/+0
| | | | | | | remove Column#primary for now git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1628 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r1603@asus: jeremy | 2005-07-02 14:38:52 -0700Jeremy Kemper2005-07-031-37/+35
| | | | | | | Faster MysqlAdapter#select. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1622 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added support for ODBC connections to MS SQL Server so you can connect from ↵David Heinemeier Hansson2005-07-011-13/+7
| | | | | | a non-Windows machine #1569 [Mark Imbriaco/DeLynn Berry] Added support for limit/offset with the MS SQL Server driver so that pagination will now work #1569 [DeLynn Berry] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1583 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Made migrations create InnoDB tables per defaultDavid Heinemeier Hansson2005-04-161-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1168 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed check_box with postgresql booleans is more work now again #995David Heinemeier Hansson2005-04-071-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1109 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed boolean queries for t/f fields in PostgreSQL #995 [dave@cherryville.org]David Heinemeier Hansson2005-04-021-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1066 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed auto-stamping of dates (created_on/updated_on) for PostgreSQL #985 ↵David Heinemeier Hansson2005-04-021-6/+6
| | | | | | [dave@cherryville.org] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1063 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added adapter independent limit clause as a two-element array with the first ↵David Heinemeier Hansson2005-03-201-1/+13
| | | | | | being the limit, the second being the offset #795 [Sam Stephenson] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@944 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added type conversion before saving a record, so string-based values like ↵David Heinemeier Hansson2005-03-201-1/+1
| | | | | | "10.0" arent left for the database to convert #820 [dave@cherryville.org] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@928 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that SQLite3 exceptions are caught and reported properly #823 [yerejm]David Heinemeier Hansson2005-03-141-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@909 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* More incremental work on active schema for MySQLDavid Heinemeier Hansson2005-03-101-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@885 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* More incremental work on active schema for MySQLDavid Heinemeier Hansson2005-03-101-2/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@884 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added ActiveRecord::Base.colorize_logging to control whether to use colors ↵David Heinemeier Hansson2005-03-061-8/+12
| | | | | | in logs or not (on by default) git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@860 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added preliminary support for an agile database migration technique ↵David Heinemeier Hansson2005-03-011-2/+46
| | | | | | (currently only for MySQL) git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@818 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Finished polishing API docsDavid Heinemeier Hansson2005-02-231-13/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@773 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added automatic dropping/creating of test tables for running the unit tests ↵David Heinemeier Hansson2005-02-201-0/+5
| | | | | | on all databases #587 [adelle@bullet.net.au] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@719 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed documentation snafus #575, #576, #577, #585David Heinemeier Hansson2005-02-071-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@525 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Replaced === checks with is_a? checks #502, #82 [Marcel Molina]David Heinemeier Hansson2005-01-201-3/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@466 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added SQLite3 compatibility through the sqlite3-ruby adapter by Jamis Buck ↵David Heinemeier Hansson2005-01-101-10/+11
| | | | | | #381 [bitsweat] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@374 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed handling of binary content in blobs and similar fields for Ruby/MySQL ↵David Heinemeier Hansson2005-01-021-3/+20
| | | | | | and SQLite #409 [xal] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@309 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Base.default_timezone accessor that determines whether to use ↵David Heinemeier Hansson2004-12-281-10/+10
| | | | | | Time.local (using :local) or Time.utc (using :utc) when pulling dates and times from the database. This is set to :local by default. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@271 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added the possibility for adapters to overwrite add_limit! to implement a ↵David Heinemeier Hansson2004-12-281-0/+4
| | | | | | different limiting scheme than "LIMIT X" used by MySQL, PostgreSQL, and SQLite. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@269 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added more informative exceptions in establish_connection #356 [bitsweat]David Heinemeier Hansson2004-12-221-4/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@249 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that nested transactions now work by letting the outer most ↵David Heinemeier Hansson2004-12-221-4/+4
| | | | | | 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
* Changed the interface on AbstractAdapter to require that adapters return the ↵David Heinemeier Hansson2004-12-191-2/+2
| | | | | | number of affected rows on delete and update operations. Added that Base.update_all and Base.delete_all return an integer of the number of affected rows #341 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@228 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added that query benchmarking will only happen if its going to be logged ↵David Heinemeier Hansson2004-12-191-1/+1
| | | | | | anyway #344 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@227 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Options for the new validation methods are now given as a hashDavid Heinemeier Hansson2004-12-101-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@109 5ecf4fe2-1ee6-0310-87b1-e25e094e27de