Class UniqueRecomputeReport
What a recomputation of _values._unique for one key structure found. Produced when a
[RedbUnique] attribute appears on a populated structure, when the structure's encoder
version is behind UniqueKeyEncoder.Version, when rows are found with a value but no key
(a SQL-side writer touched them), and on an explicit RecomputeUniqueAsync.
Duplicates are reported, not thrown: the first row of each duplicate group (lowest value id)
keeps the key, the others stay with _unique IS NULL — outside the index, visible here,
and to a query WHERE _id_structure = … AND _unique IS NULL AND <column> IS NOT NULL.
Uniqueness is enforced for every row that has a key from this point on; the losers are the
application's to resolve.
public sealed class UniqueRecomputeReport
Inheritance
Properties
Duplicates
Groups of rows sharing one key; each group's first id kept the key.
public IReadOnlyList<UniqueDuplicateGroup> Duplicates { get; init; }
HasDuplicates
public bool HasDuplicates { get; }
HashedRows
Rows that received a key (rows with a NULL value get none and are not counted).
public int HashedRows { get; init; }
LosingRows
Rows left without a key because another row already holds it.
public int LosingRows { get; }
PropertyName
public string PropertyName { get; init; }
SchemeId
public long SchemeId { get; init; }
SchemeName
public string SchemeName { get; init; }
StructureId
public long StructureId { get; init; }