aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-10-26 12:47:23 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-10-26 12:47:23 +0000
commit85a7892644cf16e004939fa5e26201d330de264d (patch)
tree238ee32c5e87ff7dc2a03a6c0e1ea2c508de714c /activerecord
parent88bc13a01d435b337ae0abf623545f327d07ef25 (diff)
downloadrails-85a7892644cf16e004939fa5e26201d330de264d.tar.gz
rails-85a7892644cf16e004939fa5e26201d330de264d.tar.bz2
rails-85a7892644cf16e004939fa5e26201d330de264d.zip
Added quoted_true and quoted_false methods to db2_adapter and cleaned up tests for DB2 (closes #2493) [maik schmidt]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2739 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/CHANGELOG5
-rw-r--r--activerecord/lib/active_record/connection_adapters/db2_adapter.rb8
-rw-r--r--activerecord/test/finder_test.rb2
-rw-r--r--activerecord/test/fixtures/db_definitions/db2.drop.sql1
4 files changed, 14 insertions, 2 deletions
diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG
index def38e20cc..2b0cca15f2 100644
--- a/activerecord/CHANGELOG
+++ b/activerecord/CHANGELOG
@@ -1,3 +1,8 @@
+*SVN*
+
+* Added quoted_true and quoted_false methods to db2_adapter and cleaned up tests for DB2 #2493 [maik schmidt]
+
+
*1.12.2* (October 26th, 2005)
* Allow symbols to rename columns when using SQLite adapter. #2531 [kevin.clark@gmail.com]
diff --git a/activerecord/lib/active_record/connection_adapters/db2_adapter.rb b/activerecord/lib/active_record/connection_adapters/db2_adapter.rb
index ab13494153..cc0e535123 100644
--- a/activerecord/lib/active_record/connection_adapters/db2_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/db2_adapter.rb
@@ -145,6 +145,14 @@ begin
}
end
+ def quoted_true
+ '1'
+ end
+
+ def quoted_false
+ '0'
+ end
+
private
def last_insert_id
diff --git a/activerecord/test/finder_test.rb b/activerecord/test/finder_test.rb
index 26a34162d3..e1ec629fd5 100644
--- a/activerecord/test/finder_test.rb
+++ b/activerecord/test/finder_test.rb
@@ -339,7 +339,7 @@ class FinderTest < Test::Unit::TestCase
end
def test_select_values
- assert_equal ["1","2","3","4","5","6","7","8"], Company.connection.select_values("SELECT id FROM companies ORDER BY id")
+ assert_equal ["1","2","3","4","5","6","7","8"], Company.connection.select_values("SELECT id FROM companies ORDER BY id").map! { |i| i.to_s }
assert_equal ["37signals","Summit","Microsoft", "Flamboyant Software", "Ex Nihilo", "RailsCore", "Leetsoft", "Jadedpixel"], Company.connection.select_values("SELECT name FROM companies ORDER BY id")
end
diff --git a/activerecord/test/fixtures/db_definitions/db2.drop.sql b/activerecord/test/fixtures/db_definitions/db2.drop.sql
index b0ff4b94c6..ce2d3688f9 100644
--- a/activerecord/test/fixtures/db_definitions/db2.drop.sql
+++ b/activerecord/test/fixtures/db_definitions/db2.drop.sql
@@ -6,7 +6,6 @@ DROP TABLE projects;
DROP TABLE developers_projects;
DROP TABLE orders;
DROP TABLE customers;
-DROP TABLE orders;
DROP TABLE movies;
DROP TABLE subscribers;
DROP TABLE booleantests;