aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters
diff options
context:
space:
mode:
authorSam Ruby <rubys@intertwingly.net>2013-02-14 06:55:40 -0500
committerSam Ruby <rubys@intertwingly.net>2013-02-14 06:55:40 -0500
commit5d528f835e871f5f9d4b68e8a81cfbe900b7e718 (patch)
tree718a76f0af2ab25be2f4a3a3f09e8441a9c5d26d /activerecord/lib/active_record/connection_adapters
parent1fd78305b5812c186d9eed9475677f90946eba5f (diff)
downloadrails-5d528f835e871f5f9d4b68e8a81cfbe900b7e718.tar.gz
rails-5d528f835e871f5f9d4b68e8a81cfbe900b7e718.tar.bz2
rails-5d528f835e871f5f9d4b68e8a81cfbe900b7e718.zip
Make valid_type? public
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
-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, 12 insertions, 17 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
index eecf4faa5d..2400fc92cc 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
@@ -305,6 +305,10 @@ module ActiveRecord
pool.checkin self
end
+ def valid_type?(type)
+ true
+ end
+
protected
def log(sql, name = "SQL", binds = [])
@@ -326,10 +330,6 @@ 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 de5232f960..e3ad5594d2 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb
@@ -582,6 +582,10 @@ 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
@@ -747,10 +751,6 @@ 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 271a6848ee..2af60ad0a2 100644
--- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
@@ -655,6 +655,10 @@ 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.
@@ -887,10 +891,6 @@ 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 b644e7bd60..91444950be 100644
--- a/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb
@@ -602,11 +602,6 @@ module ActiveRecord
super
end
end
-
- def valid_type?(type)
- true
- end
-
end
end
end