Skip to main content

StreamDataWriteResult

Namespace: Meshmakers.Octo.Runtime.Contracts.StreamData

What an archive write did: how many rows were stored and which were not, and why. A writer can no longer report success for a value that was not stored.

public record StreamDataWriteResult : IEquatable<StreamDataWriteResult>

Inheritance Object → StreamDataWriteResult
Implements IEquatable<StreamDataWriteResult>

Remarks:

A row is stored when the database holds its values after the write: a new row, an update that won the archive's conflict precedence, or an identical re-delivery. An archive without conflict precedence stores every row of its target type, as before. Rows that lose against a stored row are a normal outcome for automated deliveries and do not fail the write; a manual row that cannot be stored fails it (ManualStreamDataNotAppliedException).

Properties​

Stored​

public int Stored { get; set; }

Property Value​

Int32

Skipped​

public IReadOnlyList<StreamDataSkippedRow> Skipped { get; set; }

Property Value​

IReadOnlyList<StreamDataSkippedRow>

Empty​

A write of nothing.

public static StreamDataWriteResult Empty { get; }

Property Value​

StreamDataWriteResult

SkippedCount​

Number of rows that were not stored.

public int SkippedCount { get; }

Property Value​

Int32

SkippedByReason​

Number of rows not stored, per reason; reasons without a row are absent.

public IReadOnlyDictionary<StreamDataSkipReason, int> SkippedByReason { get; }

Property Value​

IReadOnlyDictionary<StreamDataSkipReason, Int32>

Constructors​

StreamDataWriteResult(Int32, IReadOnlyList<StreamDataSkippedRow>)​

What an archive write did: how many rows were stored and which were not, and why. A writer can no longer report success for a value that was not stored.

public StreamDataWriteResult(int Stored, IReadOnlyList<StreamDataSkippedRow> Skipped)

Parameters​

Stored Int32

Skipped IReadOnlyList<StreamDataSkippedRow>

Remarks:

A row is stored when the database holds its values after the write: a new row, an update that won the archive's conflict precedence, or an identical re-delivery. An archive without conflict precedence stores every row of its target type, as before. Rows that lose against a stored row are a normal outcome for automated deliveries and do not fail the write; a manual row that cannot be stored fails it (ManualStreamDataNotAppliedException).

Methods​

Add(StreamDataWriteResult)​

Combines the results of two parts of one write.

public StreamDataWriteResult Add(StreamDataWriteResult other)

Parameters​

other StreamDataWriteResult

Returns​

StreamDataWriteResult