diff options
Diffstat (limited to 'lib/arel/algebra/relations/operations/project.rb')
-rw-r--r-- | lib/arel/algebra/relations/operations/project.rb | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/lib/arel/algebra/relations/operations/project.rb b/lib/arel/algebra/relations/operations/project.rb deleted file mode 100644 index 1c24ae6caf..0000000000 --- a/lib/arel/algebra/relations/operations/project.rb +++ /dev/null @@ -1,20 +0,0 @@ -module Arel - class Project < Compound - attr_reader :projections, :attributes, :christener - - def initialize(relation, projections) - super(relation) - @projections = projections.map { |p| p.bind(relation) } - @christener = Sql::Christener.new - @attributes = Header.new(projections.map { |x| x.bind(self) }) - end - - def externalizable? - attributes.any? { |a| a.respond_to?(:aggregation?) && a.aggregation? } || relation.externalizable? - end - - def eval - unoperated_rows.collect { |r| r.slice(*projections) } - end - end -end |