1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/test/cases/arel
Keenan Brock b775f0cbdc Support NullsFirst for all databases.
Most databases order tables with the `NULL` value first, having it before
all other data values. Postgres has `NULLS` last.

Fortunately, ANSI SQL has an option to allow the database to specify where NULLS
come out in this sort order

    ORDER BY column ASC NULLS FIRST

MS SQL, SQLite, Oracle, and Postgres all follow this syntax. Unfortunately, MySql
does not.

Before:

PostgreSQL: both `.nulls_first()` and `.nulls_last()` work as designed.
Others: both raise a runtime error.

After:

MySQL: `.nulls_first()` works as designed.
MySQL: `.nulls_last()` raises a runtime error
Others: both work as designed
2021-05-18 16:58:21 -04:00
..
attributes Quote the arguments passed to the new Contains/Overlaps node types to align with the behaviour of existing predicates 2021-03-09 08:05:17 +13:00
collectors SQLString#compile is no longer used since 53521a9e39 2018-09-30 16:49:13 +09:00
nodes Remove unused Equality#operator 2020-06-17 10:29:21 +09:00
support Remove unused code in FakeRecord 2021-02-03 11:12:45 +09:00
visitors Support NullsFirst for all databases. 2021-05-18 16:58:21 -04:00
attributes_test.rb Remove unused Arel::Attributes.for 2019-06-15 23:59:41 +09:00
crud_test.rb
delete_manager_test.rb Remove tests that tree manager takes an engine 2021-03-01 20:37:42 +09:00
factory_methods_test.rb
helper.rb Address to the warning "DEPRECATED: global use of assertion methods" 2019-10-04 17:32:31 +09:00
insert_manager_test.rb Remove tests that tree manager takes an engine 2021-03-01 20:37:42 +09:00
nodes_test.rb
select_manager_test.rb Address to the warning "DEPRECATED: global use of assertion methods" 2019-10-04 17:32:31 +09:00
table_test.rb Remove Arel::Crud from Arel::Table 2021-03-02 17:48:28 +09:00
update_manager_test.rb Remove tests that tree manager takes an engine 2021-03-01 20:37:42 +09:00