diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-08 15:29:22 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-08 15:29:22 -0700 |
commit | cb6d13877c8d85bd7ba7f7286dfc8b5ae98a50b3 (patch) | |
tree | 08ab278f12e785b43de8cec436d3cacaead8c875 /lib/arel/nodes | |
parent | 7b122f9a336c8c780dcc5a29074f17f3ec493dc6 (diff) | |
download | rails-cb6d13877c8d85bd7ba7f7286dfc8b5ae98a50b3.tar.gz rails-cb6d13877c8d85bd7ba7f7286dfc8b5ae98a50b3.tar.bz2 rails-cb6d13877c8d85bd7ba7f7286dfc8b5ae98a50b3.zip |
adding having nodes
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 |