aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/nodes/select_statement.rb
blob: c9a0cde4e00f9df4c312d45dbedfdd85df2a4270 (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
module Arel
  module Nodes
    class SelectStatement < Arel::Nodes::Node
      attr_reader :cores
      attr_accessor :limit, :orders, :lock, :offset

      def initialize cores = [SelectCore.new]
        #puts caller
        @cores  = cores
        @orders = []
        @limit  = nil
        @lock   = nil
        @offset = nil
      end

      def initialize_copy other
        super
        @cores  = @cores.map { |x| x.clone }
        @orders = @orders.map { |x| x.clone }
      end
    end
  end
end