1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/lib/arel/nodes/select_core.rb
Aaron Patterson d4259c5ce2 Merge branch '2-0-stable' into merge
* 2-0-stable:
  updating history
  Patched Arel v2.0.6 to support MSSQL SQL queries. Based on work of James Abley (https://github.com/jabley/arel).
  consolidating dot visitor methods
  refactoring where, fixing subselect
  implementation for passing a subquery to #in and #not_in
  tests for passing a subquery to #in and #not_in
  limit members of the AST are visited
  quoting limit nodes

Conflicts:
	History.txt
	lib/arel/nodes.rb
	lib/arel/nodes/select_core.rb
	lib/arel/select_manager.rb
	lib/arel/visitors/to_sql.rb
	test/visitors/test_to_sql.rb
2011-01-03 10:31:25 -08:00

37 lines
817 B
Ruby

module Arel
module Nodes
class SelectCore < Arel::Nodes::Node
attr_accessor :top, :projections, :wheres, :groups
attr_accessor :having, :source
def initialize
@source = JoinSource.new nil
@top = nil
@projections = []
@wheres = []
@groups = []
@having = nil
end
def from
@source.left
end
def from= value
@source.left = value
end
alias :froms= :from=
alias :froms :from
def initialize_copy other
super
@source = @source.clone if @source
@projections = @projections.clone
@wheres = @wheres.clone
@groups = @groups.clone
@having = @having.clone if @having
end
end
end
end