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

Feature Request: custom display for enum values #893

Open
mattstam opened this issue Jan 3, 2025 · 1 comment
Open

Feature Request: custom display for enum values #893

mattstam opened this issue Jan 3, 2025 · 1 comment

Comments

@mattstam
Copy link

mattstam commented Jan 3, 2025

It's pretty common that I have some enums in my code, for example:

1 - StatusStarted
2 - StatusFinished
3 - StatusFailed

and I store these as an INT (as storing them as TEXT would be inefficent).

Then in Postico, when I view this table I see my status column with a bunch of 1s, 2s, and 3s. However, it would be a lot more clear if I could somehow indicate to Postico what the meaning of these were, such that when rendering the table, it would show "Started", "Finished", etc.

Not sure the best way to expose this functionality, but ideally the user could just insert their mapping of values for a given column.

@jakob
Copy link
Owner

jakob commented Jan 4, 2025

Is there a reason why you aren't using an enum type?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants