aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2013-02-15 16:21:59 +0000
committerJon Leighton <j@jonathanleighton.com>2013-02-15 16:23:38 +0000
commit520a16caad3d89da734c0f5bc14b8c16090f891f (patch)
treed78f477f2aa202ea3de692456e49f8caa88bb6b2 /activerecord/lib
parentc65b076328b292f1b727bb6a7dc144c05458163f (diff)
downloadrails-520a16caad3d89da734c0f5bc14b8c16090f891f.tar.gz
rails-520a16caad3d89da734c0f5bc14b8c16090f891f.tar.bz2
rails-520a16caad3d89da734c0f5bc14b8c16090f891f.zip
Revert "Make valid_type? public"
This reverts commit 5d528f835e871f5f9d4b68e8a81cfbe900b7e718. Relates to f8c8ad5 which is also getting reverted due to failing test.
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract_adapter.rb8
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb8
-rw-r--r--activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb8
-rw-r--r--activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb5
4 files changed, 17 insertions, 12 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
index 2400fc92cc..eecf4faa5d 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
@@ -305,10 +305,6 @@ module ActiveRecord
pool.checkin self
end
- def valid_type?(type)
- true
- end
-
protected
def log(sql, name = "SQL", binds = [])
@@ -330,6 +326,10 @@ module ActiveRecord
# override in derived class
ActiveRecord::StatementInvalid.new(message)
end
+
+ def valid_types?(type)
+ true
+ end
end
end
end
diff --git a/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb b/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb
index e3ad5594d2..de5232f960 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb
@@ -582,10 +582,6 @@ module ActiveRecord
@config.fetch(:strict, true)
end
- def valid_type?(type)
- !native_database_types[type].nil?
- end
-
protected
# MySQL is too stupid to create a temporary table for use subquery, so we have
@@ -751,6 +747,10 @@ module ActiveRecord
# ...and send them all in one query
execute("SET #{encoding} #{variable_assignments}", :skip_logging)
end
+
+ def valid_type?(type)
+ !native_database_types[type].nil?
+ end
end
end
end
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
index 2af60ad0a2..271a6848ee 100644
--- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
@@ -655,10 +655,6 @@ module ActiveRecord
@use_insert_returning
end
- def valid_type?(type)
- !native_database_types[type].nil?
- end
-
protected
# Returns the version of the connected PostgreSQL server.
@@ -891,6 +887,10 @@ module ActiveRecord
def table_definition
TableDefinition.new(self)
end
+
+ def valid_type?(type)
+ !native_database_types[type].nil?
+ end
end
end
end
diff --git a/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb b/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb
index 91444950be..b644e7bd60 100644
--- a/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb
@@ -602,6 +602,11 @@ module ActiveRecord
super
end
end
+
+ def valid_type?(type)
+ true
+ end
+
end
end
end