diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-11-19 20:28:41 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-11-19 20:28:41 -0800 |
commit | 24fa524cefb64208c424bda9e2fd80a9e4199629 (patch) | |
tree | a6968d890807e40d591a3f6f3e798ee1f411de3f /activerecord/lib | |
parent | bd2f5c062da011e092c1f122567f24bd5fc6d9b5 (diff) | |
download | rails-24fa524cefb64208c424bda9e2fd80a9e4199629.tar.gz rails-24fa524cefb64208c424bda9e2fd80a9e4199629.tar.bz2 rails-24fa524cefb64208c424bda9e2fd80a9e4199629.zip |
adding visitors to the respective adapters
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb | 1 | ||||
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb | 1 |
2 files changed, 2 insertions, 0 deletions
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 f72d2974c8..18dc73337b 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb @@ -127,6 +127,7 @@ module ActiveRecord super(connection, logger) @connection_options, @config = connection_options, config @quoted_column_names, @quoted_table_names = {}, {} + @visitor = Arel::Visitors::MySQL.new self end def self.visitor_for(pool) # :nodoc: diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb index b7918c7f07..d98cf5051f 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb @@ -307,6 +307,7 @@ module ActiveRecord def initialize(connection, logger, connection_parameters, config) super(connection, logger) @connection_parameters, @config = connection_parameters, config + @visitor = Arel::Visitors::PostgreSQL.new self # @local_tz is initialized as nil to avoid warnings when connect tries to use it @local_tz = nil |