diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-07 15:47:38 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-07 15:47:38 -0700 |
commit | 6e05eef9e94dd8f5138bab591d9dbe926498e6ed (patch) | |
tree | 7176793abbfb551f941261ae616bafb788c79b34 /lib/arel/nodes | |
parent | d0e6b969d678fe1a7da4a9f0cedc47e66dcc4173 (diff) | |
download | rails-6e05eef9e94dd8f5138bab591d9dbe926498e6ed.tar.gz rails-6e05eef9e94dd8f5138bab591d9dbe926498e6ed.tar.bz2 rails-6e05eef9e94dd8f5138bab591d9dbe926498e6ed.zip |
group nodes are working!
Diffstat (limited to 'lib/arel/nodes')
-rw-r--r-- | lib/arel/nodes/group.rb | 11 | ||||
-rw-r--r-- | lib/arel/nodes/select_core.rb | 8 |
2 files changed, 16 insertions, 3 deletions
diff --git a/lib/arel/nodes/group.rb b/lib/arel/nodes/group.rb new file mode 100644 index 0000000000..57a7c579da --- /dev/null +++ b/lib/arel/nodes/group.rb @@ -0,0 +1,11 @@ +module Arel + module Nodes + class Group + 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 5e27c7c414..6e85968b31 100644 --- a/lib/arel/nodes/select_core.rb +++ b/lib/arel/nodes/select_core.rb @@ -1,19 +1,21 @@ module Arel module Nodes class SelectCore - attr_reader :froms, :projections, :wheres + attr_reader :froms, :projections, :wheres, :groups def initialize @froms = [] @projections = [] @wheres = [] + @groups = [] end def initialize_copy other super - @froms = @froms.clone + @froms = @froms.clone @projections = @projections.clone - @wheres = @wheres.clone + @wheres = @wheres.clone + @group = @groups.clone end end end |