isPartial property

bool isPartial
inherited

The operation has been partially executed, but we don't know anything about acknowledgment

Implementation

bool get isPartial {
  // Exclude full success
  if (!operationSucceeded || !hasWriteErrors) {
    return false;
  }
  switch (writeCommandType) {
    case WriteCommandType.insert:
      return nInserted > 0;
    case WriteCommandType.update:
      return nModified + nUpserted > 0;
    case WriteCommandType.delete:
      return nRemoved > 0;
    // mixed case, the writeCommandType is Null
    default:
      return nInserted + nModified + nUpserted + nRemoved > 0;
  }
}