-
Notifications
You must be signed in to change notification settings - Fork 13
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
Support for simple enums of a single type #20
Comments
fwiw, diesel also doesnt automatically support enums. |
Electron100
added a commit
that referenced
this issue
May 2, 2023
Support automatic deriving of `FieldType` for simple enums. The database representation is the string form of the variant name. Fixes ##20 Future work could allow an option to use discriminant value instead of name.
Electron100
added a commit
that referenced
this issue
May 3, 2023
Support automatic deriving of `FieldType` for simple enums. The database representation is the string form of the variant name. Fixes #20 Future work could allow an option to use discriminant value instead of name.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
afaics, enums consisting of a single type are not yet automatically supported. I can implement
ToSql
, but it would be nice to not need to. I see there is a#[butane_type(Text)]
, but it doesnt appear to help here. I have serdeSerialize
andDeserialize
for the enum, andToString
/FromStr
, but I get the error below.error:
enums are mentioned at https://github.com/Electron100/butane/blob/master/notes.org#roadmap
The text was updated successfully, but these errors were encountered: