Derive Macro edgedb_query_derive::EdgedbSet
source · #[derive(EdgedbSet)]
{
// Attributes available to this derive:
#[scalar]
#[field]
}
Expand description
EdgedbSet creates implementations of following traits for the annotated struct :
- edgedb_query::ToEdgeQl
- edgedb_query::ToEdgeValue
Usage
#[derive(EdgedbSet)]
pub struct MySet {
#[field(column_name="first_name", assignment = "Concat")]
#[scalar(type="str")]
pub name: String,
#[scalar(type="enum", name="State", module="default")]
pub status: Status
}
#[derive(EdgedbEnum)]
pub enum Status {
Open, _Closed
}