bulkCreate method

  1. @override
FutureOr<void> bulkCreate(
  1. List<BoundaryModel> entities
)
override

Implementation

@override
FutureOr<void> bulkCreate(
  List<BoundaryModel> entities,
) async {
  return retryLocalCallOperation(() async {
    final boundaryCompanions = entities.map((e) => e.companion).toList();

    await sql.batch((batch) async {
      batch.insertAll(
        sql.boundary,
        boundaryCompanions,
        mode: InsertMode.insertOrReplace,
      );
    });
  });
}