[−][src]Trait wundergraph::query_builder::mutations::HandleDelete
A trait to handle delete mutations for database entities
Type parameters:
Self
: database table type from dieselL
: Struct implementingLoadingHandler
K
: Input type used determine which entities should be deleted. Normally something representing the primary key of the tableDB
: Backend type from diesel, so one ofPg
orSqlite
Ctx
: The used wundergraph context type
Required methods
fn handle_delete(
executor: &Executor<Ctx, WundergraphScalarValue>,
to_delete: &K
) -> ExecutionResult<WundergraphScalarValue>
executor: &Executor<Ctx, WundergraphScalarValue>,
to_delete: &K
) -> ExecutionResult<WundergraphScalarValue>
Actual function called to delete a database entity
Implementors
impl<L, K, DB, Ctx, T> HandleDelete<L, K, DB, Ctx> for T where
T: Table + HasTable<Table = T> + QueryId + 'static,
DB: Backend + ApplyOffset + 'static,
DB::QueryBuilder: Default,
T::FromClause: QueryFragment<DB>,
L: LoadingHandler<DB, Ctx, Table = T>,
L::Columns: BuildOrder<T, DB> + BuildSelect<T, DB, SqlTypeOfPlaceholder<L::FieldList, DB, L::PrimaryKeyIndex, T, Ctx>>,
Ctx: WundergraphContext,
Ctx::Connection: Connection<Backend = DB>,
L::FieldList: WundergraphFieldList<DB, L::PrimaryKeyIndex, T, Ctx>,
K: 'static,
&'static K: Identifiable<Table = T>,
T::PrimaryKey: EqAll<<&'static K as Identifiable>::Id> + Default,
T::Query: FilterDsl<<T::PrimaryKey as EqAll<<&'static K as Identifiable>::Id>>::Output>,
Filter<T::Query, <T::PrimaryKey as EqAll<<&'static K as Identifiable>::Id>>::Output>: IntoUpdateTarget<Table = T>,
<Filter<T::Query, <T::PrimaryKey as EqAll<<&'static K as Identifiable>::Id>>::Output> as IntoUpdateTarget>::WhereClause: QueryFragment<DB> + QueryId,
[src]
T: Table + HasTable<Table = T> + QueryId + 'static,
DB: Backend + ApplyOffset + 'static,
DB::QueryBuilder: Default,
T::FromClause: QueryFragment<DB>,
L: LoadingHandler<DB, Ctx, Table = T>,
L::Columns: BuildOrder<T, DB> + BuildSelect<T, DB, SqlTypeOfPlaceholder<L::FieldList, DB, L::PrimaryKeyIndex, T, Ctx>>,
Ctx: WundergraphContext,
Ctx::Connection: Connection<Backend = DB>,
L::FieldList: WundergraphFieldList<DB, L::PrimaryKeyIndex, T, Ctx>,
K: 'static,
&'static K: Identifiable<Table = T>,
T::PrimaryKey: EqAll<<&'static K as Identifiable>::Id> + Default,
T::Query: FilterDsl<<T::PrimaryKey as EqAll<<&'static K as Identifiable>::Id>>::Output>,
Filter<T::Query, <T::PrimaryKey as EqAll<<&'static K as Identifiable>::Id>>::Output>: IntoUpdateTarget<Table = T>,
<Filter<T::Query, <T::PrimaryKey as EqAll<<&'static K as Identifiable>::Id>>::Output> as IntoUpdateTarget>::WhereClause: QueryFragment<DB> + QueryId,
fn handle_delete(
executor: &Executor<Ctx, WundergraphScalarValue>,
to_delete: &K
) -> ExecutionResult<WundergraphScalarValue>
[src]
executor: &Executor<Ctx, WundergraphScalarValue>,
to_delete: &K
) -> ExecutionResult<WundergraphScalarValue>