InsertManyOperation constructor

InsertManyOperation(
  1. DbCollection collection,
  2. List<Map<String, dynamic>> documents, {
  3. InsertManyOptions? insertManyOptions,
  4. Map<String, Object>? rawOptions,
})

Implementation

InsertManyOperation(
    DbCollection collection, List<Map<String, dynamic>> documents,
    {InsertManyOptions? insertManyOptions, Map<String, Object>? rawOptions})
    : super(
        collection,
        documents,
        insertOptions: insertManyOptions,
        rawOptions: rawOptions,
      ) {
  if (documents.isEmpty) {
    throw ArgumentError(
        'At least one document required in InsertManyOperation');
  }
}