Class NcResultMeta
- Namespace
- Hi.SqliteUtils
- Assembly
- HiNc.dll
Internal Use Only. The Meta rows of a result file as SqliteNcResultReader
reads them when it opens the file: what the writer wrote at creation (the schema version,
the app version, the NC name, the creation time) and, for a completed file, what it wrote
at completion (the counts, whether the play ran to its end, the completion time, the
finish.wct beside the file and its hash). Finalized is true exactly
for a file the writer completed – a single file in rollback-journal mode, with no
-wal or -shm beside it. The members written at completion are null for a
recording that crashed or was abandoned; a completion that failed after its commit (the
checkpoint or the switch out of WAL mode refused by another connection) leaves them set
with Finalized false, so Finalized is the one thing to key on.
The times are UTC, their Kind Utc. A completed file an
amend wrote into afterwards says so in its two stamps (ActualTimesAmendedUtc,
BriefsAmendedUtc).
public sealed record NcResultMeta : IEquatable<NcResultMeta>
- Inheritance
-
NcResultMeta
- Implements
- Inherited Members
- Extension Methods
Constructors
NcResultMeta(int, string, string, DateTime, bool, DateTime?, bool?, int?, int?, int?, int?, string, string, DateTime?, DateTime?, int?)
Internal Use Only. The Meta rows of a result file as SqliteNcResultReader
reads them when it opens the file: what the writer wrote at creation (the schema version,
the app version, the NC name, the creation time) and, for a completed file, what it wrote
at completion (the counts, whether the play ran to its end, the completion time, the
finish.wct beside the file and its hash). Finalized is true exactly
for a file the writer completed – a single file in rollback-journal mode, with no
-wal or -shm beside it. The members written at completion are null for a
recording that crashed or was abandoned; a completion that failed after its commit (the
checkpoint or the switch out of WAL mode refused by another connection) leaves them set
with Finalized false, so Finalized is the one thing to key on.
The times are UTC, their Kind Utc. A completed file an
amend wrote into afterwards says so in its two stamps (ActualTimesAmendedUtc,
BriefsAmendedUtc).
public NcResultMeta(int SchemaVersion, string AppVersion, string NcName, DateTime CreatedUtc, bool Finalized, DateTime? FinalizedUtc, bool? PlayCompleted, int? StepCount, int? PositionCount, int? PieceCount, int? BriefCount, string WctRelPath, string WctSha256, DateTime? ActualTimesAmendedUtc, DateTime? BriefsAmendedUtc, int? NodeAttachCount)
Parameters
SchemaVersionintThe file's schema version, the
Metacopy of itsuser_version(theuser_versionitself when the row is missing).AppVersionstringThe HiNc assembly version that wrote the file.
NcNamestringThe name the recorder gave the play when it created the file; may be empty.
CreatedUtcDateTimeWhen the file was created, in UTC.
FinalizedboolWhether the writer completed the file, which is then a single file in rollback-journal mode: the member to key on, whatever the others hold.
FinalizedUtcDateTime?When the writer's completion wrote the counts, just before its commit, in UTC; null for a recording that crashed or was abandoned.
PlayCompletedbool?Whether the play ran to its end rather than being stopped, as the recorder told the writer; null for a recording that crashed or was abandoned.
StepCountint?The machining step records the writer took; null for a recording that crashed or was abandoned.
PositionCountint?The strip position records the writer took; null for a recording that crashed or was abandoned.
PieceCountint?The syntax piece records the writer took; null for a recording that crashed or was abandoned.
BriefCountint?The step brief records the writer took; null for a recording that crashed or was abandoned.
WctRelPathstringThe path of the
finish.wctrelative to the file; null when the completion was given none, and for a recording that crashed or was abandoned.WctSha256stringThe SHA-256 of that
.wctas lower-case hex; null with WctRelPath.ActualTimesAmendedUtcDateTime?When the last amend that wrote measured times into the completed file began (
SqliteNcResultAmender.AmendActualTimes: the CSV one-to-one mapping's), in UTC; null when none were. Each bin the amend wrote carries the stamp in its own transaction, so an amend stopped midway (a stop, a throw, a crash) stamps the bins it wrote: the stamp says measured times were written from then on, not that every step took one.BriefsAmendedUtcDateTime?When the last amend that wrote briefs into the completed file began (
SqliteNcResultAmender.AmendStepBriefs: the step-physics recompute's), in UTC; null when none were – the briefs are then the play's. Stamped bin by bin asActualTimesAmendedUtcis.NodeAttachCountint?How many strip positions the finished stock's node map holds a node key for (AddNodeAttachments(ReadOnlySpan<long>), schema version 2): a position with a key whose pickable no node carried, or whose index is past the review's strip, is counted but binds nothing; null when the file holds no map – a version-1 file, a recording without a stock, or one whose map could not be written – and the stock shows plain.
Properties
ActualTimesAmendedUtc
When the last amend that wrote measured times into the completed file began (SqliteNcResultAmender.AmendActualTimes: the CSV one-to-one mapping's), in UTC; null when none were. Each bin the amend wrote carries the stamp in its own transaction, so an amend stopped midway (a stop, a throw, a crash) stamps the bins it wrote: the stamp says measured times were written from then on, not that every step took one.
public DateTime? ActualTimesAmendedUtc { get; init; }
Property Value
AppVersion
The HiNc assembly version that wrote the file.
public string AppVersion { get; init; }
Property Value
BriefCount
The step brief records the writer took; null for a recording that crashed or was abandoned.
public int? BriefCount { get; init; }
Property Value
- int?
BriefsAmendedUtc
When the last amend that wrote briefs into the completed file began (SqliteNcResultAmender.AmendStepBriefs: the step-physics recompute's), in UTC; null when none were – the briefs are then the play's. Stamped bin by bin as ActualTimesAmendedUtc is.
public DateTime? BriefsAmendedUtc { get; init; }
Property Value
CreatedUtc
When the file was created, in UTC.
public DateTime CreatedUtc { get; init; }
Property Value
Finalized
Whether the writer completed the file, which is then a single file in rollback-journal mode: the member to key on, whatever the others hold.
public bool Finalized { get; init; }
Property Value
FinalizedUtc
When the writer's completion wrote the counts, just before its commit, in UTC; null for a recording that crashed or was abandoned.
public DateTime? FinalizedUtc { get; init; }
Property Value
NcName
The name the recorder gave the play when it created the file; may be empty.
public string NcName { get; init; }
Property Value
NodeAttachCount
How many strip positions the finished stock's node map holds a node key for (AddNodeAttachments(ReadOnlySpan<long>), schema version 2): a position with a key whose pickable no node carried, or whose index is past the review's strip, is counted but binds nothing; null when the file holds no map – a version-1 file, a recording without a stock, or one whose map could not be written – and the stock shows plain.
public int? NodeAttachCount { get; init; }
Property Value
- int?
PieceCount
The syntax piece records the writer took; null for a recording that crashed or was abandoned.
public int? PieceCount { get; init; }
Property Value
- int?
PlayCompleted
Whether the play ran to its end rather than being stopped, as the recorder told the writer; null for a recording that crashed or was abandoned.
public bool? PlayCompleted { get; init; }
Property Value
- bool?
PositionCount
The strip position records the writer took; null for a recording that crashed or was abandoned.
public int? PositionCount { get; init; }
Property Value
- int?
SchemaVersion
The file's schema version, the Meta copy of its user_version (the user_version itself when the row is missing).
public int SchemaVersion { get; init; }
Property Value
StepCount
The machining step records the writer took; null for a recording that crashed or was abandoned.
public int? StepCount { get; init; }
Property Value
- int?
WctRelPath
The path of the finish.wct relative to the file; null when the completion was given none, and for a recording that crashed or was abandoned.
public string WctRelPath { get; init; }
Property Value
WctSha256
The SHA-256 of that .wct as lower-case hex; null with WctRelPath.
public string WctSha256 { get; init; }