select_core.rb 637 字节
Newer Older
A
Aaron Patterson 已提交
1 2
module Arel
  module Nodes
A
Aaron Patterson 已提交
3
    class SelectCore < Arel::Nodes::Node
4
      attr_accessor :top, :froms, :projections, :wheres, :groups
A
Aaron Patterson 已提交
5
      attr_accessor :having
A
Aaron Patterson 已提交
6 7

      def initialize
8
        @top         = nil
9
        @froms       = nil
A
Aaron Patterson 已提交
10 11
        @projections = []
        @wheres      = []
A
Aaron Patterson 已提交
12
        @groups      = []
A
Aaron Patterson 已提交
13
        @having      = nil
A
Aaron Patterson 已提交
14
      end
15 16 17

      def initialize_copy other
        super
18
        @froms       = @froms.clone if @froms
19
        @projections = @projections.clone
A
Aaron Patterson 已提交
20 21
        @wheres      = @wheres.clone
        @group       = @groups.clone
A
Aaron Patterson 已提交
22
        @having      = @having.clone if @having
23
      end
A
Aaron Patterson 已提交
24 25 26
    end
  end
end