From c903c6b28933a041d42d943c6c83f98aaa81f42a Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 22 Sep 2014 10:23:10 -0700 Subject: connections should cache these values, so remove the cache in arel --- lib/arel/visitors/to_sql.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'lib/arel') diff --git a/lib/arel/visitors/to_sql.rb b/lib/arel/visitors/to_sql.rb index 095aa5279a..dea6830e8f 100644 --- a/lib/arel/visitors/to_sql.rb +++ b/lib/arel/visitors/to_sql.rb @@ -61,8 +61,6 @@ module Arel def initialize connection @connection = connection @schema_cache = connection.schema_cache - @quoted_tables = {} - @quoted_columns = {} end def compile node, &block @@ -761,11 +759,12 @@ module Arel def quote_table_name name return name if Arel::Nodes::SqlLiteral === name - @quoted_tables[name] ||= @connection.quote_table_name(name) + @connection.quote_table_name(name) end def quote_column_name name - @quoted_columns[name] ||= Arel::Nodes::SqlLiteral === name ? name : @connection.quote_column_name(name) + return name if Arel::Nodes::SqlLiteral === name + @connection.quote_column_name(name) end def maybe_visit thing, collector -- cgit v1.2.3