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

come up with a nicer way of handling enum fields at the diesel level #10

Open
jrheard opened this issue Jul 29, 2021 · 1 comment
Open
Labels

Comments

@jrheard
Copy link
Owner

jrheard commented Jul 29, 2021

right now i'm using newtype constants to do enum-y things, but i'd prefer it if i could use enums. i want to be able to work with enum variants in rust and have diesel automatically translate them to corresponding string values and back.

i tried diesel-derive-enum and manually implementing tosql/fromsql myself, but didn't have a good time with either one. maybe i'll have better luck if i try that again, or maybe there's some other approach i'm missing.

@jrheard
Copy link
Owner Author

jrheard commented Aug 14, 2021

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

No branches or pull requests

1 participant