Class RedbScheme

Assembly: redb.Core.dll

REDB scheme entity with direct data storage.
Maps to _schemes table in PostgreSQL.
Contains collection of structures (fields).

public class RedbScheme : IRedbScheme

Inheritance

ObjectRedbScheme

Implements

Properties

Alias

Scheme alias (short name).

[JsonPropertyName("alias")]
public string? Alias { get; set; }

Id

Unique scheme identifier.

[JsonPropertyName("id")]
public long Id { get; set; }

IdParent

Parent scheme identifier (for scheme hierarchy).

[JsonPropertyName("id_parent")]
public long? IdParent { get; set; }

Name

Scheme name.

[JsonPropertyName("name")]
public string Name { get; set; }

NameSpace

Namespace for C# class generation.

[JsonPropertyName("name_space")]
public string? NameSpace { get; set; }

StructureHash

MD5 hash of all structures (aggregated).

[JsonPropertyName("structure_hash")]
public Guid? StructureHash { get; set; }

Structures

Collection of structures (fields) for this scheme.

[JsonPropertyName("structures")]
public IReadOnlyCollection<IRedbStructure> Structures { get; }

Type

Scheme type ID (Class, Array, Dictionary, JsonDocument, XDocument).

[JsonPropertyName("type")]
public long Type { get; set; }

Methods

GetStructureByName(string)

Fast lookup of structure by name.

public IRedbStructure? GetStructureByName(string name)

SetStructures(IEnumerable<RedbStructure>)

Set structures collection (for mapping).

public void SetStructures(IEnumerable<RedbStructure> structures)

ToString()

Returns a string that represents the current object.

public override string ToString()

Constructors

RedbScheme()

Default constructor for deserialization and mapping.

RedbScheme(string)

Constructor with name.