Table of Contents

Struct TableRow

Namespace
TdbIO
Assembly
TdbIO.dll

One row of a TdbIO.TableSection: a marker byte, the raw body and two trailing numbers representing transaction TimeIds.

public readonly record struct TableRow : IEquatable<TableRow>

Implements

Inherited Members

Constructors

TableRow(long, byte, ReadOnlyMemory<byte>, long, long)

One row of a TdbIO.TableSection: a marker byte, the raw body and two trailing numbers representing transaction TimeIds.

public TableRow(long Offset, byte Marker, ReadOnlyMemory<byte> Body, long A, long B)

Parameters

Offset long

The offset of the marker byte in the data that holds the section.

Marker byte

The marker byte; never 0. In .db1 files it indicates active (0x04) or deleted/superseded (0x0C) status; in DBV@ files it is a non-zero row status/type.

Body ReadOnlyMemory<byte>

The TdbIO.TableSection.RowSize body bytes, raw.

A long

The first number after the body: the creation transaction TimeId (signed 32-bit in .db1 files, unsigned in DBV@ files). Also accessible via TdbIO.TableRow.CreationTimeId.

B long

The second number after the body: the deletion or superseding transaction TimeId, read like TdbIO.TableRow.A. Equal to TdbIO.TableRow.A for active unmodified rows. Also accessible via TdbIO.TableRow.DeletionTimeId.

Properties

A

The first number after the body: the creation transaction TimeId (signed 32-bit in .db1 files, unsigned in DBV@ files). Also accessible via TdbIO.TableRow.CreationTimeId.

public long A { get; init; }

Property Value

long

B

The second number after the body: the deletion or superseding transaction TimeId, read like TdbIO.TableRow.A. Equal to TdbIO.TableRow.A for active unmodified rows. Also accessible via TdbIO.TableRow.DeletionTimeId.

public long B { get; init; }

Property Value

long

Body

The TdbIO.TableSection.RowSize body bytes, raw.

public ReadOnlyMemory<byte> Body { get; init; }

Property Value

ReadOnlyMemory<byte>

CreationTimeId

The creation transaction TimeId when this row was inserted (TdbIO.TableRow.A).

public long CreationTimeId { get; }

Property Value

long

DeletionTimeId

The deletion or superseding transaction TimeId when this row was removed or replaced (TdbIO.TableRow.B). For active unmodified rows, this equals TdbIO.TableRow.CreationTimeId.

public long DeletionTimeId { get; }

Property Value

long

IsActive

True if this row has the active marker (0x04) in .db1 files.

public bool IsActive { get; }

Property Value

bool

IsDeleted

True if this row has the deleted or superseded marker (0x0C) in .db1 files.

public bool IsDeleted { get; }

Property Value

bool

Marker

The marker byte; never 0. In .db1 files it indicates active (0x04) or deleted/superseded (0x0C) status; in DBV@ files it is a non-zero row status/type.

public byte Marker { get; init; }

Property Value

byte

Offset

The offset of the marker byte in the data that holds the section.

public long Offset { get; init; }

Property Value

long

Methods

AsAssembly()

Decodes the row body as an TdbIO.AssemblyRow (table 2, size 92).

public AssemblyRow AsAssembly()

Returns

AssemblyRow

AsAssemblyNumbering()

Decodes the row body as an TdbIO.AssemblyNumberingRow (table 95, size 76).

public AssemblyNumberingRow AsAssemblyNumbering()

Returns

AssemblyNumberingRow

AsBolt()

Decodes the row body as a TdbIO.BoltRow (table 107, size 24).

public BoltRow AsBolt()

Returns

BoltRow

AsBoltHole()

Decodes the row body as a TdbIO.BoltHoleRow (table 140, size 48).

public BoltHoleRow AsBoltHole()

Returns

BoltHoleRow

AsBoltHolePoints()

Decodes the row body as a TdbIO.BoltHolePointsRow (table 142, size 60).

public BoltHolePointsRow AsBoltHolePoints()

Returns

BoltHolePointsRow

AsCoordsys()

Decodes the row body as a TdbIO.CoordsysRow (table 3, size 40).

public CoordsysRow AsCoordsys()

Returns

CoordsysRow

AsNumAttr()

Decodes the row body as a TdbIO.NumAttrRow (table 38, size 24).

public NumAttrRow AsNumAttr()

Returns

NumAttrRow

AsNumAttrAttr()

Decodes the row body as a TdbIO.NumAttrAttrRow (table 48, size 44).

public NumAttrAttrRow AsNumAttrAttr()

Returns

NumAttrAttrRow

AsObject()

Decodes the row body as an TdbIO.ObjectRow (table 1, size 72).

public ObjectRow AsObject()

Returns

ObjectRow

AsObjectModification()

Decodes the row body as an TdbIO.ObjectModificationRow (table 132, size 20).

public ObjectModificationRow AsObjectModification()

Returns

ObjectModificationRow

AsObjectNumbering()

Decodes the row body as an TdbIO.ObjectNumberingRow (table 105, size 12).

public ObjectNumberingRow AsObjectNumbering()

Returns

ObjectNumberingRow

AsObjectPhase()

Decodes the row body as an TdbIO.ObjectPhaseRow (table 141, size 8).

public ObjectPhaseRow AsObjectPhase()

Returns

ObjectPhaseRow

AsPart()

Decodes the row body as a TdbIO.PartRow (table 10, size 64).

public PartRow AsPart()

Returns

PartRow

AsPartAttr()

Decodes the row body as a TdbIO.PartAttrRow (table 44, size 372).

public PartAttrRow AsPartAttr()

Returns

PartAttrRow

AsPartNumbering()

Decodes the row body as a TdbIO.PartNumberingRow (table 94, size 68).

public PartNumberingRow AsPartNumbering()

Returns

PartNumberingRow

AsPoint()

Decodes the row body as a TdbIO.PointRow (table 13, size 32).

public PointRow AsPoint()

Returns

PointRow

AsRelation()

Decodes the row body as a TdbIO.RelationRow (table 16, size 60).

public RelationRow AsRelation()

Returns

RelationRow

AsStrAttr()

Decodes the row body as a TdbIO.StrAttrRow (table 39, size 24).

public StrAttrRow AsStrAttr()

Returns

StrAttrRow

AsStrAttrAttr()

Decodes the row body as a TdbIO.StrAttrAttrRow (table 49, size 120).

public StrAttrAttrRow AsStrAttrAttr()

Returns

StrAttrAttrRow

AsStringPool()

Decodes the row body as a TdbIO.StringPoolRow (table 50, size 45).

public StringPoolRow AsStringPool()

Returns

StringPoolRow

AsWelding()

Decodes the row body as a TdbIO.WeldingRow (table 20, size 24).

public WeldingRow AsWelding()

Returns

WeldingRow