insertMany method

Future<List<ObjectId>> insertMany(
  1. List<T> docs
)

insert many documents

Implementation

Future<List<ObjectId>> insertMany(List<T> docs) {
  return _executionQueue.add<List<ObjectId>>(() async {
    var _ids = <ObjectId>[];
    for (var doc in docs) {
      _ids.add(await _storage.insert(itemToMap(doc)));
    }
    return _ids;
  });
}