diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-07-30 15:15:03 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-07-30 15:15:03 -0700 |
commit | 23294241b10d162c3eb90353bfec5735711a7eab (patch) | |
tree | 6e94ea68ea52eb61ba90aa3fc04553fd565c7d1a /lib/arel/algebra/relations/utilities | |
parent | bef0d30e30b99c8e56325645a9f643b60ce3dff9 (diff) | |
download | rails-23294241b10d162c3eb90353bfec5735711a7eab.tar.gz rails-23294241b10d162c3eb90353bfec5735711a7eab.tar.bz2 rails-23294241b10d162c3eb90353bfec5735711a7eab.zip |
PERF: reducing call stack
Diffstat (limited to 'lib/arel/algebra/relations/utilities')
-rw-r--r-- | lib/arel/algebra/relations/utilities/compound.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/arel/algebra/relations/utilities/compound.rb b/lib/arel/algebra/relations/utilities/compound.rb index 80ac0b1351..8a8f3ab609 100644 --- a/lib/arel/algebra/relations/utilities/compound.rb +++ b/lib/arel/algebra/relations/utilities/compound.rb @@ -18,6 +18,14 @@ module Arel @projections = nil end + def table + @relation.table + end + + def table_sql(formatter = Sql::TableReference.new(self)) + @relation.table_sql formatter + end + [:wheres, :groupings, :orders, :havings, :projections].each do |operation_name| class_eval <<-OPERATION, __FILE__, __LINE__ def #{operation_name} |