aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/relations/compound.rb
blob: f0a3392e097acc6f9f09a9c68f66744c776ec6f9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
module Arel
  class Compound < Relation
    attr_reader :relation
    hash_on :relation
    delegate :joins, :selects, :orders, :groupings, :inserts, :taken,
             :skipped, :name, :alias, :aggregation?, :column_for,
             :engine, :name_for, :table, :relation_for, :table_sql,
             :to => :relation
    
    def attributes
      relation.attributes.collect { |a| a.bind(self) }
    end
  end
end