aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/algebra
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-07-26 17:11:30 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-07-26 17:11:30 -0700
commit07a803c9f607b938f004b4adb6fe9abbad6fc8c4 (patch)
tree0cdb4d1d21a392181235870cadc755953fb11512 /lib/arel/algebra
parent4104de6a11c022e82a0fedd786cf39bc6c7bb62f (diff)
downloadrails-07a803c9f607b938f004b4adb6fe9abbad6fc8c4.tar.gz
rails-07a803c9f607b938f004b4adb6fe9abbad6fc8c4.tar.bz2
rails-07a803c9f607b938f004b4adb6fe9abbad6fc8c4.zip
PERF: removing *args calls, do not call send on protected methods then they are public methods
Diffstat (limited to 'lib/arel/algebra')
-rw-r--r--lib/arel/algebra/relations/relation.rb38
1 files changed, 18 insertions, 20 deletions
diff --git a/lib/arel/algebra/relations/relation.rb b/lib/arel/algebra/relations/relation.rb
index 3f6151e27b..b89abd5b8a 100644
--- a/lib/arel/algebra/relations/relation.rb
+++ b/lib/arel/algebra/relations/relation.rb
@@ -62,31 +62,29 @@ module Arel
end
end
- protected
-
- def from_clauses
- sources.blank? ? table_sql(Sql::TableReference.new(self)) : sources
- end
+ def select_clauses
+ attributes.collect { |a| a.to_sql(Sql::SelectClause.new(self)) }
+ end
- def select_clauses
- attributes.collect { |a| a.to_sql(Sql::SelectClause.new(self)) }
- end
+ def from_clauses
+ sources.blank? ? table_sql(Sql::TableReference.new(self)) : sources
+ end
- def where_clauses
- wheres.collect { |w| w.to_sql(Sql::WhereClause.new(self)) }
- end
+ def where_clauses
+ wheres.collect { |w| w.to_sql(Sql::WhereClause.new(self)) }
+ end
- def group_clauses
- groupings.collect { |g| g.to_sql(Sql::GroupClause.new(self)) }
- end
+ def group_clauses
+ groupings.collect { |g| g.to_sql(Sql::GroupClause.new(self)) }
+ end
- def having_clauses
- havings.collect { |g| g.to_sql(Sql::HavingClause.new(self)) }
- end
+ def having_clauses
+ havings.collect { |g| g.to_sql(Sql::HavingClause.new(self)) }
+ end
- def order_clauses
- orders.collect { |o| o.to_sql(Sql::OrderClause.new(self)) }
- end
+ def order_clauses
+ orders.collect { |o| o.to_sql(Sql::OrderClause.new(self)) }
+ end
module Enumerable
include ::Enumerable