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

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

A trait to handle batch 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_batch_insert(
    selection: Option<&[Selection<WundergraphScalarValue>]>,
    executor: &Executor<Ctx, WundergraphScalarValue>,
    insertable: Vec<I>
) -> ExecutionResult<WundergraphScalarValue>

Actual function called to insert a batch of database entity

Loading content...

Implementors

Loading content...