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