Unless Conflict

Unless Conflict attribute represents a unless conflict else statement.
The decorated field must be of type edgedb_query::queries::conflict::UnlessConflict or edgedb_query::queries::conflict::UnlessConflictElse<T: ToEdgeQuery>.

#[unless_conflict(on)]

on attribute (optional) lists conflict column's names separated by a comma.

Usage

    #[insert_query(table="Users")]
    struct InsertUser {
        #[field(column_name="firstname")]
        pub first_name: String,
        #[field(column_name="lastname")]
        pub last_name: String,
        pub age: u8,
        #[unless_conflict(on="firstname, lastname")]
        pub conflict: UnlessConflictElse<FindByUserName>
    }
    
    #[select_query(table="Users")]
    struct FindByUserName {
       ...
    }