From a7dea38204f3c40e4d0c3f29ebe17af818659697 Mon Sep 17 00:00:00 2001 From: Emilio Tagua Date: Wed, 6 May 2009 14:14:56 -0300 Subject: Don't depend engine select_value(s) method. Quoting should be performed by connection not ARel --- lib/arel/relations/relation.rb | 9 --------- lib/arel/sql/formatters.rb | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) (limited to 'lib/arel') diff --git a/lib/arel/relations/relation.rb b/lib/arel/relations/relation.rb index 466ee66f64..5d2c336a15 100644 --- a/lib/arel/relations/relation.rb +++ b/lib/arel/relations/relation.rb @@ -6,17 +6,8 @@ module Arel Session.new end - def select_value - engine.select_value self.to_sql - end - - def select_values - engine.select_values self.to_sql - end - def count @count = "COUNT(*) AS count_all" - engine.select_value(self.to_sql).to_i end def to_sql(formatter = Sql::SelectStatement.new(self)) diff --git a/lib/arel/sql/formatters.rb b/lib/arel/sql/formatters.rb index d8618ca2cc..f82ddf631f 100644 --- a/lib/arel/sql/formatters.rb +++ b/lib/arel/sql/formatters.rb @@ -69,7 +69,7 @@ module Arel end def value(value) - quote value.to_sql(self) + value.to_sql(self) end def scalar(value, column = nil) -- cgit v1.2.3