Added support for nulls last/first in order by #35
+30
−17
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request solves so that it is possible to do null first/last in order by statements so they could look like these:
col1, col2 desc nulls last, col3 asc, col4 nulls first, col5 desc
This is and SQL standard and supported by both PotsgreSQL and OracleDB. MySQL and MS SQL have not yet implemented it, so if you try to append it on orders for those dbs, then it will return an error as expected, but should work fine if/when they do add support for it. Old kind of order by still works as expected even for those dbs.
I have tested and verify that this does not break existing functionality with order by asc/desc and have same "default to asc" behavior when no value is provided etc.