Table of Contents

Class SchemaDiff

Namespace
Typhon.Engine
Assembly
Typhon.Engine.dll

The full set of differences between a persisted component schema and the current one, with an overall CompatibilityLevel.

public class SchemaDiff
Inheritance
SchemaDiff
Inherited Members

Constructors

SchemaDiff(string, int, List<FieldChange>, List<IndexChange>)

Creates a diff and computes its overall Level from the given changes (index changes raise the level to at least compatible).

public SchemaDiff(string componentName, int persistedRevision, List<FieldChange> fieldChanges, List<IndexChange> indexChanges)

Parameters

componentName string

Component (schema) name.

persistedRevision int

Revision of the persisted schema.

fieldChanges List<FieldChange>

Field-level changes.

indexChanges List<IndexChange>

Index-level changes.

Properties

ComponentName

Component (schema) name.

public string ComponentName { get; }

Property Value

string

FieldChanges

All field-level changes.

public List<FieldChange> FieldChanges { get; }

Property Value

List<FieldChange>

HasBreakingChanges

True when the change requires an explicit migration (Level is Breaking).

public bool HasBreakingChanges { get; }

Property Value

bool

HasCompatibleChanges

True when the overall severity is at least Compatible.

public bool HasCompatibleChanges { get; }

Property Value

bool

IndexChanges

All index-level changes.

public List<IndexChange> IndexChanges { get; }

Property Value

List<IndexChange>

IsIdentical

True when there are no differences (Level is Identical).

public bool IsIdentical { get; }

Property Value

bool

Level

Overall severity — the maximum CompatibilityLevel across all changes.

public CompatibilityLevel Level { get; }

Property Value

CompatibilityLevel

PersistedRevision

Revision of the persisted schema being compared against.

public int PersistedRevision { get; }

Property Value

int

Summary

Short human-readable summary of the changes (e.g. "+2 added, -1 removed, 3 index changes"), or "identical" when there are none.

public string Summary { get; }

Property Value

string