batchInsert
abstract suspend fun batchInsert(context: QueryExecutor, entities: Iterable<T>): DbResult<Long>(source)
Inserts multiple entities into the data source using the specified driver context.
All the entities are written with a single multi-row INSERT. The inserted rows are not read back: values generated by the database (e.g. auto-incremented ids) are not returned. The operation fails with SQLError.Code.RowMismatch when the number of affected rows differs from the number of entities.
Return
A DbResult containing the number of inserted rows (equal to the number of entities), or an error if the operation fails.
Parameters
context
The database driver context used to execute the batch insert operation.
entities
The collection of entities of type T to be inserted into the data source.