diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-08-12 11:09:54 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-08-12 11:09:54 -0700 |
commit | 139038130dd0dadc995aeffd2300f0ef72b74258 (patch) | |
tree | 14f6e2b88f59067eac341f2d57c0f8df7ff0f0f8 /lib/arel/algebra/relations/utilities/compound.rb | |
parent | 8543c9d302a726a13ef697cbedd96a2135678958 (diff) | |
download | rails-139038130dd0dadc995aeffd2300f0ef72b74258.tar.gz rails-139038130dd0dadc995aeffd2300f0ef72b74258.tar.bz2 rails-139038130dd0dadc995aeffd2300f0ef72b74258.zip |
clean slate
Diffstat (limited to 'lib/arel/algebra/relations/utilities/compound.rb')
-rw-r--r-- | lib/arel/algebra/relations/utilities/compound.rb | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/lib/arel/algebra/relations/utilities/compound.rb b/lib/arel/algebra/relations/utilities/compound.rb deleted file mode 100644 index 0a270f78a1..0000000000 --- a/lib/arel/algebra/relations/utilities/compound.rb +++ /dev/null @@ -1,55 +0,0 @@ -module Arel - class Compound - include Relation - - attr_reader :relation, :engine - - def initialize relation - @relation = relation - @engine = relation.engine - @attributes = nil - @wheres = nil - @groupings = nil - @orders = nil - @havings = nil - @projections = nil - end - - def join?; @relation.join? end - def name; @relation.name end - def table_alias; @relation.table_alias end - def skipped; @relation.skipped end - def taken; @relation.taken end - def joins env; @relation.joins env end - def column_for attr; @relation.column_for attr end - def externalizable?; @relation.externalizable? end - - def sources - @relation.sources - 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} - @#{operation_name} ||= relation.#{operation_name}.collect { |o| o.bind(self) } - end - OPERATION - end - - def attributes - @attributes ||= relation.attributes.bind(self) - end - - def unoperated_rows - relation.call.collect { |row| row.bind(self) } - end - end -end |