aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/nodes/select_core.rb
blob: e52db6eb77e95223085432782554fa2be4f6b152 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
module Arel
  module Nodes
    class SelectCore
      attr_reader :froms, :projections, :wheres, :groups
      attr_accessor :having

      def initialize
        @froms       = []
        @projections = []
        @wheres      = []
        @groups      = []
        @having      = nil
      end

      def initialize_copy other
        super
        @froms       = @froms.clone
        @projections = @projections.clone
        @wheres      = @wheres.clone
        @group       = @groups.clone
        @having      = @having.clone if @having
      end
    end
  end
end