Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort by Enum Field(s) alphabetically #24120

Open
fgrande opened this issue May 8, 2024 · 1 comment
Open

Sort by Enum Field(s) alphabetically #24120

fgrande opened this issue May 8, 2024 · 1 comment
Labels
kind/feature A request for a new feature. team/client Issue for team Client. team/schema Issue for team Schema. topic: enum "type"/block `enum` topic: orderBy / sorting

Comments

@fgrande
Copy link

fgrande commented May 8, 2024

Problem

Today sorting by enum field(s) means order data by its integer value. There are cases when data needs to be ordered by the String defined by the enum
In PostGres this is possible through the modifier "::text", for example : ORDER BY myEnumField::text

Suggested solution

Associate a new SortOrderEnum class to enum fields, where a property sortMode can define if sort by Name or Value of the enum

@Druue Druue added kind/feature A request for a new feature. team/schema Issue for team Schema. team/client Issue for team Client. topic: enum "type"/block `enum` topic: orderBy / sorting labels May 8, 2024
@Druue
Copy link
Contributor

Druue commented May 8, 2024

This seems to be possible on mysql as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature A request for a new feature. team/client Issue for team Client. team/schema Issue for team Schema. topic: enum "type"/block `enum` topic: orderBy / sorting
Projects
None yet
Development

No branches or pull requests

2 participants