rails/activerecord/test/cases/relation
eileencodes 27fb356360
Refactor invert predicate
Instead of doing a case statement here we can have each of the objects
respond to `invert`. This means that when adding new objects we don't
need to increase this case statement, it's more object oriented, and
let's be fair, it looks better too.

Aaron and I stumbled upon this while working on some performance
work in Arel.

I removed `random_object` from the invert test because we don't support
random objects. If you pass a random object to Arel, it should raise,
not be inverted.

Co-authored-by: Aaron Patterson <aaron.patterson@gmail.com>
2020-03-04 09:28:51 -05:00
..
delegation_test.rb Add missing touch_all delegation to relation 2019-04-05 16:13:40 +09:00
delete_all_test.rb Revert unused code and re-using query annotation for update_all and delete_all 2019-04-01 15:04:11 +09:00
merging_test.rb Add Relation#annotate for SQL commenting 2019-03-21 20:30:56 -07:00
mutation_test.rb Add strict_loading mode to prevent lazy loading 2020-02-20 08:32:48 -05:00
or_test.rb Allow or in case of from clause with same value 2020-01-04 20:32:51 +09:00
predicate_builder_test.rb reset_column_information does not reset @predicate_builder 2020-02-25 13:48:19 +09:00
record_fetch_warning_test.rb Use frozen-string-literal in ActiveRecord 2017-07-19 22:27:07 +03:00
select_test.rb Retain selections with includes and joins 2019-12-03 20:45:12 -05:00
update_all_test.rb Remove tests that limit/offset without order which is non-deterministic result 2019-10-18 04:21:51 +09:00
where_chain_test.rb Introducing the where.missing query method. 2020-01-11 09:14:25 -05:00
where_clause_test.rb Refactor invert predicate 2020-03-04 09:28:51 -05:00
where_test.rb Fix grammar and diction of NOR conditions warning message 2020-02-06 13:24:05 -08:00