Skip to main content

DeleteQueryBook

Trait DeleteQueryBook 

Source
pub trait DeleteQueryBook<T: SqlEntity>: QueryBook<T> {
    // Provided methods
    fn get_sql_definition(&self) -> &'static str { ... }
    fn delete<'a>(&self, conditions: WhereCondition<'a>) -> SqlQuery<'a, T> { ... }
}
Expand description

A trait that marks QueryBooks that perform delete from {:source:} where {:condition:} returning {:projection:} queries. These queries actually return the deleted entities.

Provided Methods§

Source

fn get_sql_definition(&self) -> &'static str

Definition of the delete query.

Source

fn delete<'a>(&self, conditions: WhereCondition<'a>) -> SqlQuery<'a, T>

Create a new delete query with the given conditions. The query will be built using the definition returned by the get_sql_definition method. The source will be the source returned by the get_sql_source method. The conditions will be the conditions passed to the method. The projection will be the projection of the entity returned by the get_projection method.

Implementors§