Class FlatTable

Assembly: redb.Export.dll

One flat table: its columns and constraints, plus where its rows come from in redb.

public sealed class FlatTable

Inheritance

Object→FlatTable

Properties

ClassType

The class whose properties are the columns: the Props type, a nested class, or the element class of a collection.

public Type? ClassType { get; init; }

CollectionKind

Array or dictionary, for a collection table.

public FlatCollectionKind CollectionKind { get; init; }

Columns

Columns in declaration order.

public IReadOnlyList<FlatColumn> Columns { get; }

ElementKind

What one element is, for a collection table.

public FlatElementKind ElementKind { get; init; }

ElementType

CLR type of one element (the value type of a dictionary), for a collection table.

public Type? ElementType { get; init; }

ForeignKeys

Foreign keys. They are meant to be created after every table exists: a reference may point to a table that comes later.

public IReadOnlyList<FlatForeignKey> ForeignKeys { get; }

FullName

Name before shortening: the class name or the full property path.

public string FullName { get; }

Indexes

Plain indexes. Like foreign keys, they are meant to be created after the data is loaded.

public IReadOnlyList<FlatIndex> Indexes { get; }

KeyKind

How the key is laid out, for a dictionary table.

public FlatKeyKind KeyKind { get; init; }

KeyType

CLR type of the key, for a dictionary table.

public Type? KeyType { get; init; }

Kind

What the table holds.

public FlatTableKind Kind { get; init; }

Name

Table name as it goes into DDL.

public string Name { get; }

OwnerTable

Name of the table whose rows own the rows of this one; null for scheme and service tables.

public string? OwnerTable { get; init; }

PrimaryKey

Name of the primary key column.

public string PrimaryKey { get; init; }

PrimaryKeyName

Name of the primary key constraint.

public string PrimaryKeyName { get; }

PropertyPath

Property path from the Props type (HomeAddress.Building); null for scheme and service tables.

public string? PropertyPath { get; init; }

PropsType

The Props type of the scheme the table belongs to; null for service tables.

public Type? PropsType { get; init; }

StructureId

_structures._id of the field the table is built from: the class field of a nested

public long? StructureId { get; init; }

UniqueConstraints

Unique constraints.

public IReadOnlyList<FlatUniqueConstraint> UniqueConstraints { get; }

Constructors

FlatTable(string)

Creates a table; fullName is shortened to the identifier limit when needed.