Skip to content

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

Open
@jrheard

Description

@jrheard

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions