Is your feature request related to a problem? Please describe.
The type OrderByClause does not support optional [NULLS { FIRST | LAST }] (PostgreSQL) expression, Causing Nulls always being first when using descending ordering
SELECT * FROM tbl ORDER BY key DESC NULLS LAST
Same thing applies to MySQL/MariaDB, except they sort Null values first when using ascending ordering, and it has a different syntax for controlling it, and I was not able to find anything in the documents that explains about this behavior.
SELECT * FROM tbl ORDER BY -key ASC (notice the - before key)
Describe the solution you'd like
Exposing methods (IMHO NullsFirst, NullsLast seem clear enough) for controlling where do nulls appear through OrderByClause could be helpful in lots of cases
Is your feature request related to a problem? Please describe. The type
OrderByClause
does not support optional[NULLS { FIRST | LAST }]
(PostgreSQL) expression, Causing Nulls always being first when using descending orderingSELECT * FROM tbl ORDER BY key DESC NULLS LAST
Same thing applies to MySQL/MariaDB, except they sort Null values first when using ascending ordering, and it has a different syntax for controlling it, and I was not able to find anything in the documents that explains about this behavior.
SELECT * FROM tbl ORDER BY -key ASC
(notice the-
before key)Describe the solution you'd like Exposing methods (IMHO
NullsFirst
,NullsLast
seem clear enough) for controlling where do nulls appear throughOrderByClause
could be helpful in lots of cases