提交 599d7c40 编写于 作者: A Aaron Patterson

removing deprecated methods

上级 3d2bd693
......@@ -65,24 +65,6 @@ def initialize(connection, logger = nil) #:nodoc:
@schema_cache = SchemaCache.new self
end
# Returns a visitor instance for this adaptor, which conforms to the Arel::ToSql interface
def self.visitor_for(pool) # :nodoc:
adapter = pool.spec.config[:adapter]
if Arel::Visitors::VISITORS[adapter]
ActiveSupport::Deprecation.warn(
"Arel::Visitors::VISITORS is deprecated and will be removed. Database adapters " \
"should define a visitor_for method which returns the appropriate visitor for " \
"the database. For example, MysqlAdapter.visitor_for(pool) returns " \
"Arel::Visitors::MySQL.new(pool)."
)
Arel::Visitors::VISITORS[adapter].new(pool)
else
Arel::Visitors::ToSql.new(pool)
end
end
# Returns the human-readable name of the adapter. Use mixed case - one
# can always use downcase if needed.
def adapter_name
......
......@@ -130,10 +130,6 @@ def initialize(connection, logger, connection_options, config)
@visitor = Arel::Visitors::MySQL.new self
end
def self.visitor_for(pool) # :nodoc:
Arel::Visitors::MySQL.new(pool)
end
def adapter_name #:nodoc:
self.class::ADAPTER_NAME
end
......
......@@ -324,10 +324,6 @@ def initialize(connection, logger, connection_parameters, config)
@local_tz = execute('SHOW TIME ZONE', 'SCHEMA').first["TimeZone"]
end
def self.visitor_for(pool) # :nodoc:
Arel::Visitors::PostgreSQL.new(pool)
end
# Clears the prepared statements cache.
def clear_cache!
@statements.clear
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册