1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/lib/active_record/relation
Josh Goodall e32fd534b5 Support reversing of Arel expressions in reverse_order
The current behaviour of reverse_order, when presented with an
existing order that is an Arel expression, is to ignore it.
This isn't quite in keeping with how it handles Arel attributes
(which it reverse) or arbitrary strings (which throw an exception).

The easy path would be to throw an exception, but we don't have to.
Any SQL expression that is a valid default sort expression can be
reversed with DESC.

It follows that if there's an existing Arel::Nodes::NodeExpression
that is not already wrapped with an Arel::Nodes::Ordering, then
it can be reversed with DESC.
2020-09-04 17:07:17 +10:00
..
batches
predicate_builder Always use faster HomogeneousIn in array handler 2020-07-25 17:59:57 +09:00
batches.rb Simplify apply_{start,finish}_limit 2020-07-25 09:38:00 +09:00
calculations.rb Support type casting for grandchild's attributes 2020-05-29 04:55:13 +09:00
delegation.rb Allow define scope for Ruby reserved keywords 2020-05-14 21:39:39 +09:00
finder_methods.rb Move Arel attribute normalization into arel_table 2020-07-19 23:41:24 +09:00
from_clause.rb Merge pull request #38145 from sinsoku/avoid_assigning_the_same_value_to_join_values 2020-01-04 21:31:36 +09:00
merger.rb Unify the query values normalization for multiple values 2020-05-19 01:07:51 +09:00
predicate_builder.rb Use self[] instead of build directly in predicate builder 2020-09-01 16:51:36 +09:00
query_attribute.rb
query_methods.rb Support reversing of Arel expressions in reverse_order 2020-09-04 17:07:17 +10:00
record_fetch_warning.rb Move records and loaded ivar up to load 2019-12-10 14:15:11 -05:00
spawn_methods.rb Support merging option :rewhere to allow mergee side condition to be replaced exactly 2020-05-18 14:36:42 +09:00
where_clause.rb Support relation.and for intersection as Set theory 2020-06-07 11:25:51 +09:00