Table of Contents

Class DatabaseRegistryEntry

Namespace
Typhon.Engine
Assembly
Typhon.Engine.dll

One database this machine has seen — a row of the machine-local registry (#622, design D-7).

public sealed record DatabaseRegistryEntry : IEquatable<DatabaseRegistryEntry>
Inheritance
DatabaseRegistryEntry
Implements
Inherited Members

Remarks

Exists is deliberately not serialised. Whether a bundle is still on disk is true at the instant it is asked and can be falsified by the next `mv`; storing it would produce a list that confidently reports databases that moved months ago. That is precisely how every tool's "recent connections" menu ends up untrusted, so the verdict is recomputed by List() on every read and the type makes storing it impossible.

Constructors

DatabaseRegistryEntry()

public DatabaseRegistryEntry()

Properties

BundlePath

Absolute, normalised path of the database bundle directory ({name}.typhon). The registry's key.

public string BundlePath { get; init; }

Property Value

string

DatabaseId

The database's durable identity (DatabaseId, #614). Recorded so "the same path, but a different database" — deleted and recreated between two opens — is detectable rather than showing as one continuously-known row.

public Guid DatabaseId { get; init; }

Property Value

Guid

Exists

Whether the bundle is still on disk — computed at read time, never stored. See the remarks on this type.

[JsonIgnore]
public bool Exists { get; init; }

Property Value

bool

FirstSeenUtc

When this database was first registered on this machine. Preserved across re-registration.

public DateTime FirstSeenUtc { get; init; }

Property Value

DateTime

LastOpenedBy

The entry assembly of the process that last opened it (e.g. AntHill.Demo). Not required by D-7; it is what makes a row identifiable when three databases on a machine share a name, and it is covered by the same kill-switch as the path.

public string LastOpenedBy { get; init; }

Property Value

string

LastOpenedUtc

When it was last opened.

public DateTime LastOpenedUtc { get; init; }

Property Value

DateTime

Name

The database name — the bundle directory's stem.

public string Name { get; init; }

Property Value

string

Methods

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

Equals(DatabaseRegistryEntry?)

public bool Equals(DatabaseRegistryEntry? other)

Parameters

other DatabaseRegistryEntry

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Operators

operator ==(DatabaseRegistryEntry?, DatabaseRegistryEntry?)

public static bool operator ==(DatabaseRegistryEntry? left, DatabaseRegistryEntry? right)

Parameters

left DatabaseRegistryEntry
right DatabaseRegistryEntry

Returns

bool

operator !=(DatabaseRegistryEntry?, DatabaseRegistryEntry?)

public static bool operator !=(DatabaseRegistryEntry? left, DatabaseRegistryEntry? right)

Parameters

left DatabaseRegistryEntry
right DatabaseRegistryEntry

Returns

bool