pub trait HandleUpdate<L, U, DB, Ctx> {
// Required method
fn handle_update(
selection: Option<&[Selection<'_, WundergraphScalarValue>]>,
executor: &Executor<'_, Ctx, WundergraphScalarValue>,
update: &U,
) -> ExecutionResult<WundergraphScalarValue>;
}Expand description
A trait to handle update mutations for database entities
Type parameters:
Self: database table type for dieselU: data to update into the table. This type should contain information which entry should be updated (by containing the primary key) and the data that should be actually updatedDB: Backend type from diesel, so one ofPgorSqliteCtx: The used wundergraph context type
A default implementation is provided for all types implementing
diesel::AsChangeset
Required Methods§
Sourcefn handle_update(
selection: Option<&[Selection<'_, WundergraphScalarValue>]>,
executor: &Executor<'_, Ctx, WundergraphScalarValue>,
update: &U,
) -> ExecutionResult<WundergraphScalarValue>
fn handle_update( selection: Option<&[Selection<'_, WundergraphScalarValue>]>, executor: &Executor<'_, Ctx, WundergraphScalarValue>, update: &U, ) -> ExecutionResult<WundergraphScalarValue>
Actual function called to insert a database entity
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.