2010-08-13 00:21:20 -04:00
|
|
|
module Arel
|
|
|
|
module Nodes
|
|
|
|
class SelectStatement
|
|
|
|
attr_reader :cores
|
2010-09-10 12:47:50 -04:00
|
|
|
attr_accessor :limit, :orders, :lock, :offset
|
2010-08-13 00:21:20 -04:00
|
|
|
|
|
|
|
def initialize cores = [SelectCore.new]
|
2010-08-22 21:13:39 -04:00
|
|
|
@cores = cores
|
|
|
|
@orders = []
|
|
|
|
@limit = nil
|
2010-09-08 20:32:44 -04:00
|
|
|
@lock = nil
|
2010-09-10 12:47:50 -04:00
|
|
|
@offset = nil
|
2010-08-13 00:21:20 -04:00
|
|
|
end
|
2010-08-16 23:59:18 -04:00
|
|
|
|
|
|
|
def initialize_copy other
|
|
|
|
super
|
2010-09-23 16:07:48 -04:00
|
|
|
@cores = @cores.map { |x| x.clone }
|
|
|
|
@orders = @orders.map { |x| x.clone }
|
2010-08-16 23:59:18 -04:00
|
|
|
end
|
2010-08-13 00:21:20 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|