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

pub trait HandleInsert<L, I, DB, Ctx> {
    fn handle_insert(
        selection: Option<&[Selection<WundergraphScalarValue>]>,
        executor: &Executor<Ctx, WundergraphScalarValue>,
        insertable: I
    ) -> ExecutionResult<WundergraphScalarValue>; }

A trait to handle insert mutations for database entities

Type parameters:

  • Self: database table type for diesel
  • I: data to insert into the table
  • DB: Backend type from diesel, so one of Pg or Sqlite
  • Ctx: The used wundergraph context type

A default implementation is provided for all types implementing diesel::Insertable

Required methods

fn handle_insert(
    selection: Option<&[Selection<WundergraphScalarValue>]>,
    executor: &Executor<Ctx, WundergraphScalarValue>,
    insertable: I
) -> ExecutionResult<WundergraphScalarValue>

Actual function called to insert a database entity

Loading content...

Implementors

Loading content...