Closed
Description
A Postgres type like so
CREATE TYPE mood AS ENUM ('sad', 'happy');
can be represented like this
#[derive(ToSql, Debug)]
#[postgres(name = "mood")]
enum Mood {
#[postgres(name = "sad")]
Sad,
#[postgres(name = "happy")]
Happy
}
This is a request for a container attribute like Serde's rename_all
[1]
#[derive(ToSql, Debug)]
#[postgres(rename_all = "lowercase")]
enum Mood {
Sad,
Happy
}
What do you think?
--
#894 related
Metadata
Metadata
Assignees
Labels
No labels