diff options
Diffstat (limited to 'lib/arel/nodes')
-rw-r--r-- | lib/arel/nodes/having.rb | 11 | ||||
-rw-r--r-- | lib/arel/nodes/select_core.rb | 3 |
2 files changed, 14 insertions, 0 deletions
diff --git a/lib/arel/nodes/having.rb b/lib/arel/nodes/having.rb new file mode 100644 index 0000000000..1944a84391 --- /dev/null +++ b/lib/arel/nodes/having.rb @@ -0,0 +1,11 @@ +module Arel + module Nodes + class Having + attr_accessor :expr + + def initialize expr + @expr = expr + end + end + end +end diff --git a/lib/arel/nodes/select_core.rb b/lib/arel/nodes/select_core.rb index 6e85968b31..e52db6eb77 100644 --- a/lib/arel/nodes/select_core.rb +++ b/lib/arel/nodes/select_core.rb @@ -2,12 +2,14 @@ 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 @@ -16,6 +18,7 @@ module Arel @projections = @projections.clone @wheres = @wheres.clone @group = @groups.clone + @having = @having.clone if @having end end end |