bookshelf-jsonapi-params icon indicating copy to clipboard operation
bookshelf-jsonapi-params copied to clipboard

How to sort with `NULLS LAST` clause?

Open svanschooten opened this issue 3 years ago • 1 comments

As we have some data in nested JSONB columns, we use the additionalQuery to add select and ordering for these columns, we need to do this manually is because we need put null values last, which (afaik) is not possible with the JsonApiParams. However, this introduces certain complications, such as also needing to inject your own select clauses for the columns we want to sort on.

Is there a way we can define to sort the nulls last?

svanschooten avatar Oct 03 '22 12:10 svanschooten

I would happily accept a PR that address this request

alechirsch avatar Dec 20 '22 18:12 alechirsch