insertMany<T> method

BatchInsert<F> insertMany<T>(
  1. Iterable<T> rows,
  2. List<Assignment> values(
    1. F,
    2. T
    )
)

Prepares rows for a parameter-aware batch insert.

All callbacks and structural/scope checks finish before client defaults run. Omitted defaults then run once in input-row and schema-column order; compiling or executing this description never samples them again. Callback, codec and factory side effects cannot be rolled back. Execution uses one transaction across all generated statement chunks.

Implementation

BatchInsert<F> insertMany<T>(
  Iterable<T> rows,
  List<Assignment> Function(F, T) values,
) => BatchInsert.internal(
  database,
  queryFields,
  queryState,
  prepareInsertRows(
    database,
    queryFields,
    queryState,
    rows.map((row) => values(queryFields, row)),
  ),
);