diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-12-14 21:06:16 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-12-14 21:06:16 -0800 |
commit | 494a96542927348776e85e8ae52a01ad75ced872 (patch) | |
tree | a62f1957501d733b1d2f5369bb1d2a583c0824de /lib/arel/nodes | |
parent | d4bfaf2b82934e8611824c15cbf855d3d02418b5 (diff) | |
download | rails-494a96542927348776e85e8ae52a01ad75ced872.tar.gz rails-494a96542927348776e85e8ae52a01ad75ced872.tar.bz2 rails-494a96542927348776e85e8ae52a01ad75ced872.zip |
cleaning up more nodes
Diffstat (limited to 'lib/arel/nodes')
-rw-r--r-- | lib/arel/nodes/avg.rb | 6 | ||||
-rw-r--r-- | lib/arel/nodes/binary.rb | 21 | ||||
-rw-r--r-- | lib/arel/nodes/exists.rb | 7 | ||||
-rw-r--r-- | lib/arel/nodes/function.rb | 10 | ||||
-rw-r--r-- | lib/arel/nodes/max.rb | 6 | ||||
-rw-r--r-- | lib/arel/nodes/min.rb | 6 | ||||
-rw-r--r-- | lib/arel/nodes/sum.rb | 6 |
7 files changed, 24 insertions, 38 deletions
diff --git a/lib/arel/nodes/avg.rb b/lib/arel/nodes/avg.rb deleted file mode 100644 index 8fc86fc21e..0000000000 --- a/lib/arel/nodes/avg.rb +++ /dev/null @@ -1,6 +0,0 @@ -module Arel - module Nodes - class Avg < Arel::Nodes::Function - end - end -end diff --git a/lib/arel/nodes/binary.rb b/lib/arel/nodes/binary.rb index 1285af9447..eb873c75e1 100644 --- a/lib/arel/nodes/binary.rb +++ b/lib/arel/nodes/binary.rb @@ -16,21 +16,28 @@ module Arel end %w{ - Between - NotEqual - Assignment - Or As + Assignment + Between + DoesNotMatch GreaterThan GreaterThanOrEqual + Join LessThan LessThanOrEqual Matches - DoesNotMatch + NotEqual NotIn - Join + Or }.each do |name| - const_set(name, Class.new(Binary)) + const_set name, Class.new(Binary) end + + #%w{ + # InnerJoin + # OuterJoin + #}.each do |name| + # Nodes.const_set name, Class.new(Join) + #end end end diff --git a/lib/arel/nodes/exists.rb b/lib/arel/nodes/exists.rb deleted file mode 100644 index 18ba8403b4..0000000000 --- a/lib/arel/nodes/exists.rb +++ /dev/null @@ -1,7 +0,0 @@ -module Arel - module Nodes - class Exists < Arel::Nodes::Function - alias :select_stmt :expressions - end - end -end diff --git a/lib/arel/nodes/function.rb b/lib/arel/nodes/function.rb index 133dd66019..e4e45bff31 100644 --- a/lib/arel/nodes/function.rb +++ b/lib/arel/nodes/function.rb @@ -14,5 +14,15 @@ module Arel self end end + + %w{ + Sum + Exists + Max + Min + Avg + }.each do |name| + const_set(name, Class.new(Function)) + end end end diff --git a/lib/arel/nodes/max.rb b/lib/arel/nodes/max.rb deleted file mode 100644 index 5af611b0d6..0000000000 --- a/lib/arel/nodes/max.rb +++ /dev/null @@ -1,6 +0,0 @@ -module Arel - module Nodes - class Max < Arel::Nodes::Function - end - end -end diff --git a/lib/arel/nodes/min.rb b/lib/arel/nodes/min.rb deleted file mode 100644 index bdc1371858..0000000000 --- a/lib/arel/nodes/min.rb +++ /dev/null @@ -1,6 +0,0 @@ -module Arel - module Nodes - class Min < Arel::Nodes::Function - end - end -end diff --git a/lib/arel/nodes/sum.rb b/lib/arel/nodes/sum.rb deleted file mode 100644 index 3e043b7330..0000000000 --- a/lib/arel/nodes/sum.rb +++ /dev/null @@ -1,6 +0,0 @@ -module Arel - module Nodes - class Sum < Arel::Nodes::Function - end - end -end |