diff options
Diffstat (limited to 'lib/arel/nodes')
-rw-r--r-- | lib/arel/nodes/select_core.rb | 17 | ||||
-rw-r--r-- | lib/arel/nodes/unary.rb | 6 |
2 files changed, 16 insertions, 7 deletions
diff --git a/lib/arel/nodes/select_core.rb b/lib/arel/nodes/select_core.rb index 7f577e0a05..bee0a5930c 100644 --- a/lib/arel/nodes/select_core.rb +++ b/lib/arel/nodes/select_core.rb @@ -2,15 +2,18 @@ module Arel module Nodes class SelectCore < Arel::Nodes::Node attr_accessor :top, :projections, :wheres, :groups - attr_accessor :having, :source + attr_accessor :having, :source, :set_quantifier def initialize - @source = JoinSource.new nil - @top = nil - @projections = [] - @wheres = [] - @groups = [] - @having = nil + @source = JoinSource.new nil + @top = nil + + # http://savage.net.au/SQL/sql-92.bnf.html#set%20quantifier + @set_quantifier = nil + @projections = [] + @wheres = [] + @groups = [] + @having = nil end def from diff --git a/lib/arel/nodes/unary.rb b/lib/arel/nodes/unary.rb index 1c834913fa..e6e40e6b13 100644 --- a/lib/arel/nodes/unary.rb +++ b/lib/arel/nodes/unary.rb @@ -23,5 +23,11 @@ module Arel }.each do |name| const_set(name, Class.new(Unary)) end + + class Distinct < Unary + def initialize expr = nil + super + end + end end end |