Class DatabaseRegistryEntry
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
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
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
FirstSeenUtc
When this database was first registered on this machine. Preserved across re-registration.
public DateTime FirstSeenUtc { get; init; }
Property Value
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
LastOpenedUtc
When it was last opened.
public DateTime LastOpenedUtc { get; init; }
Property Value
Name
The database name — the bundle directory's stem.
public string Name { get; init; }
Property Value
Methods
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
Equals(DatabaseRegistryEntry?)
public bool Equals(DatabaseRegistryEntry? other)
Parameters
otherDatabaseRegistryEntry
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(DatabaseRegistryEntry?, DatabaseRegistryEntry?)
public static bool operator ==(DatabaseRegistryEntry? left, DatabaseRegistryEntry? right)
Parameters
leftDatabaseRegistryEntryrightDatabaseRegistryEntry
Returns
operator !=(DatabaseRegistryEntry?, DatabaseRegistryEntry?)
public static bool operator !=(DatabaseRegistryEntry? left, DatabaseRegistryEntry? right)
Parameters
leftDatabaseRegistryEntryrightDatabaseRegistryEntry