mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
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.
This commit is contained in:
parent
19c6eeb7b0
commit
c78227d9b2
5 changed files with 21 additions and 7 deletions
|
@ -13,6 +13,7 @@ require 'arel/nodes/false'
|
|||
|
||||
# unary
|
||||
require 'arel/nodes/unary'
|
||||
require 'arel/nodes/grouping'
|
||||
require 'arel/nodes/ascending'
|
||||
require 'arel/nodes/descending'
|
||||
require 'arel/nodes/unqualified_column'
|
||||
|
|
7
lib/arel/nodes/grouping.rb
Normal file
7
lib/arel/nodes/grouping.rb
Normal file
|
@ -0,0 +1,7 @@
|
|||
module Arel
|
||||
module Nodes
|
||||
class Grouping < Unary
|
||||
include Arel::Predications
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,6 +0,0 @@
|
|||
module Arel
|
||||
module Nodes
|
||||
class Ordering < Unary
|
||||
end
|
||||
end
|
||||
end
|
|
@ -12,7 +12,6 @@ module Arel
|
|||
%w{
|
||||
Bin
|
||||
Group
|
||||
Grouping
|
||||
Having
|
||||
Limit
|
||||
Not
|
||||
|
|
13
test/nodes/test_grouping.rb
Normal file
13
test/nodes/test_grouping.rb
Normal file
|
@ -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
|
||||
|
Loading…
Reference in a new issue