Skip to content
This repository
Browse code

removing deprecated methods

  • Loading branch information...
commit 599d7c40a4380c702ae5612983237d084156b7d2 1 parent 3d2bd69
Aaron Patterson authored November 19, 2011
18  activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
@@ -65,24 +65,6 @@ def initialize(connection, logger = nil) #:nodoc:
65 65
         @schema_cache = SchemaCache.new self
66 66
       end
67 67
 
68  
-      # Returns a visitor instance for this adaptor, which conforms to the Arel::ToSql interface
69  
-      def self.visitor_for(pool) # :nodoc:
70  
-        adapter = pool.spec.config[:adapter]
71  
-
72  
-        if Arel::Visitors::VISITORS[adapter]
73  
-          ActiveSupport::Deprecation.warn(
74  
-            "Arel::Visitors::VISITORS is deprecated and will be removed. Database adapters " \
75  
-            "should define a visitor_for method which returns the appropriate visitor for " \
76  
-            "the database. For example, MysqlAdapter.visitor_for(pool) returns " \
77  
-            "Arel::Visitors::MySQL.new(pool)."
78  
-          )
79  
-
80  
-          Arel::Visitors::VISITORS[adapter].new(pool)
81  
-        else
82  
-          Arel::Visitors::ToSql.new(pool)
83  
-        end
84  
-      end
85  
-
86 68
       # Returns the human-readable name of the adapter. Use mixed case - one
87 69
       # can always use downcase if needed.
88 70
       def adapter_name
4  activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb
@@ -130,10 +130,6 @@ def initialize(connection, logger, connection_options, config)
130 130
         @visitor = Arel::Visitors::MySQL.new self
131 131
       end
132 132
 
133  
-      def self.visitor_for(pool) # :nodoc:
134  
-        Arel::Visitors::MySQL.new(pool)
135  
-      end
136  
-
137 133
       def adapter_name #:nodoc:
138 134
         self.class::ADAPTER_NAME
139 135
       end
4  activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
@@ -324,10 +324,6 @@ def initialize(connection, logger, connection_parameters, config)
324 324
         @local_tz = execute('SHOW TIME ZONE', 'SCHEMA').first["TimeZone"]
325 325
       end
326 326
 
327  
-      def self.visitor_for(pool) # :nodoc:
328  
-        Arel::Visitors::PostgreSQL.new(pool)
329  
-      end
330  
-
331 327
       # Clears the prepared statements cache.
332 328
       def clear_cache!
333 329
         @statements.clear

0 notes on commit 599d7c4

Please sign in to comment.
Something went wrong with that request. Please try again.