aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-08-04 16:55:53 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-08-04 16:55:53 -0700
commit0bb00a6999c7df2ea1c641e8bd6ada3023981617 (patch)
tree61ccc11f6e7f328b379bb528878ac4d941cef90c /lib
parent1b4e7715d3872cee9fbcd3ce0b6713294d04b5bc (diff)
downloadrails-0bb00a6999c7df2ea1c641e8bd6ada3023981617.tar.gz
rails-0bb00a6999c7df2ea1c641e8bd6ada3023981617.tar.bz2
rails-0bb00a6999c7df2ea1c641e8bd6ada3023981617.zip
unfactoring DefaultOperations
Diffstat (limited to 'lib')
-rw-r--r--lib/arel/algebra/relations/relation.rb29
1 files changed, 13 insertions, 16 deletions
diff --git a/lib/arel/algebra/relations/relation.rb b/lib/arel/algebra/relations/relation.rb
index 9b90142de9..de48aaf04e 100644
--- a/lib/arel/algebra/relations/relation.rb
+++ b/lib/arel/algebra/relations/relation.rb
@@ -194,6 +194,19 @@ module Arel
@position_of[attribute] = attributes.index(attributes[attribute])
end
+ def attributes; Header.new end
+ def projections; [] end
+ def wheres; [] end
+ def orders; [] end
+ def inserts; [] end
+ def groupings; [] end
+ def havings; [] end
+ def joins(formatter = nil); nil end # FIXME
+ def taken; nil end
+ def skipped; nil end
+ def sources; [] end
+ def locked; [] end
+
private
def matching_attributes(attribute)
(@matching_attributes ||= attributes.inject({}) do |hash, a|
@@ -205,21 +218,5 @@ module Arel
def has_attribute?(attribute)
!matching_attributes(attribute).empty?
end
-
- module DefaultOperations
- def attributes; Header.new end
- def projections; [] end
- def wheres; [] end
- def orders; [] end
- def inserts; [] end
- def groupings; [] end
- def havings; [] end
- def joins(formatter = nil); nil end # FIXME
- def taken; nil end
- def skipped; nil end
- def sources; [] end
- def locked; [] end
- end
- include DefaultOperations
end
end