abbychau/diesel_cli_ext

Suggestion: Add jsonb support

Opened this issue · 3 comments

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,
}

added. will be released in the next version. (>= 0.3.8)

@jacob-pro 0.3.9 released . it should contains the above feat.

thank you :)