You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am writing amazon lambdas using quarkus-amazon-lambda-rest, quarkus-resteasy-jackson and quarkus-hibernate-orm-panache
I have one rest endpoint that will return me a list of the entities. But I need to be able to sort that list based on a query param.
Right now my query param is a list of string where I receive 'columnName,(ASC or DSC)'
The Sort class from io.quarkus.panache.common has it constructor as private.
It requires the Sort object to always have some column. We should have way to be able to create a Sort object without defining a column. Pretty much to what spring does with Pageable.Sort.
@FroMage empty sort is already possible via Sort.by() as we use a varargs but it's not very discoverable so adding Sort.emtpy() seems to be a good addition with a discoverable name and a straighforward implementation (delegate to Sort.by()).
WDYT ?
Description
I am writing amazon lambdas using quarkus-amazon-lambda-rest, quarkus-resteasy-jackson and quarkus-hibernate-orm-panache
I have one rest endpoint that will return me a list of the entities. But I need to be able to sort that list based on a query param.
Right now my query param is a list of string where I receive 'columnName,(ASC or DSC)'
The Sort class from io.quarkus.panache.common has it constructor as private.
It requires the Sort object to always have some column. We should have way to be able to create a Sort object without defining a column. Pretty much to what spring does with Pageable.Sort.
For example, this isn't allowed
Implementation ideas
Either allow the constructor on Sort to be public or create an static method .empty().
The text was updated successfully, but these errors were encountered: