Derive Macro FromRow
Source #[derive(FromRow)]
{
#[orm]
}
Expand description
Derive FromRow trait for a struct.
§Example
ⓘuse pgorm::FromRow;
#[derive(FromRow)]
struct User {
id: i64,
username: String,
#[orm(column = "email_address")]
email: Option<String>,
}
§Attributes
#[orm(column = "name")] - Map field to a different column name