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/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 Remove unused Arel::Attributes classes 2021-03-11 11:50:42 +09:00
collectors Fix binds logging for HomogeneousIn 2021-02-25 20:37:20 -05:00
nodes Merge pull request #41068 from ricardotk002/fix-where-in-stmt-logging 2021-03-20 01:41:29 +09:00
visitors Support NullsFirst for all databases. 2021-05-18 16:58:21 -04:00
alias_predication.rb
crud.rb Improve compile_update and compile_delete 2021-03-15 17:15:35 +09:00
delete_manager.rb Move where from TreeManager to SelectManager 2021-03-15 23:50:44 +09:00
errors.rb
expressions.rb
factory_methods.rb
insert_manager.rb Move where from TreeManager to SelectManager 2021-03-15 23:50:44 +09:00
math.rb
nodes.rb Implement equality? rather than inheriting Equality for In node 2020-06-21 07:35:17 +09:00
order_predications.rb
predications.rb Merge pull request #41640 from bradleypriest/arel-quoting 2021-03-09 05:45:39 +09:00
select_manager.rb Replace map + compact with filter_map 2021-04-22 22:08:34 -03:00
table.rb Remove Arel::Crud from Arel::Table 2021-03-02 17:48:28 +09:00
tree_manager.rb Move where from TreeManager to SelectManager 2021-03-15 23:50:44 +09:00
update_manager.rb Move where from TreeManager to SelectManager 2021-03-15 23:50:44 +09:00
visitors.rb Make where_sql more few code 2020-06-17 10:50:34 +09:00
window_predications.rb