aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
Commit message (Collapse)AuthorAgeFilesLines
* When dealing with SQLite3, use the table_info pragma helper, so that the ↵Jamis Buck2007-01-303-2/+12
| | | | | | bindings can do some translation for when sqlite3 breaks incompatibly between point releases. Also, make current_adapter? use is_a? instead of instance_of? to account correctly for adapter subclassing. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6091 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Oracle: fix lob and text default handling. Closes #7344.Jeremy Kemper2007-01-293-20/+31
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6090 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* SQLServer: don't choke on strings containing 'null'. Closes #7083.Jeremy Kemper2007-01-283-3/+13
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6084 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* MySQL: blob and text columns may not have defaults in 5.x. Update fixtures ↵Jeremy Kemper2007-01-285-8/+23
| | | | | | schema for strict mode. Closes #6695. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6074 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* update_all can take a Hash argument. sanitize_sql splits into two methods ↵Jeremy Kemper2007-01-283-16/+53
| | | | | | for conditions and assignment since NULL values and delimiters are handled differently. References #6583, closes #7365. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6073 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Post title and body not null. References #6778.Jeremy Kemper2007-01-281-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6067 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* MySQL: SET SQL_AUTO_IS_NULL=0 so 'where id is null' doesn't select the last ↵Jeremy Kemper2007-01-283-0/+12
| | | | | | inserted id. Closes #6778. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6064 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Use Date#to_s(:db) for quoted dates. Closes #7411.Jeremy Kemper2007-01-283-7/+12
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6061 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Don't create instance writer methods for class attributes. Closes #7401 [Rick]Rick Olson2007-01-286-14/+26
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6051 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Nodoc the irrelevant (from 1.2)David Heinemeier Hansson2007-01-265-9/+9
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6044 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Docs: validations examples. Closes #7343.Jeremy Kemper2007-01-242-13/+76
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6031 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add missing tests ensuring callbacks work with class inheritance. Closes ↵Rick Olson2007-01-242-0/+25
| | | | | | #7339 [sandofsky] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6026 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixtures use the table name and connection from set_fixture_class. Closes #7330.Jeremy Kemper2007-01-243-0/+15
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6023 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove useless code in #attribute_present? since 0 != blank?. Closes #7249 ↵Rick Olson2007-01-233-3/+7
| | | | | | [Josh Susser]. Fix minor doc typos. Closes #7157 [Josh Susser] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6018 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix incorrect usage of #classify when creating the eager loading join ↵Rick Olson2007-01-232-5/+7
| | | | | | statement. Closes #7044 [Josh Susser] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6017 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* SQLServer: quote table name in indexes query. Closes #2928.Jeremy Kemper2007-01-232-1/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6014 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Subclasses of an abstract class work with single-table inheritance. ↵Jeremy Kemper2007-01-234-3/+21
| | | | | | References #5704, closes #7284. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6013 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make sure sqlite3 driver closes open connections on disconnect (closes #7105)Jamis Buck2007-01-222-0/+7
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6012 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* [DOC] clear up some ambiguity with the way has_and_belongs_to_many creates ↵Rick Olson2007-01-162-1/+9
| | | | | | the default join table name. #7072 [jeremymcanally] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5960 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow the Oracle adapter to insert a string "null". Closes #6997 [laurelfan]Michael Koziarski2007-01-162-2/+10
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5958 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Improve handling of LoadErrors with the oracle adapter. Closes #6780 [kubo]Michael Koziarski2007-01-162-3/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5956 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Made sure that connections are only removed for SQLiteDavid Heinemeier Hansson2007-01-153-4/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5955 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* be like a duck. Let's not rely on explicit classes, so we can pass proxy ↵Jamis Buck2007-01-154-31/+47
| | | | | | objects around and have them interpreted correctly by ActiveRecord's serialization routines git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5953 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Skip column options for primary keys. Closes #7048.Jeremy Kemper2007-01-154-9/+11
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5944 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Improve association documentation, closes #7022. [hasmanyjosh]Michael Koziarski2007-01-151-1/+65
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5939 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* change_column accepts :default => nil. Closes #6956.Jeremy Kemper2007-01-1511-31/+51
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5937 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* MySQL, PostgreSQL: change_column_default quotes the default value and ↵Jeremy Kemper2007-01-154-4/+18
| | | | | | doesn't lose column type information. References #3987, closes #6664. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5935 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Oracle: create_table takes a :sequence_name option to override the ↵Jeremy Kemper2007-01-157-8/+66
| | | | | | 'tablename_seq' default. Closes #7000. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5933 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Test that calculations don't modify their options hash. References #6929. ↵Jeremy Kemper2007-01-141-0/+8
| | | | | | [eventualbuddha] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5931 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* MySQL: retain SSL settings on reconnect. Closes #6976.Jeremy Kemper2007-01-142-0/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5929 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Aggregate reflection klass works with nested :class_nameJeremy Kemper2007-01-143-36/+40
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5923 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Oracle: correctly perform eager finds with :limit and :order. Closes #7021.Jeremy Kemper2007-01-132-11/+18
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5919 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Apply scoping during initialize instead of create. Fixes setting of foreign ↵Tobias Lütke2007-01-124-2/+10
| | | | | | key when using find_or_initialize_by with scoping. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5913 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix scope typo in add_lock! Closes #6482. [zubek]Jeremy Kemper2007-01-121-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5907 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Demonstrate that a value's required. References #6156.Jeremy Kemper2007-01-121-0/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5903 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Oops. References #6156.Jeremy Kemper2007-01-121-5/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5902 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Test MySQL implicit NULL for integer columns. Closes #6156.Jeremy Kemper2007-01-121-0/+26
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5901 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* SQLServer: handle [quoted] table names. Closes #6635.Jeremy Kemper2007-01-125-0/+35
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5891 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* acts_as_nested_set works with single-table inheritance. Closes #6030.Jeremy Kemper2007-01-125-12/+54
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5889 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* PostgreSQL: use a subselect to correctly perform eager finds with :limit and ↵Jeremy Kemper2007-01-125-5/+41
| | | | | | :order. Closes #4668. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5887 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix new_record? and id rollback. Closes #6910.Jeremy Kemper2007-01-123-17/+18
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5886 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Inline primary keys.Jeremy Kemper2007-01-122-59/+42
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5885 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* dry up some duplicated codeJamis Buck2007-01-111-37/+21
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5883 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* treat create! like create and make sure the target is loaded firstJamis Buck2007-01-111-0/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5882 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* fix regression in has_one#create, that caused instances thus created to be ↵Jamis Buck2007-01-112-3/+7
| | | | | | orphaned git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5881 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Pass a range in :conditions to use the SQL BETWEEN operator. Closes #6974.Jeremy Kemper2007-01-103-2/+28
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5876 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix the Oracle adapter for serialized attributes stored in CLOBs. Closes ↵Michael Koziarski2007-01-052-0/+3
| | | | | | #6825 [mschoen, tdfowler] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5866 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* [DOCS] Apply more documentation for ActiveRecord Reflection. Closes #4055 ↵Rick Olson2007-01-052-5/+21
| | | | | | [Robby Russell] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5855 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* [DOCS] Document :allow_nil option of #validate_uniqueness_of. Closes #3143 ↵Rick Olson2007-01-052-0/+3
| | | | | | [Caio Chassot] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5853 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Sybase adapter fixes. Closes #6926 [jsheets]Michael Koziarski2007-01-058-155/+159
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5839 5ecf4fe2-1ee6-0310-87b1-e25e094e27de