[][src]Trait wundergraph::query_builder::mutations::HandleDelete

pub trait HandleDelete<L, K, DB, Ctx> {
    fn handle_delete(
        executor: &Executor<Ctx, WundergraphScalarValue>,
        to_delete: &K
    ) -> ExecutionResult<WundergraphScalarValue>; }

A trait to handle delete mutations for database entities

Type parameters:

  • Self: database table type from diesel
  • L: Struct implementing LoadingHandler
  • K: Input type used determine which entities should be deleted. Normally something representing the primary key of the table
  • DB: Backend type from diesel, so one of Pg or Sqlite
  • Ctx: The used wundergraph context type

Required methods

fn handle_delete(
    executor: &Executor<Ctx, WundergraphScalarValue>,
    to_delete: &K
) -> ExecutionResult<WundergraphScalarValue>

Actual function called to delete a database entity

Loading content...

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]

Loading content...