Suggestion: Add jsonb support
Opened this issue · 3 comments
jacob-pro commented
Thanks for this great crate!
Currently this generates:
#[derive(Queryable, Debug, Identifiable)]
#[primary_key(key)]
pub struct Setting {
pub key: String,
pub value: Jsonb,
}
for:
table! {
settings (key) {
key -> Varchar,
value -> Jsonb,
}
}
which doesn't compile because Jsonb isn't imported.
It would be great if it instead generated the correct serde type
#[derive(Queryable, Debug, Identifiable)]
#[primary_key(key)]
pub struct Setting {
pub key: String,
pub value: serde_json::Value,
}
abbychau commented
added. will be released in the next version. (>= 0.3.8)
abbychau commented
@jacob-pro 0.3.9 released . it should contains the above feat.
jacob-pro commented
thank you :)