Added support for Nulls First / Nulls Last#142
Added support for Nulls First / Nulls Last#142jcristovao wants to merge 2 commits intoPostgREST:masterfrom
Conversation
|
This looks great! Just add some tests and I think it's good to merge. The |
|
If you're too busy right now to add tests and update the docs I can take care of it. Let me know. |
|
Hi, sorry, had a rather busy past week. Thanks |
|
Ok, added some tests, add to do some refactoring, please let me know if you are ok with it |
|
Cool, thanks for the tests. Could you also rebase these commits against the new stuff on master? It no longer merges cleanly. I'd like to get this change into the next minor release which I'll be making soon. |
|
I rebased this and merged to master. Thanks for the feature! |
So, this adds support for an optional
nullsfirstornullslast(verbose, I know, but it keeps in line with postgres terminology) parameter to the order parameters.So, we can have:
GET /people?order=age.desc.nullsfirst,height.asc.nullslastThis is grouped with the previous PR, but as soon as you accept it I can make the necessary adjustments to this one.
I can also add tests, of course, I just would like to know which table should I use... can I add a nullable field to items?
Hope you find this useful,
Cheers
PS: I am also thinking about adding a
isnull/isnotnullto the Filters, seems good?