Skip to main content

DerivePartialModel

Derive Macro DerivePartialModel 

Source
#[derive(DerivePartialModel)]
{
    // Attributes available to this derive:
    #[turso]
}
Available on crate feature macros only.
Expand description

Derives PartialModelTrait and FromQueryResult for a projection struct.

Struct attribute: #[turso(entity = "path::Entity")], required. Field attributes: #[turso(from_col = "Variant")] to read another column than the one named after the field, #[turso(from_expr = "...")] to read an expression written in Rust against Expr.