diff options
author | Bryan Helmkamp <bryan@brynary.com> | 2009-05-17 14:58:46 -0400 |
---|---|---|
committer | Bryan Helmkamp <bryan@brynary.com> | 2009-05-17 14:58:46 -0400 |
commit | 4e3c9a01307339916f6b947d24f19b0f442afd78 (patch) | |
tree | 21d75fb31b0c920deaeb8eb0d8c71e84525dca50 /lib/arel/algebra/primitives/ordering.rb | |
parent | 437429764510338bdc5f4915286425f07565a573 (diff) | |
download | rails-4e3c9a01307339916f6b947d24f19b0f442afd78.tar.gz rails-4e3c9a01307339916f6b947d24f19b0f442afd78.tar.bz2 rails-4e3c9a01307339916f6b947d24f19b0f442afd78.zip |
most in memory operations save join and group
Conflicts:
lib/arel/algebra/extensions/object.rb
lib/arel/algebra/primitives/value.rb
lib/arel/engines/memory/relations.rb
lib/arel/engines/sql/formatters.rb
lib/arel/engines/sql/primitives.rb
spec/arel/unit/relations/alias_spec.rb
spec/arel/unit/relations/array_spec.rb
spec/arel/unit/relations/order_spec.rb
Diffstat (limited to 'lib/arel/algebra/primitives/ordering.rb')
-rw-r--r-- | lib/arel/algebra/primitives/ordering.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/arel/algebra/primitives/ordering.rb b/lib/arel/algebra/primitives/ordering.rb new file mode 100644 index 0000000000..e8d8f97188 --- /dev/null +++ b/lib/arel/algebra/primitives/ordering.rb @@ -0,0 +1,18 @@ +module Arel + class Ordering + attributes :attribute + deriving :initialize, :== + delegate :relation, :to => :attribute + + def bind(relation) + self.class.new(attribute.bind(relation)) + end + + def to_ordering + self + end + end + + class Ascending < Ordering; end + class Descending < Ordering; end +end
\ No newline at end of file |