Zum Hauptinhalt springen

ArchiveConflictKey

Namespace: Meshmakers.Octo.Runtime.Contracts.StreamData

One key of an archive's conflict precedence: a column of that archive plus the direction of it that counts as better.

public record ArchiveConflictKey : IEquatable<ArchiveConflictKey>

Inheritance Object → ArchiveConflictKey
Implements IEquatable<ArchiveConflictKey>

Fields​

OriginKey​

Reserved ArchiveConflictKey.Column that ranks by the row's ArchiveRowOrigin instead of a user column. The $ prefix cannot occur in an attribute path, so it never collides with a declared column.

public static string OriginKey;

Remarks:

Raw and time-range archives rank by this key first even when it is not declared: it is prepended to the configured keys, and an archive without keys ranks by origin alone. Declared explicitly, it applies at the position the author gave it: ConflictKeyOrder.HigherWins (manual ranks above automated) or ConflictKeyOrder.Ignore (the archive opts out of ranking by origin); ConflictKeyOrder.LowerWins is refused. Unlike a column key it does not fall through to the next key when both writes are manual:

incoming manual, stored automated: the incoming write wins;

incoming automated, stored manual: the stored value stays — a manual value is permanent;

both manual: the later write wins, whatever the following keys say, so a wrong manual value is fixed with another manual write;

both automated: the following keys decide, exactly as without this key.

Properties​

Column​

Attribute path of the column, as the author declared it in Columns[].Path. The storage layer maps it onto the physical column name.

public string Column { get; set; }

Property Value​

String

Order​

Which direction of the column counts as better.

public ConflictKeyOrder Order { get; set; }

Property Value​

ConflictKeyOrder

IsOrigin​

True when this key ranks by origin (ArchiveConflictKey.OriginKey) rather than by a column.

public bool IsOrigin { get; }

Property Value​

Boolean

Constructors​

ArchiveConflictKey(String, ConflictKeyOrder)​

One key of an archive's conflict precedence: a column of that archive plus the direction of it that counts as better.

public ArchiveConflictKey(string Column, ConflictKeyOrder Order)

Parameters​

Column String
Attribute path of the column, as the author declared it in Columns[].Path. The storage layer maps it onto the physical column name.

Order ConflictKeyOrder
Which direction of the column counts as better.