Skip to content

Instantly share code, notes, and snippets.

@rstam
Created December 10, 2013 20:24
Show Gist options
  • Save rstam/7897641 to your computer and use it in GitHub Desktop.
Save rstam/7897641 to your computer and use it in GitHub Desktop.
public class BulkWriteResult
{
public bool IsOrdered { get; }
public int DocumentsAffectedCount { get; }
public IList<WriteRequest> ProcessedRequests { get; }
public IList<BulkWriteUpsert> Upserts { get; }
}
public class BulkWriteException : Exception
{
public BulkWriteResult Result { get; }
public IList<BulkWriterError> Errors { get; }
public IList<WriteRequest> UnprocessedRequests { get; }
}
public class BulkWriteError
{
public int ErrorCode { get; }
public BsonDocument ErrorInfo { get; }
public string ErrorMessage { get; }
public IList<int> Indexes { get; } // the same error can apply to multiple items
}
public class BulkWriteUpsert
{
public BsonValue Id { get; }
public int Index { get; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment