Skip to content
Browse files

Include Predications in Grouping

Also, removed unused ordering.rb file, since it is identical
to the one being created in unary.rb already, and isn't
required anywhere.
  • Loading branch information...
1 parent 19c6eeb commit c78227d9b219933f54cecefb99c72bb231fbb8f2 @ernie ernie committed May 19, 2012
Showing with 21 additions and 7 deletions.
  1. +1 −0 lib/arel/nodes.rb
  2. +7 −0 lib/arel/nodes/grouping.rb
  3. +0 −6 lib/arel/nodes/ordering.rb
  4. +0 −1 lib/arel/nodes/unary.rb
  5. +13 −0 test/nodes/test_grouping.rb
View
1 lib/arel/nodes.rb
@@ -13,6 +13,7 @@
# unary
require 'arel/nodes/unary'
+require 'arel/nodes/grouping'
require 'arel/nodes/ascending'
require 'arel/nodes/descending'
require 'arel/nodes/unqualified_column'
View
7 lib/arel/nodes/grouping.rb
@@ -0,0 +1,7 @@
+module Arel
+ module Nodes
+ class Grouping < Unary
+ include Arel::Predications
+ end
+ end
+end
View
6 lib/arel/nodes/ordering.rb
@@ -1,6 +0,0 @@
-module Arel
- module Nodes
- class Ordering < Unary
- end
- end
-end
View
1 lib/arel/nodes/unary.rb
@@ -12,7 +12,6 @@ def initialize expr
%w{
Bin
Group
- Grouping
Having
Limit
Not
View
13 test/nodes/test_grouping.rb
@@ -0,0 +1,13 @@
+require 'helper'
+
+module Arel
+ module Nodes
+ describe 'Grouping' do
+ it 'should create Equality nodes' do
+ grouping = Grouping.new('foo')
+ grouping.eq('foo').to_sql.must_be_like %q{('foo') = 'foo'}
+ end
+ end
+ end
+end
+

0 comments on commit c78227d

Please sign in to comment.
Something went wrong with that request. Please try again.