# File lib/arel/algebra/relations/operations/order.rb, line 5
5: definitialize(relation, orderings)
6: super(relation)
7: @orderings = orderings.collect { |o|o.bind(relation) }
8: end
Public Instance Methods
eval()click to toggle source
# File lib/arel/algebra/relations/operations/order.rb, line 16
16: defeval
17: unoperated_rows.sortdo|row1, row2|
18: ordering = orders.detect { |o|o.eval(row1, row2) !=0 } ||orders.last
19: ordering.eval(row1, row2)
20: end
21: end
orders()click to toggle source
TESTME
# File lib/arel/algebra/relations/operations/order.rb, line 11
11: deforders
12: # QUESTION - do we still need relation.orders ?
13: (orderings+relation.orders).collect { |o|o.bind(self) }.collect { |o|o.to_ordering }
14: end