BulkWriteResult constructor

BulkWriteResult({
  1. Int64? insertedCount,
  2. Int64? matchedCount,
  3. Int64? modifiedCount,
  4. Int64? deletedCount,
  5. Int64? upsertedCount,
  6. Map<Int64, List<int>>? upsertedIds,
})

Implementation

factory BulkWriteResult({
  $fixnum.Int64? insertedCount,
  $fixnum.Int64? matchedCount,
  $fixnum.Int64? modifiedCount,
  $fixnum.Int64? deletedCount,
  $fixnum.Int64? upsertedCount,
  $core.Map<$fixnum.Int64, $core.List<$core.int>>? upsertedIds,
}) {
  final _result = create();
  if (insertedCount != null) {
    _result.insertedCount = insertedCount;
  }
  if (matchedCount != null) {
    _result.matchedCount = matchedCount;
  }
  if (modifiedCount != null) {
    _result.modifiedCount = modifiedCount;
  }
  if (deletedCount != null) {
    _result.deletedCount = deletedCount;
  }
  if (upsertedCount != null) {
    _result.upsertedCount = upsertedCount;
  }
  if (upsertedIds != null) {
    _result.upsertedIds.addAll(upsertedIds);
  }
  return _result;
}