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

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

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